--- a/app/src/main/java/com/codesys/forge/MyService.java +++ b/app/src/main/java/com/codesys/forge/MyService.java @@ -54,23 +54,28 @@ } } private void CreateNotification(int id) { + String url; String title; String description; switch(id) { case 1: + url = "https://forge.codesys.com/forge/community-feed"; title = getString(R.string.notification1_title); description = getString(R.string.notification1_description); break; case 2: + url = "https://forge.codesys.com/forge/news"; title = getString(R.string.notification2_title); description = getString(R.string.notification2_description); break; case 3: + url = "https://forge.codesys.com/forge/talk"; title = getString(R.string.notification3_title); description = getString(R.string.notification3_description); break; default: + url = "url undefined"; title = "title undefined"; description = "description undefined"; break; @@ -81,6 +86,7 @@ NotificationManagerCompat notificationManager = NotificationManagerCompat.from(this); Intent intent = new Intent(this, MainActivity.class); intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK); + intent.putExtra("url", url); PendingIntent pendingIntent = PendingIntent.getActivity(this, 0, intent, 0); NotificationCompat.Builder builder = new NotificationCompat.Builder(this, getString(R.string.channel_id))