Notification Tutorial : In This Video, You Will Learn How to Integrate Notification in Android Studio. All File : 1) activity_main.xml 2) MainActivity.java 3) …

Nguồn:https://u-os.org/

Author

19 Comments

  1. Thế Lường Reply

    NotificationCompat.Builder builder = new NotificationCompat.Builder(this, CHANNEL_ID)
    Notice that the NotificationCompat.Builder constructor requires that you provide a channel ID. This is required for compatibility with Android 8.0 (API level 26) and higher, but is ignored by older versions.

  2. Yasir Zubair Reply

    Can you please what does this line of code do ? Thanks

    PendingIntent pendingIntent = PendingIntent.getActivity(MainActivity.this,0,intent,PendingIntent.FLAG_UPDATE_CURRENT);

    builder.setContentIntent(pendingIntent);

    NotificationManager notificationManager = (NotificationManager)getSystemService(Context.NOTIFICATION_SERVICE);

    notificationManager.notify (0,builder.build());

  3. omkesh munde Reply

    got an error : Builder(android.content.Context) is deprecated

  4. Sourabh Rathour Reply

    Helpful video thanks. If I want to see notifications on specific time using date and time picker then how to make this scenario please explain

  5. Aymene Bacha Reply

    why that doesn't work at my device samsung SM-M205F(android 9, API 28)

  6. Vikash Kumar Reply

    Awesome video! If you try explain then it would be so much helpfully, a small request try to explain also

  7. Erick Prastya Reply

    why is didn't work in my application..I have followed all the steps, only the textview in the new activity I did not make, because I only need an intent and pending intent

Write A Comment