Add the URL entries to the navigation menu.
[PrivacyCell.git] / app / src / main / java / com / stoutner / privacycell / activities / PrivacyCell.kt
index eec29e4f08b3626b2b8f1ef625859ca9a578cfcd..84d8db663003a6d8e312cd1083583fa5e083611e 100644 (file)
@@ -21,7 +21,9 @@ package com.stoutner.privacycell.activities
 
 import android.Manifest
 import android.content.Context
 
 import android.Manifest
 import android.content.Context
+import android.content.Intent
 import android.content.pm.PackageManager
 import android.content.pm.PackageManager
+import android.net.Uri
 import android.os.Bundle
 import android.telephony.PhoneStateListener
 import android.telephony.ServiceState
 import android.os.Bundle
 import android.telephony.PhoneStateListener
 import android.telephony.ServiceState
@@ -203,6 +205,61 @@ class PrivacyCell : AppCompatActivity(), NavigationView.OnNavigationItemSelected
                 // Show the alert dialog.
                 contributorsDialogFragment.show(supportFragmentManager, getString(R.string.contributors))
             }
                 // Show the alert dialog.
                 contributorsDialogFragment.show(supportFragmentManager, getString(R.string.contributors))
             }
+
+            R.id.news -> {  // News.
+                // Create a news URL intent.
+                val newsUrlIntent = Intent(Intent.ACTION_VIEW)
+
+                // Add the URL to the intent.
+                newsUrlIntent.data = Uri.parse("https://www.stoutner.com/category/privacy-cell/")
+
+                // Make it so.
+                startActivity(newsUrlIntent)
+            }
+
+            R.id.roadmap -> {  // Roadmap.
+                // Create a roadmap URL intent.
+                val roadmapUrlIntent = Intent(Intent.ACTION_VIEW)
+
+                // Add the URL to the intent.
+                roadmapUrlIntent.data = Uri.parse("https://www.stoutner.com/category/privacy-cell-roadmap/")
+
+                // Make it so.
+                startActivity(roadmapUrlIntent)
+            }
+
+            R.id.bug_tracker -> {  // Bug tracker.
+                // Create a bug tracker URL intent.
+                val bugTrackerUrlIntent = Intent(Intent.ACTION_VIEW)
+
+                // Add the URL to the intent.
+                bugTrackerUrlIntent.data = Uri.parse("https://redmine.stoutner.com/projects/privacy-cell/issues")
+
+                // Make it so.
+                startActivity(bugTrackerUrlIntent)
+            }
+
+            R.id.forum -> {  // Forum.
+                // Create a forum URL intent.
+                val forumUrlIntent = Intent(Intent.ACTION_VIEW)
+
+                // Add the URL to the intent.
+                forumUrlIntent.data = Uri.parse("https://redmine.stoutner.com/projects/privacy-cell/boards")
+
+                // Make it so.
+                startActivity(forumUrlIntent)
+            }
+
+            R.id.donations -> {  // Donations.
+                // Create a donations URL intent.
+                val donationsUrlIntent = Intent(Intent.ACTION_VIEW)
+
+                // Add the URL to the intent.
+                donationsUrlIntent.data = Uri.parse("https://www.stoutner.com/donations/")
+
+                // Make it so.
+                startActivity(donationsUrlIntent)
+            }
         }
 
         // Close the navigation drawer.
         }
 
         // Close the navigation drawer.