Is there a way to create a registration id with scope of logged in user. I have an app which allows user to login as different user (say one user as student and other as a parent). User can switch between the users. Case is somewhat similar to gmail app where multiple email ids can be logged in at same time.
The issue is when we call
FirebaseInstanceId.getInstance().getToken()
It will give the device id for that app instance. So if i am to target a specific user logged in i cannot.
One way i can accomplish targeting a user is to send user_id
explicitly as data, which in my case is not efficient as it will take to send one FCM send request for each user. Is there anyway this can be accomplished. Would like to know how gmail is handling user specific notifications.