Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Android™ Runtime Development

Reply
Retired
gbeukeboom
Posts: 2,559
Registered: ‎10-16-2009
My Device: BlackBerry Z10

Re: Many question about PUSH implementation (within Eclipse environment)


gumpyboy wrote:

Hi matt,

 

I've unzipped the signed .bar file, and yes, it do have the android.cfg file just like your example, like this :

 

<?xml version="1.0" encoding="utf-8"?>
<android>
     <push>
          <appid>xxxx-adasdasxcasfaefasdasdefwef</appid>
          <ppgurl>https://cpxxxx.pushapi.eval.blackberry.com</ppgurl>
          <tokenprefix>bb-</tokenprefix>
     </push>
</android>

but is still generate error : "handleRegistration: registrationId = null, error = SERVICE_NOT_AVAILABLE, unregistered = null"

 

am I still missing something here?


From the device-side you should be using HTTP for the ppgurl not HTTPS. HTTPS is only used on the server side. Please try using:
http://pushapi.eval.blackberry.com

 

Let me know if that helps to resolve the issue.

Garett
@garettBeuk
--
Goodbye everybody!
Contributor
gumpyboy
Posts: 42
Registered: ‎09-25-2010
My Device: Not Specified

Re: Many question about PUSH implementation (within Eclipse environment)

Thanks garett, i've tried that, removed the https and now using the http only, but still got the same error,

still no clue..

 

is it because because i'm referencing to google gcm.jar ?

Retired
gbeukeboom
Posts: 2,559
Registered: ‎10-16-2009
My Device: BlackBerry Z10

Re: Many question about PUSH implementation (within Eclipse environment)

Any chance you are testing a debug version of the app? If so, when was the debug token initially created?

Garett
@garettBeuk
--
Goodbye everybody!
Contributor
gumpyboy
Posts: 42
Registered: ‎09-25-2010
My Device: Not Specified

Re: Many question about PUSH implementation (within Eclipse environment)

I'm using dev alpha device for testing, and it has debug token, issued date Dec 19, 2012,
Retired
gbeukeboom
Posts: 2,559
Registered: ‎10-16-2009
My Device: BlackBerry Z10

Re: Many question about PUSH implementation (within Eclipse environment)

Please try again with a new debug token. If the old token was created before push permissions were applied then it would not have the proper permissions to allow you to test Push.

Garett
@garettBeuk
--
Goodbye everybody!
Developer
ChernyshovYuriy
Posts: 116
Registered: ‎11-18-2010
My Device: BlackBerry PlayBook

Re: Many question about PUSH implementation (within Eclipse environment)

Hello.
We have the same issue with push, all credentials are collect to the config file and sent to the server, then we get e message "Successfully registered" with an ID, then we (our mob app) went to the push (this feature is working!) and the other person in contact list send to us a message (a message to push), at our server we have got a message "The request has been accepted for processing" and that's all .... no message delivery to mob app. Also, we use BBM (official blackberry messenger) to use push service - no luck. So I assume push is not working properly yet. Any other has try to implement push service on BB10 with success?
Retired
gbeukeboom
Posts: 2,559
Registered: ‎10-16-2009
My Device: BlackBerry Z10

Re: Many question about PUSH implementation (within Eclipse environment)

Push is working fine, I have tested it in many many apps on BlackBerry 10 and have worked with numerous devs that have this working. If you continue to have issues please start a new thread and I will help out from there :smileyhappy:

Garett
@garettBeuk
--
Goodbye everybody!
Contributor
gumpyboy
Posts: 42
Registered: ‎09-25-2010
My Device: Not Specified

Re: Many question about PUSH implementation (within Eclipse environment)

@Garett,


:Yes: YES, now the push is working, I created new debug token

i've looked up the debug token details, in the system actions, it now has the sys_use_consumer_push which i don't see earlier.

 

Thanks Garett .. all questions solved now..

 

 

Retired
gbeukeboom
Posts: 2,559
Registered: ‎10-16-2009
My Device: BlackBerry Z10

Re: Many question about PUSH implementation (within Eclipse environment)

FANTASTIC! Great to hear :smileyvery-happy:

Garett
@garettBeuk
--
Goodbye everybody!
New Contributor
sohayb1987
Posts: 2
Registered: ‎03-11-2013
My Device: BlackBerry Z10

Re: Many question about PUSH implementation (within Eclipse environment)

Hello,

i tried everything mentioned in this thread, everything looks just fine, the .cfg file and values, the debug token and all is great. the thing is i'm still getting the same error :smileysad: please help 

here is the error stack trace:

BroadcastReceiver: BroadcastReceiver trying to return result during a non-ordered broadcast
BroadcastReceiver: java.lang.RuntimeException: BroadcastReceiver trying to return result during a non-ordered broadcast
BroadcastReceiver: at android.content.BroadcastReceiver.checkSynchronousHint(BroadcastReceiver.java:451)
BroadcastReceiver: at android.content.BroadcastReceiver.setResult(BroadcastReceiver.java:343)
BroadcastReceiver: at com.google.android.gcm.GCMBroadcastReceiver.onReceive(GCMBroadcastReceiver.java:56)
BroadcastReceiver: at android.app.ActivityThread.handleReceiver(ActivityThread.java:1798)
BroadcastReceiver: at android.app.ActivityThread.access$2400(ActivityThread.java:117)
BroadcastReceiver: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:981)
BroadcastReceiver: at android.os.Handler.dispatchMessage(Handler.java:99)
BroadcastReceiver: at android.os.Looper.loop(Looper.java:123)
BroadcastReceiver: at android.app.ActivityThread.main(ActivityThread.java:3687)
BroadcastReceiver: at java.lang.reflect.Method.invokeNative(Native Method)
BroadcastReceiver: at java.lang.reflect.Method.invoke(Method.java:507)
BroadcastReceiver: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:867)
BroadcastReceiver: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:625)
BroadcastReceiver: at dalvik.system.NativeStart.main(Native Method)
GCMBaseIntentService: handleRegistration: registrationId = null, error = SERVICE_NOT_AVAILABLE, unregistered = null
GCMBaseIntentService: Registration error: SERVICE_NOT_AVAILABLE
GCMBaseIntentService: Scheduling registration retry, backoff = 486646 (384000)

this is my cfg file values:

appid:1234-h59724e29ryRRM110235r513544a1l277e8

ppgurl:https://cp1234.pushapi.eval.blackberry.com

tokenprefix:bb-