Android-User Guide
Total Page:16
File Type:pdf, Size:1020Kb
Android User Guide Published: 2015-01-07 SWD-20150107143657691 Contents Getting started.............................................................................................................................................7 Process overview............................................................................................................................................7 Register for a BlackBerry ID account.............................................................................................................. 8 Install an app repackaging tool....................................................................................................................... 9 Plug-in and command-line tools.................................................................................................................19 Check the compatibility of .apk files..............................................................................................................20 BlackBerry tools for Android development.................................................................................................... 20 Porting to BlackBerry 10 OS...................................................................................................................... 51 Publish to BlackBerry World...................................................................................................................... 63 Documentation This documentation describes how you can use the BlackBerry Tools for Android development to repackage your apps and port them to the BlackBerry 10 OS. View the Android Runtime Documentation as a PDF Documentation 5 Documentation 6 Getting started Learn how to use the BlackBerry Tools for Android apps to repackage your Android apps and become a BlackBerry World vendor. Introduction to BlackBerry Runtime for Android apps The BlackBerry Runtime for Android apps allows you to run Android apps on BlackBerry 10 devices. Repackaging your Android apps to run on the BlackBerry Runtime allows you to reach a brand new set of potential customers. When you repackage your Android apps as .bar files, you can submit them as BlackBerry 10 apps to the BlackBerry World storefront. Process overview You probably already have an established workflow that you use when you develop Android apps. Bringing your Android apps over to the BlackBerry Runtime allows you to access a whole new group of potential customers. However, before you can distribute your Android apps through the BlackBerry World storefront, they must be repackaged as signed .bar files. There are several options for repackaging your Android apps as BlackBerry 10 compatible .bar files. Chances are, one of these options fits nicely into your current workflow. Tokens, tools, and certificates You need a few items in order to test, debug, and repackage Android apps as BlackBerry 10 compatible .bar files. These items include the following: • A BlackBerry ID account • A BlackBerry app repackaging tool • A BlackBerry ID Signing token and Developer certificate • A BlackBerry 10 device or the BlackBerry 10 Device Simulator • A BlackBerry device debug token • A BlackBerry World Vendor account Stages of the overall process The following diagram illustrates the overall process that you must follow before you can distribute your Android apps through the BlackBerry World storefront. Getting started 7 1. Register for a BlackBerry ID account on page 8 2. Install an app repackaging tool on page 9 3. BlackBerry tools for Android development on page 20 4. Publish to BlackBerry World on page 63 Register for a BlackBerry ID account You must register for a BlackBerry ID account before you begin repackaging your Android apps as .bar files for BlackBerry 10 devices. You can use your BlackBerry ID account to: • Create a BlackBerry ID token and a developer certificate to use with the BlackBerry Signing Authority Tool. These two items allow you to test, debug, repackage, and sign all of your Android apps. • Login to the BlackBerry World vendor portal, where you can create and manage your account to distribute your signed digital goods. Follow these steps to register for a BlackBerry ID account: 1. Go to BlackBerry ID - Signup website. 2. Enter your information on the form. 3. Click Submit. Android apps on the BlackBerry Runtime for Android apps Before you get started repackaging your Android apps as .bar files that run on BlackBerry 10 devices, review the following information so you understand the differences between running apps on an Android device and running apps on the BlackBerry Runtime for Android. If you're developing for BlackBerry 10 OS version 10.3 or 10.3.1, you can use the BlackBerry Runtime for Android apps to run Android Jelly Bean 4.3 apps. If you're developing for a previous version of BlackBerry 10 OS, use Android Gingerbread 2.3.3. Note: For information on repackaging an Android app for the BlackBerry PlayBook, see Plug-in Repackaging Tool for BlackBerry PlayBook. UI differences in repackaged Android apps Here are some of the differences that you can expect to see in your Android app's UI after it has been repackaged to run on a BlackBerry 10 device. Getting started 8 UI characteristic What you can expect Navigation Since most BlackBerry 10 devices do not have a Back key, users must tap the Back button that appears at the bottom of the screen to return to a previous screen. Note: A navigation toolbar with a Back button appears at the bottom of most Android apps. For apps that use full-screen mode (for example, games), users can swipe down from the top of the screen to display the navigation toolbar. App menu Since most BlackBerry 10 devices do not have a Menu key, users must swipe down from the top of the screen to display the app menu. Notifications App notifications, including the status of activities that are occurring in the background (for example, music that's playing, or files that are downloading), appear in the BlackBerry Hub. Designing for specific BlackBerry 10 devices You can optimize the layout of your app's UI components to accommodate the characteristics of a specific BlackBerry 10 device. Information on characteristics such as screen size, aspect ratio, display type, and screen density can be found using the links provided below. For information on specific BlackBerry 10 device screen characteristics, see Different screen sizes. For information on the UI framework, and the visual style of the BlackBerry 10 OS, see UI Guidelines for BlackBerry 10. Install an app repackaging tool You can install any one of the tools shown below to repackage your app as a .bar file that you can submit for distribution through the BlackBerry World storefront. Repackaging tool Description The BlackBerry Plug-in The Android Studio plug-in allows you to: for Android Studio • Create a BlackBerry ID token and developer certificate. Getting started 9 Repackaging tool Description • Use the BlackBerry ADB Proxy Manager to run and debug your Android app on a BlackBerry device. • Verify that your Android app is compatible with the BlackBerry Runtime. • Repackage your Android app as a BlackBerry .bar file. • Use Android Studio to sign your Android app. Get the BlackBerry Plug-in for Android Studio. The BlackBerry Plug-in The BlackBerry Plug-in for Android Development Tools for Eclipse allows you to: for Android Development Tools for • Create a BlackBerry ID token and developer certificate. Eclipse • Use the BlackBerry ADB Proxy Manager to run and debug your Android app on a BlackBerry device. • Verify that your Android app is compatible with the BlackBerry Runtime. • Repackage your Android app as a BlackBerry .bar file. • Use Eclipse to sign your Android app. Get started with the BlackBerry Plug-in for Android Development Tools for Eclipse. The BlackBerry The command-line tools are a set of command-line utilities that can do everything Command-line tools that the above plug-ins do, but from a command-line prompt. You can also use the command-line tools from a point and click UI. Get started with the BlackBerry Command-line tools. Create a BlackBerry ID Signing token A BlackBerry ID Signing token and Developer certificate are used to sign your repackaged BlackBerry 10 apps. An app must be signed before it can be distributed through the BlackBerry World storefront. You must have a BlackBerry ID account to create a BlackBerry ID Signing token and Developer certificate. To register for a BlackBerry ID account and create a BlackBerry ID Signing token: 1. Go to the BlackBerry ID portal and do one of the following: • Click the Don't have a BlackBerry ID? Create one link. • Enter your BlackBerry ID account credentials and click Sign In. 2. Enter and confirm the password that you want to use to secure your BlackBerry ID Signing token. This password can also be used when you create your Developer certificate. Note: Many developers use their BlackBerry ID account password for their BlackBerry ID Signing token and Developer certificate. This can make those passwords easier to remember. If you forget the password for Getting started 10 your BlackBerry ID Signing token, it cannot be retrieved or reset for you. You must create another BlackBerry ID Signing token. 3. Accept the license agreement and click Get Token. 4. Download and save the BlackBerry ID keystore file. Note: The BlackBerry ID Signing token is included in a keystore file, called bbidtoken.csk, that's saved in your Downloads folder. The BlackBerry Signing Authority service uses your BlackBerry ID Signing token for authentication when you