American West time 18th morning, that is our 19th early morning, the BlackBerry DevCon activity is grandly held, PlayBook 2.0 development beta release with it. An important feature of PlayBook 2.0 is the support for Android apps. So, how do you port Android apps to playbook? I tested it myself and successfully ran the Android app on playbook, so let's take a look at the specific method.
Because the Playbook 2.0 has a component with an Android player, the Android app only needs to make a simple conversion and convert it to a playbook bar file to run on the playbook. The official webpage for converting Android apps to playbook apps is as follows:
Https://bdsc.webapps.blackberry.com/android/
As you can see from the page above, there are three ways to convert an Android app to a playbook bar file:
- Online conversion via web application
- Transitioning through Eclipse plug-in in the Eclipse environment
- Converting using the command line tool
The simplest way to convert Web pages online is to talk about the specific preparation and conversion process for this approach.
1. Preparation of the Android SDK
The conversion process requires the support of the Android SDK and requires an early installation of the Android SDK, see the relevant article for the installation of the Android SDK.
2. Preparation of PlayBook 2.0
In order to finally test the conversion of the application, there must be a Playbook 2.0 environment, if you have a playbook in hand, you can register to the following website, upgrade playbook operating system to 2.0 version.
https://bdsc.webapps.blackberry.com/android/beta/bbtablet20/register/
Register for a period of time (according to the official term is within one hours), check the software upgrade on playbook (software Update) to start upgrading the Playbook operating system. The specific operation in the above site has guidelines.
If you do not have playbook in hand, only through the simulator test, click on the following URL simulator can download a playbook simulator:
https://bdsc.webapps.blackberry.com/android/tool/
3. Request a signature key
The app needs to be signed during the conversion of the Android app, and the application signature requires a signing key. So we need to apply for a signature key on the BlackBerry official website.
An application for Playbook signing key is presented on the BlackBerry official website, please refer to:
Https://bdsc.webapps.blackberry.com/android/documentation/request_a_code_signing_key_1767016_11.html
The approximate process is as follows:
Please go to the following website to fill out the application
Https://bdsc.webapps.blackberry.com/android/signingkey
Need to fill in the name, company name and other basic information, but also need to fill out an email address and a PIN code, these two more critical, the final signature key will be sent to the completed e-mail address, install the signature needs to use the PIN code. Note that the PIN code here is not related to the phone or the pin code of the playbook, you fill out a 6 to 10 digits on the line, such as 1234567890, fill it out must remember, the following need to use.
You will then receive an e-mail with a signed key with two CSJ files:
RIM Development Key (RDK)
Berry PlayBook Debug Token (PBDT)
The previous practice was to import the CSJ file into the Playbook development environment to generate the P12 key file and then sign it directly in the Playbook development environment using the signature tool. Now with the online tool you can use the above CSJ file directly on the Web page. Save two CSJ files and use them for a while.
4. First-time conversion
With the signing key ready, you can start converting Android apk files to the website, because the first time you need to set up a signing key, the process of signing the first time is a bit special. The process is as follows:
Open the following Web pages from your browser:
https://bdsc.webapps.blackberry.com/android/bpaa/
After opening the Welcome page appears below, click "Go>>" to the next step:
Then fill in your email address and select "I already have BlackBerry Tablet OS Signing Keys" and "I had RAD and agree to the RIM SDK License Agreement" two is to tell the server that you have applied for the signing key. Note Do not select the "I has already configured my computer for signing" entry so that the signing Key Settings page will start. When you set it up for the first time, you can choose it by signing it later.
Click "Next" after selecting
You will then be prompted to authorize the subsequent process by clicking on the "Set Applet Permissions" button. Click "Next" after authorization.
Further needs to verify your APK file, you need to choose the APK file ready for conversion and the directory of the Android SDK, click on the "Start Test" button to verify.
If the checksum is successful, the "Your app is compatible with the BlackBerry runtime for Android apps" means that your Android app is compatible with the Android operating environment on the playbook.
Click on the "Repackage & Submit" button to convert after success.
Then go to the critical step, because the signature key is not configured, and the signature key is then prompted to configure it.
The requirements to be configured include:
- RIM development Key. csj file
This file can be found in the signature key message.
- BlackBerry PlayBook Debug token. csj File
This file can be found in the signature key message.
- KeyStore Password
Set the password for the local certificate store, set a password to your liking, and note that you need to enter it two times
- CSK Password
CSK password, also set one according to your preference, also need to input two times
- Pin code to be filled in when registering
Here is the application key is filled in the 6 to 10 digits of the PIN code.
- Certificate path, file name
Specify a path and file name, and the resulting information will remain in this file.
- Company Name
Fill in their company name, it seems that the server does not have a strict calibration of the company name, fill in the company pinyin can be, the key is to remember the name, the conversion needs to be used later.
When you are finished, click "Configure".
After the configuration is complete, the final server converts the specified apk file into a bar file and signs the bar file. The resulting file is displayed in the results page, such as:
This completes the first conversion work, and completes the signing key configuration work, the subsequent conversion work is not so complicated.
5. Subsequent application conversions
In the subsequent Android app conversion process, you do not need to configure the signing key again, you can directly use the certificate file generated at the first conversion.
The URL of the conversion is not changed, or
https://bdsc.webapps.blackberry.com/android/bpaa/
However, to the "Agree to License" page, you need to select "I have already configured my computer for signing", telling the server that the signing key has been configured on the current machine, such as:
The conversion process also needs to select the local apk file, and then check the APK file, the checksum process is the same as the first conversion.
After the validation of the app is successful, you need to select the local certificate file and fill in the password for the packaging and Signing page.
The certificate file path here is the certificate file path set at the time of the first conversion.
The next step is to enter the KeyStore password and the CSK password, which is the two password set at the first conversion.
The last one is the company name, which is also set at the first conversion.
Click "Sign" button to complete the online conversion, the success of the page will show a green success message, to the effect that the bar file has been generated and signed.
Results such as:
The next step is the results page, which tells you where the generated bar file is.
6. Application Testing
After the application of the conversion can be tested on the playbook, the basic process of testing is to start the development of Playbook Debugging mode, and then record playbook IP address, Finally, the converted bar file is uploaded to playbook by the Blackberry-deploy tool.
Of course, the bar file upload to playbook on the method of testing there are many, here is not detailed, the students who have doubts about this step can refer to other articles.
In the end, I did the test of the Android app is too small, photography out to see what effect. Let's try it on your own terms.