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

BlackBerry Push Development

Reply
Highlighted
New Contributor
Posts: 3
Registered: ‎06-27-2014
My Device: BlackBerry Q10
My Carrier: Vodacom

BlackBerry Push on android runtime with aapt --rename-manifest-package parameter

Hi,

 

I have successfully built an BlackBerry10 push app from an .apk but there is one small problem

 

I build the app using  the aapt ‘--rename-manifest-package’ parameter in order to have multiple environments, if there is no push, this works fine.

 

Push requires a permission like:

 

<permission android:name="your.app.name.permission.C2D_MESSAGE" androidSmiley TonguerotectionLevel="signature"/>

<uses-permission android:name=" your.app.name.permission.C2D_MESSAGE"/>

 

This works fine on android but BlackBerry10 gives me:

D/PushMessagingRegistrar(19247343): checking permission for [your.new.app.name] your.new.app.name.permission.C2D_MESSAGE

E/PushMessagingRegistrar(19247343): Access denied to app: your.new.app.name, must have permission your.new.app.name.permission.C2D_MESSAGE

W/System.err(19247343): java.lang.SecurityException: Access denied to app: your.new.app.name, must have permission your.new.app.name.permission.C2D_MESSAGE

W/System.err(19247343):            at com.google.android.gsf.gtalkservice.PushMessagingRegistrar.checkPermission(PushMessagingRegistrar.java:115)

W/System.err(19247343):            at com.google.android.gsf.gtalkservice.PushMessagingRegistrar.onStartCommand(PushMessagingRegistrar.java:46)

W/System.err(19247343):            at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:2656)

W/System.err(19247343):            at android.app.ActivityThread.access$1900(ActivityThread.java:141)

W/System.err(19247343):            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1331)

W/System.err(19247343):            at android.os.Handler.dispatchMessage(Handler.java:99)

W/System.err(19247343):            at android.os.Looper.loop(Looper.java:137)

W/System.err(19247343):            at android.app.ActivityThread.main(ActivityThread.java:5056)

W/System.err(19247343):            at java.lang.reflect.Method.invokeNative(Native Method)

W/System.err(19247343):            at java.lang.reflect.Method.invoke(Method.java:511)

W/System.err(19247343):            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:840)

W/System.err(19247343):            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:607)

W/System.err(19247343):            at dalvik.system.NativeStart.main(Native Method)

 

It works fine though if I do not change the package name, unfortunately it is needed.

can you maybe point me in the right direction?

 

Regards

Jedri Visser