03-25-2014 02:30 PM
I'm having issues trying to port an Android app to BlackBerry 10, mainly because it uses Push Services. I been following the instructions in the web page Creating Push-Enabled Android Apps. I have my push credentials from BlackBerry, I created the android.cfg file and put it inside the .bar, I checked that the manifest file in the .bar had the permission Entry-Point-System-Action: _sys_uses_consumer_push, wich it had. And I also added to my project the stand-alone library GooglePlayServices.jar, since my Android app uses the new Google Cloud Messaging Service.
The problems arise when I try to register the push service with the GCM server. The log cat gives me this message:
I believe the problem is that the Google Play Services Library it's not compatible yet with BlackBerry 10, as I have seen in other posts that the library the other developers use is gcm.jar(wich is deprecated).
I wanted to know if I could use the Google Play Services Library or if I had to change my project to the GCM library(wich include changing several pieces of code).
I also wanted to know if there was a way I could get the device PIN in an Android Runtime app.
Thank you for your time
03-26-2014 12:21 PM
I changed the Google Play Service Library for the GCM, and it got a little better. But when I try to register with GCM it throws me the INVALID_SENDER error, so I still don't have the registration ID.
I'm using the SENDER_ID that I used in the Android version. According to a comment in StackOverflow (link), it's not a problem to use the same SENDER_ID with different Android apps, but since this is a BlackBerry App I'm not sure if it turns out to be a problem.
I also don't know if the SENDER_ID from Google is ignored and the app takes the appID provided by BlackBerry. It's that's the case, should I change the SENDER_ID variable? or is something else that I'm missing?
03-27-2014 10:55 AM
Here it is:
<?xml version="1.0" encoding="utf-8"?>
I'm realizing I had a mistake in the ppgurl, I'll fix it and let you know if it worked. Thank you!
03-27-2014 11:05 AM
Are you testing using a real device or simulator? What is the model and full OS version being used?
Have you removed all dependencies on the Google Play libraries?
04-03-2014 09:13 AM
I'm testing in a real device. It's a Dev Alpha with 10.1.0.1485 OS version.
And already checked that the dependencies from Google Play Services are all removed from the project.
Sorry for the delay in answering the las post, I've been busy with other projects, thank you for helping me out
04-03-2014 10:18 AM
May be worth updating your device to the latest OS:
This will get you past any possibility of a bug causing this and clear the cache in the event the app is already registered on the device (lingering in the registry).
04-11-2014 04:57 PM
Hi again! I updated the OS of the device, and now it's saying 'INVALID SENDER' again. I don't know what else to do. I'll re-check for Google Play references, but I'm pretty sure I erased them all.