Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

getPushRegistrationId #237

Open
bpfeiffer187 opened this issue Jun 1, 2020 · 4 comments
Open

getPushRegistrationId #237

bpfeiffer187 opened this issue Jun 1, 2020 · 4 comments

Comments

@bpfeiffer187
Copy link

Hey Everyone,

putting in notifications, and setting up android it wants to use
getPushRegistrationId(), this function takes a call back. I am struggling as to what function to call within? is there a specific FCM fucntion that returns a value. Any help clarify from the docs would be helpful.

@0hio-creator
Copy link

returns a promise
could either in async function use await i.e

let token = await getPushRegistrationId()

Keep in mind I believe this function is looking for fcm token on Mixpanel. So unless you have retrieved it elsewhere and then setPushRegistrationId(token) would not expect a value to be returned

@bpfeiffer187
Copy link
Author

bpfeiffer187 commented Jun 2, 2020

ok thanks so i guess my real question then becomes what value does it expect in the setRegID() for the token. is it just the string from server token within the firebase cloud portal? the same one we paste into mixpanel to tie them together.

that to me doesnt seem specific enough to user.

@0hio-creator
Copy link

No its not the server token.
For android you need an FCM token for IOS you need an apns token

The token is specific to the device. You are associating the device with the user in mixpanel so that when mixpanel sends a notification it reaches the device.

IOS example with react native firebase.
#234

@bpfeiffer187
Copy link
Author

bpfeiffer187 commented Jun 3, 2020

cool thanks, the thing i am stuggling with for android is what is the function i have to use to return the FCM Token.

like is there extra stuff that has been done on the android side to get this going.

if you wouldnt mind reaching out to me bpfeiffer55@gmail.com i could really use some help with this if you have time. thanks much.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants