I am creating an application for Android with Marmalade.
I want to receive push notifications.
But I have error (Message Sent to device: ***********: [errorCode = InvalidRegistration];)
when sending a notification to the device.
I did:
1. Google Console
- Created a project and have ProektID;
- Created API key (server Kay);
2. AppHQ
- Created a project and have the API Key and Secret Key;
- Added GCM and API Key from Google;
- Created channel for push notifications;
3 proramm's code ( Marmalade )
- PushNotificationService :: Initialize (a_chKey, a_chSecret_Key); -> OK (
a_chKey and a_chSecret_Key from my applications from AppHQ);
- PushNotificationService :: getInstance (); -> OK;
- const char * deviceToken = s3eDeviceGetString (S3E_DEVICE_UNIQUE_ID);
const char * userName = "WEX_7";
DeviceType deviceType = ANDROID;
const char * Chunnel = "example";
- _pushServiceObj-> RegisterDeviceToken (deviceToken, userName, deviceType, this, SEL_App42CallFuncND (& MyClass :: myRegisterDeviceToken)); -> OK;
- _pushServiceObj-> SubscribeToChannel (channel, userName, this, SEL_App42CallFuncND (& MyClass :: mySubscribeToChannel)); -> OK;
- I send a message from my office on AppNG for userName and have an error -> Message Sent to device: ***********: [errorCode = InvalidRegistration u;
???
1. Do I need somewhere in the code otpralyat API Key or ProektID from Google.
2. Do I need to change AndroidManifest.hml