Marmalade - InvalidRegistration;

0 votes
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
asked Sep 24, 2015 in App42 Cloud API-BaaS by alexandr.deryck (10 points)
recategorized Sep 28, 2015 by sushil

1 Answer

0 votes
Hello Alex,

Invalid registration id error comes, in case of registration ID is wrongly created which you pass to the server. Make sure it matches the registration ID the phone receives in the com.google.android.c2dm.intent.REGISTRATION intent and that you're not truncating it or adding additional characters.

 

Could you pleae verify and let me know if that is the case. It wil help me to assit better support to you.

Also, the server key which you have configure in AppHQ Management Console after the success of key genration from Google console is correct (Server Key). Please verify it and let me know if it helps.

Regards,

Himanshu Sharma
answered Sep 24, 2015 by hs00105 (2,005 points)
InvalidRegistrationsch
Hi.

Thank you for your time to my question.

This is my project http://www.mediafire.com/download/n2h802ol4x9jkjo/MyAppHQ.rar

Where can I get the device's token ?

-> RegisterDeviceToken (m_deviceToken, m_userName, m_deviceType, this,
SEL_App42CallFuncND (& MyClass :: myRegisterDeviceToken));

I used: IME and code, and the code from Google ProektID console, and
other values.
Which should I use?

I have code = 200 from RegisterDeviseToken. But when I sended message
->  [errorCode = InvalidRegistrationsch].

What kind of report has to be AndroidManifest.hml?

You can adjust Project for me and for example.

Sincerely, Alex D.
Hello Alex,

Thanks for sharing your sample project with us. I forwarded your sample project to the concern team and they are looking into it, will get back to you on ASAP.

Thanks for your patience.

Regards,
Himanshu Sharma
Really, there is no solution?
Download Widgets
Welcome to ShepHertz Product line forum, where you can ask questions and receive answers from the community. You can also reach out to us on support@shephertz.com
...