Answer the question
In order to leave comments, you need to log in
How to make a push notification for a specific category of people?
Hello. there is already an application configured with Firebase, there is no access to the application. you need to send push notifications for specific users, for example, by gender or by date of birth (this data is collected).
but I don’t understand how to choose exactly for this category of people in the admin panel, there are only standard ones. I found that there are
ready-made solutions, but for some reason they are not listed in the admin panel. Please tell me how can I implement this
Answer the question
In order to leave comments, you need to log in
each device registered in the Firebase push notification system has its own unique token, which is obtained something like this:
private void getFirebaseToken() {
FirebaseMessaging.getInstance().getToken()
.addOnCompleteListener(new OnCompleteListener<String>() {
@Override
public void onComplete(@NonNull Task<String> task) {
if (task.isSuccessful()) {
// Get new FCM registration token
// Log and toast
fbtoken = task.getResult();
handleFirebaseResult();
//Log.d("Firebase id", fbid);
//Log.d("Firebase token", fbtoken);
}
}
private void sendRegistrationToServer() {
// TODO: Implement this method to send token to your app server.
}
});
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question