62.6 Creating and Issuing a Basic Notification
Notifications are created using the Notification.Builder class and must contain an icon, title and content. Open the MainActivity.java file and implement the sendNotification() method as follows to build a basic notification:
.
.
import android.app.Notification;
import android.view.View;
.
.
public void sendNotification(View view) {
String channelID = "com.ebookfrenzy.notifydemo.news";
Notification notification =
new Notification.Builder(MainActivity.this,
channelID)
...