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
asked a year ago187 views
1 Answer
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
answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions