Use 'pinpoint' in app that doesn't have accounts

0

I'm trying to set up Push Notifications on an Android app by following the instructions provided. I've reached the step where I need to call the function "Amplify.Notifications.Push.identifyUser()".

My app is completely anonymous. Users install it, run it, and it does what it does, without ever prompting anyone to log in or otherwise identify themselves. What should I pass to the identifyUser function? Can I pass a constant value? Should I generate a random number? Do I need to call this function at all?

Thanks, Frank

Frank
demandé il y a un an190 vues
1 réponse
0

In your case, since your app is completely anonymous and does not have user accounts, you still need to call **Amplify.Notifications.Push.identifyUser() **function but you can pass a unique identifier for each device instead of a user ID.

You can generate a unique ID when the app is first launched and store it in the device's local storage. This ID will then be used as the user ID for that particular device. Android provides a few different IDs that are unique to each device, such as the Android ID. You can use one of these IDs as the user ID. Note that you should be aware of the privacy implications and adhere to Google's guidelines when using device identifiers. You should not use a constant value for all devices, as this would prevent you from being able to send notifications to individual devices. The ID you pass to the identifyUser function should be unique for each device.

profile picture
EXPERT
répondu il y a un an

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions