03-11-2013 02:34 AM
Dear all,
I would like to say that i am new to Android Runtime. I have an android appliaction to port Blackberry 10. To support Push Message Services for Blackberry, I am currently unable to achieve it. My Android App supporst Google Cloud Messaging Service.
I am trying to follow step by setp instructions but things are not making well.
I read following link very carefully and already REGISTERED to EVALUATE the PUSH SERVICE.
https://developer.blackberry.com/android/apisuppor
But i am facing issues on configure properties like;
http://cpXXX.pushapi.eval.blackberry.com
1. What should be cpXXX in android.cfg file?
2. How to use Push Port?
3. After you register with the Push Service, you need to create a configuration file (the android.cfg file), which
YES I HAVE CREATED andriod.cfg file.
provides the BlackBerry Push configuration and will allow your Android app to work without changing any code or
compiling again.
UNDERSTOOD
Using any .zip utility, add the android.cfg file to the .bar file. You should do this before you sign the .bar package.
How it possible to do this before sign. As bar file only generated after signing?
I really appreciate if anyone can provide working sample for Client.
Regards
Solved! Go to Solution.
03-11-2013 06:52 AM
03-13-2013 08:44 AM
Thank you very much for response.
Unfortunately i am not able to produce android.cfg inside .bar file after sign.
I try thsee 2 ways.
1. Using any .zip utility, add the android.cfg file to the .bar file from ProjectName\bin\classes, before sign the .bar package
2. Create the .cfg file and name it as your project name, drop it in the root directory of your project in eclipse then debug again
Please let me know how to resolve this issue.
Regards
03-13-2013 10:18 AM
as a worst case you could do a lot using the command line editions of the tools eclipse automates. look for blackberry-signer in your eclipse installation folder under plugins somewhere, you can navigate to it with CMD and see what you can do, there are other utilities in there as well.
typically the flow i've found, outside eclipse, is: APK --> BAR --> sign the BAR --> deploy as separate, distinct steps, i believe eclipse hides a few of the stages. this may be an alternative if for whatever reason eclipse isn't working particularly well for you.
I've only just started doing this myself so i can't help you much more than that.
good luck.
03-14-2013 02:42 PM
I got push notification changes in and deployed to device:
1. I have used command line tools to create a bar using apk2bar
2. Uising a zip utility I unziped, added android.cfg and added "Archive-Asset-Name: android/android.cfg" into manifest file and then zipped back to .bar file
3. Then deployed to device which had the debug token installed as part of earlier steps.
03-20-2013 07:52 PM
Issue: getting "android/android.cfg: unknown asset" when adding android.cfg manually via a zip uitility into the bar file
Solution:
Option 1: Add below manual entry to the bar manifest file. (probably not best option to do)
Archive-Asset-Name: android/android.cfg"
Option 2: If you have an APK named {something}.APK (e.g., ‘foo.APK’), then running apk2bar with the ‘-m -ma’ arguments will automatically look for ‘foo.MF’ and ‘foo.CFG’ in the same folder. If they exist, they will be packaged as part of the BAR. HOWEVER, apk2bar also automatically renames the CFG file in the process - instead of ‘foo.CFG’, it appears in the BAR as ‘android\android.cfg’. When the resulting BAR is signed, the android.cfg file will get signed automatically.
Option 3: Put the <projectName>.cfg file under the root of the Android project and then create apk and then repackage it as bar and you will find ‘android\android.cfg’ file present in bar file.
For me since I started with an existing apk file (so just support existing apk on the BB device without any code modification), I prefered option #2.
also refer to: http://supportforums.blackberry.com/t5/Android-Run