Sending notifications in android without a backend, we have to write these lines of code in android studio:
NotificationManager manager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);
Intent intentViewPost = new Intent(PostsActivity.this,BlogPostsView.class);
PendingIntent pendingIntent = PendingIntent.getActivity(PostsActivity.this,(int) System.currentTimeMillis(), intentViewPost,0);
Notification notification = new Notification.Builder(getBaseContext())
.setSmallIcon(R.mipmap.ic_app_logo)
.setContentTitle(getResources().getString(R.string.app_name))
.setContentText(postTitle)
.setContentIntent(pendingIntent)
.build();
manager.notify(111,notification);
How can one do the same thing in Firebase without using the console.
Send messages to specific devices
To send messages to specific devices, set the to the registration token for the specific app instance
Send messages to topics
here the topic is : /topics/foo-bar
Send messages to device groups
Sending messages to a device group is very similar to sending messages to an individual device. Set the to parameter to the unique notification key for the device group
For more information, you check on these links.
https://firebase.google.com/docs/cloud-messaging/server
https://firebase.google.com/docs/cloud-messaging/server#implementing-http-connection-server-protocol