williamrijksen / com.williamrijksen.onesignal

Titanium Appcelerator Library for OneSignal Push Notifications Service
Other
51 stars 43 forks source link

OneSignal: OneSignal AppId format is invalid #22

Closed shacharudi closed 7 years ago

shacharudi commented 7 years ago

Hi William @williamrijksen , Thank you for making this module, it looks great!

I've been trying to integrate it with my appcelerator app on android and been running into this problem described in the title:

I think it's something to do with the way I setup my xml, here's how I set it:

`

        <meta-data android:name="onesignal_google_project_number" android:value="str:xxxxxxxxxxxx" />`

Am I setting this right? Also could you please post an example for the tiapp.xml file?

Thank you!

rooterdog commented 7 years ago

I'm having the exact same issue @williamrijksen Any help is much appreciated!!!!!

williamrijksen commented 7 years ago

You have to replace android:value="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" by android:value="<app id>" which can be found at One-Signal dashboard -> App Settings -> Keys & IDs.

The google project number can be found after registering you're app at FCM (Firebase Cloud Messaging). Is it clear enough?

chmiiller commented 7 years ago

Here are some examples of my app and tiapp.xml configurations. ostiappxml

This is my One Signal -> App Settings screen: osappsettings

And these are my FCM settings: osfcm

shacharudi commented 7 years ago

Thanks @williamrijksen ! I was missing the <application> tag but now it's working great. And thank you @chmiiller for sharing your XML files, it was very helpful! Thanks again for making this module, it's awesome!