white label android application installation and ... · basic requirements ! ... utf-16 character...

46
White Label Android Application Installation and Customization Guide

Upload: hoangthu

Post on 04-May-2018

217 views

Category:

Documents


4 download

TRANSCRIPT

Page 1: White Label Android Application Installation and ... · Basic Requirements ! ... UTF-16 character encoding. Run ... The next step is to package the app and submit it to the Play Store

White Label Android Application Installation and Customization Guide

Page 2: White Label Android Application Installation and ... · Basic Requirements ! ... UTF-16 character encoding. Run ... The next step is to package the app and submit it to the Play Store

Background

Page 3: White Label Android Application Installation and ... · Basic Requirements ! ... UTF-16 character encoding. Run ... The next step is to package the app and submit it to the Play Store

Background

§  Application built for civic agencies to bring voting information to the public

§  Code written to make deployment easy, without extensive Android development experience

Page 4: White Label Android Application Installation and ... · Basic Requirements ! ... UTF-16 character encoding. Run ... The next step is to package the app and submit it to the Play Store

Background

https://developers.google.com/civic-information/

Page 5: White Label Android Application Installation and ... · Basic Requirements ! ... UTF-16 character encoding. Run ... The next step is to package the app and submit it to the Play Store

Background

This is your data that Google is serving!

Page 6: White Label Android Application Installation and ... · Basic Requirements ! ... UTF-16 character encoding. Run ... The next step is to package the app and submit it to the Play Store

Background - API

Page 7: White Label Android Application Installation and ... · Basic Requirements ! ... UTF-16 character encoding. Run ... The next step is to package the app and submit it to the Play Store

Background - API

Response includes: §  Contest and Referendum §  Candidate information §  Polling locations §  State and local election official contact info

Page 8: White Label Android Application Installation and ... · Basic Requirements ! ... UTF-16 character encoding. Run ... The next step is to package the app and submit it to the Play Store

Background – White Label

§  App not in the Play Store, but ready to deploy

§  Customizable text and images §  Feature complete and ready to go

Page 9: White Label Android Application Installation and ... · Basic Requirements ! ... UTF-16 character encoding. Run ... The next step is to package the app and submit it to the Play Store

Background – Open Source

§  BSD 3-Clause License §  https://github.com/votinginfoproject/ android-white-label-app

Page 10: White Label Android Application Installation and ... · Basic Requirements ! ... UTF-16 character encoding. Run ... The next step is to package the app and submit it to the Play Store

Basic Requirements

§  Recent Windows, Macintosh, or Linux computer §  Java SDK §  GitHub (use desktop app, or command line) §  Android Studio §  Device drivers for your Android device §  Technical proficiency

Page 11: White Label Android Application Installation and ... · Basic Requirements ! ... UTF-16 character encoding. Run ... The next step is to package the app and submit it to the Play Store

Setup – before you start

First, get your API keys: §  Google Civic Information API Key §  Google Maps Android SDK API Key §  Google Directions API Key §  Google Analytics Tracking ID

Page 12: White Label Android Application Installation and ... · Basic Requirements ! ... UTF-16 character encoding. Run ... The next step is to package the app and submit it to the Play Store

Setup – before you start

Google makes this really easy: https://console.developers.google.com

Page 13: White Label Android Application Installation and ... · Basic Requirements ! ... UTF-16 character encoding. Run ... The next step is to package the app and submit it to the Play Store

Setup – before you start

Google makes this really easy: https://console.developers.google.com

(There are a lot of APIs when you first get to this page, but they’re listed alphabetically)

Page 14: White Label Android Application Installation and ... · Basic Requirements ! ... UTF-16 character encoding. Run ... The next step is to package the app and submit it to the Play Store

Setup – before you start

Google makes this really easy: https://console.developers.google.com

Create these two keys

Page 15: White Label Android Application Installation and ... · Basic Requirements ! ... UTF-16 character encoding. Run ... The next step is to package the app and submit it to the Play Store

Setup – before you start

Page 16: White Label Android Application Installation and ... · Basic Requirements ! ... UTF-16 character encoding. Run ... The next step is to package the app and submit it to the Play Store

Setup – before you start

Google makes this really easy: https://www.google.com/analytics/web

Page 17: White Label Android Application Installation and ... · Basic Requirements ! ... UTF-16 character encoding. Run ... The next step is to package the app and submit it to the Play Store

Setup – Dependencies

Java SDK http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html

Details at: https://github.com/votinginfoproject/android-white-label-app

Page 18: White Label Android Application Installation and ... · Basic Requirements ! ... UTF-16 character encoding. Run ... The next step is to package the app and submit it to the Play Store

Setup – Dependencies

Android Studio – required for Android development: https://developer.android.com/sdk/installing/studio.html

Details at: https://github.com/votinginfoproject/android-white-label-app

Page 19: White Label Android Application Installation and ... · Basic Requirements ! ... UTF-16 character encoding. Run ... The next step is to package the app and submit it to the Play Store

Setup – Dependencies

GitHub https://windows.github.com/

Details at: https://github.com/votinginfoproject/android-white-label-app

Page 20: White Label Android Application Installation and ... · Basic Requirements ! ... UTF-16 character encoding. Run ... The next step is to package the app and submit it to the Play Store

Setup – get the code

Go to https://github.com/votinginfoproject/android-white-label-app

If you have the desktop app installed, click “Clone in Desktop”

Page 21: White Label Android Application Installation and ... · Basic Requirements ! ... UTF-16 character encoding. Run ... The next step is to package the app and submit it to the Play Store

Setup – get the code

Open Android Studio and import the project

To pull updates from GitHub, go to VCS -> Git -> Repository -> Pull Or use the GitHub app or command line

Page 22: White Label Android Application Installation and ... · Basic Requirements ! ... UTF-16 character encoding. Run ... The next step is to package the app and submit it to the Play Store

Setup – install dependencies

Go to Tools -> Android -> SDK Manager

Page 23: White Label Android Application Installation and ... · Basic Requirements ! ... UTF-16 character encoding. Run ... The next step is to package the app and submit it to the Play Store

Setup – install dependencies

Install dependencies listed at https://github.com/votinginfoproject/android-white-label-app

Page 24: White Label Android Application Installation and ... · Basic Requirements ! ... UTF-16 character encoding. Run ... The next step is to package the app and submit it to the Play Store

Setup – Settings Copy xmltemplates/api_keys.xml.template to app/src/main/res/values/api_keys.xml

Page 25: White Label Android Application Installation and ... · Basic Requirements ! ... UTF-16 character encoding. Run ... The next step is to package the app and submit it to the Play Store

Setup – Settings

Open the api_keys.xml file…

it should look like this…

Page 26: White Label Android Application Installation and ... · Basic Requirements ! ... UTF-16 character encoding. Run ... The next step is to package the app and submit it to the Play Store

Setup – Settings

Get your API keys together and update the api_keys.xml file. You can also do this with a plain text editor. Update the Android and Browser keys, and the Analytics Tracking ID

The official only and test election options can be set here, too

Page 27: White Label Android Application Installation and ... · Basic Requirements ! ... UTF-16 character encoding. Run ... The next step is to package the app and submit it to the Play Store

Setup – Settings Copy xmltemplates/app_tracker.xml.template to app/src/main/res/xml/app_tracker.xml Update the Analytics Tracking ID

Page 28: White Label Android Application Installation and ... · Basic Requirements ! ... UTF-16 character encoding. Run ... The next step is to package the app and submit it to the Play Store

Setup – Settings Also, update the “Brand Name” text with what you want the app to be called. This text will be at the top of the home page – and can be edited on line 36 of app/src/main/res/values/strings.xml

Page 29: White Label Android Application Installation and ... · Basic Requirements ! ... UTF-16 character encoding. Run ... The next step is to package the app and submit it to the Play Store

Setup – Settings The Google Maps API key requires some information about your specific build of the project. Detailed instructions are in the repository’s README file.

Page 30: White Label Android Application Installation and ... · Basic Requirements ! ... UTF-16 character encoding. Run ... The next step is to package the app and submit it to the Play Store

Setup – Settings There is also a way to do this in Android Studio from “Build -> Generate Signed APK”

More info can be found at http://developer.android.com/tools/publishing/app-signing.html

Page 31: White Label Android Application Installation and ... · Basic Requirements ! ... UTF-16 character encoding. Run ... The next step is to package the app and submit it to the Play Store

Setup – Settings Copy the APK fingerprint you generate and paste it in the API key in the Google Developer Console

Page 32: White Label Android Application Installation and ... · Basic Requirements ! ... UTF-16 character encoding. Run ... The next step is to package the app and submit it to the Play Store

Setup – Emulator and Devices The Android Emulator does not support Google Play Services, which are required for the Google Maps SDK to function properly. We recommend using an actual Android device for testing. Get documentation about using devices: http://developer.android.com/tools/device.html And drivers for your device: http://developer.android.com/tools/extras/oem-usb.html

Page 33: White Label Android Application Installation and ... · Basic Requirements ! ... UTF-16 character encoding. Run ... The next step is to package the app and submit it to the Play Store

Setup – Build the project

Click the “Run” button in the Run menu…

Page 34: White Label Android Application Installation and ... · Basic Requirements ! ... UTF-16 character encoding. Run ... The next step is to package the app and submit it to the Play Store

Run – Build the project

And the app should load on your device

Page 35: White Label Android Application Installation and ... · Basic Requirements ! ... UTF-16 character encoding. Run ... The next step is to package the app and submit it to the Play Store

Run – Additional Configurations

There are a few more things to consider before packaging the app for submittal to the Play Store §  About, Terms, and Privacy Policy content §  Customized images §  Additional language support

Page 36: White Label Android Application Installation and ... · Basic Requirements ! ... UTF-16 character encoding. Run ... The next step is to package the app and submit it to the Play Store

Run – Additional Configurations

About, Terms, and Privacy Policy content are in app/src/main/res/values/strings.xml

Page 37: White Label Android Application Installation and ... · Basic Requirements ! ... UTF-16 character encoding. Run ... The next step is to package the app and submit it to the Play Store

Run – Additional Configurations

Edit, save, and rebuild You can change any of the text in Android Studio or a plain text editor that supports UTF-16 character encoding.

Page 38: White Label Android Application Installation and ... · Basic Requirements ! ... UTF-16 character encoding. Run ... The next step is to package the app and submit it to the Play Store

Run – Additional Configurations

Translations are also in app/src/main/res/ Each translation gets its own “values” directory

Spanish translations are not available yet, but are in progress

Page 39: White Label Android Application Installation and ... · Basic Requirements ! ... UTF-16 character encoding. Run ... The next step is to package the app and submit it to the Play Store

Run – Additional Configurations

Customize the app’s images by updating files in the app/src/main/res/drawable-{size} directories

Tips: §  Use the same name §  Keep the same pixel dimensions §  There are different sets of images to support

different screen sizes §  More detail at: http://developer.android.com/design/style/iconography.html

Page 40: White Label Android Application Installation and ... · Basic Requirements ! ... UTF-16 character encoding. Run ... The next step is to package the app and submit it to the Play Store

Run – Additional Configurations

Customize the AppIcons (app_icon.png), an Background (bg_home.png) images for a complete visual rebranding. You don’t need to change these, though.

Page 41: White Label Android Application Installation and ... · Basic Requirements ! ... UTF-16 character encoding. Run ... The next step is to package the app and submit it to the Play Store

Publish

That’s everything for setup and configuration! The next step is to package the app and submit it to the Play Store. Google has lots of documentation on this process. http://developer.android.com/distribute/googleplay/

Page 42: White Label Android Application Installation and ... · Basic Requirements ! ... UTF-16 character encoding. Run ... The next step is to package the app and submit it to the Play Store

Publish

The publishing process requires completing several steps. http://developer.android.com/distribute/tools/launch-checklist.html

Page 43: White Label Android Application Installation and ... · Basic Requirements ! ... UTF-16 character encoding. Run ... The next step is to package the app and submit it to the Play Store

Publish

Set up a developer account to get started…

Page 44: White Label Android Application Installation and ... · Basic Requirements ! ... UTF-16 character encoding. Run ... The next step is to package the app and submit it to the Play Store

Publish

The process takes some time to work through, but isn’t particularly difficult. Many of the issues you may encounter are not new, and resolutions can likely be found with a quick Google search. If additional technical support is needed, contact: Jen Tolentino at [email protected]

Page 45: White Label Android Application Installation and ... · Basic Requirements ! ... UTF-16 character encoding. Run ... The next step is to package the app and submit it to the Play Store

Good luck!

Page 46: White Label Android Application Installation and ... · Basic Requirements ! ... UTF-16 character encoding. Run ... The next step is to package the app and submit it to the Play Store

White Label Android Application Installation and Customization Guide