November 28, 2015

Android Dev Summit

The inaugural Android Dev Summit was held on November 23-24 in Mountain View, California. A gathering for developers to learn and connect with the Google engineers behind Android, Android Dev Summit was composed of two days of deep technical sessions from and networking with the Android engineering team. Day 1 focused on framework skills while Day 2 was about tooling and performance.



It has been a great experience to be a part of the Android Dev Summit. The topics were good. Googlers from the different Android teams were there to answer questions from attendees during the office hours and to assist those who are doing the codelabs.


At the Computer History Museum

If you weren't able to join it live, you can check the codelabs at https://www.code-labs.io/android-dev-summit. Videos from Day 1 and Day 2 of Android Dev Summit have also been uploaded in the Android Developers YouTube channel.


November 24, 2015

Canada Trip

Celine and I went to Canada last month. She will be joining her family in British Columbia.

Some of the places we visited include Canada Place, Steveston Fisherman's Wharf, Downtown Vancouver (Gastown Steam Clock, Vancouver Public Library, Vancouver Art Gallery), Queen Elizabeth Park, and Gulf of Georgia Cannery.

I left Canada on November 22. I went to California first to attend Android Dev Summit (November 23-24) before going back to the Philippines.


November 16, 2015

Google Play Developer Page

One of the things announced during Google I/O 2015 was Developer Pages for Android developers who have apps published on Google Play.


Google Play Developer Page announced during Google I/O 2015

A Developer Page helps promote your brand and apps on Google Play. Instead of the normal list of apps made by a developer, you can now create your branded page with your featured app and other apps. You should have at least one app to create a developer page.

Creating A Developer Page

To create your own Google Play Developer Page, follow the following steps:
  1. Go to the Google Play Developer Console
  2. Click the Gear Icon (Settings) on the left.
  3. Click Developer page.



  4. Click the Get Started button.

  5. Fill up the promotional text (brand description, required) and website (optional)
  6. Add a developer icon (512 x 512, 32-bit PNG) and a header image (4096 x 2304, JPG or 24-bit PNG [no alpha)
  7. You may also choose one of your apps to be featured on your page
  8. Click the Save button at the top of the page
It may take up to one hour for the Developer Page URL to be valid for preview and up to 24 hours for it to be displayed to Google Play users.

Updating A Developer Page

To update your developer page, simply follow the steps in creating one. It may take up to one hour for the changes to be published.

Deleting A Developer Page

If you wanted to delete the developer page that you have made, go to the Google Play Developer Console, click Settings gear icon, click Developer page and then click the Delete page button in the bottom of the site.

My Developer Page

A lot of Android developers have already made their Developer Pages. You can check Google's developer page here. I have also made my own developer page. It's still a work in progress. If you have comments or suggestions, please let me know!


My Google Play Developer Page (desktop view)


My Google Play Developer Page (mobile view)


November 14, 2015

Developing for Android Wear

Android Wear extends the Android platform to wearables. With Android Wear, you can add wearable notifications, create wearable apps, and create watch faces.



To start developing for Android Wear, you would need to download and setup Android Studio. You also need to download the following packages using your SDK Manager:
  • Tools > Android SDK Tools 23.0.0 or higher
  • Tools > Android SDK Platform-tools 23.0.0 or higher
  • Tools > Android SDK Build-tools 23.0.0 or higher
  • Android 4.4W (API 20) or higher > SDK Platform
  • Android 4.4W (API 20) or higher > Android Wear ARM System Image
  • Android 4.4W2 (API 20) or higher > Android Wear Intel System Image
You will also need to install the Android Wear app in your handheld device.

Setting up Android Wear Device

Pair your handheld to your Android Wear Device using the Android Wear app. Enable USB debugging on the wearable by tapping the Build number seven times (in Settings > About). Go to Developer options and enable ADB Debugging. You can connect the wearable to your computer via USB or via Bluetooth.

Setting up Android Wear Emulator

If you do not have an Android Wear device, you can create an emulator. To create an Android Wear Virtual Device:
  1. Open the AVD Manager and click the Create Virtual Device...
  2. Select Wear in the Category and choose between Square, Round Chin, and Round. Click the Next button.
  3. Select the release name (e.g. Lollipop) then click the Next button.
  4. Rename the virtual device (if you like) and change any coniguration based on your preference.
  5. Click the Finish button to create the emulator.


Creating an Android Wear Emulator

You can now start this emulator and pair it to your handheld. Connect the handheld to your computer via USB and run adb -d forward tcp:5601 tcp:5601 (this forwards emulator's communication port to the handheld). Open the Android Wear app in the handheld and connect it to the emulator.

Creating An Android Wear Project

To create a new Android Wear Project on Android Studio and follow the following steps:
  1. Click New Project in the Welcome Screen (or File > New Project if you already have an open project).
  2. Fill up the project name and package name, then click the Next button.
  3. Check Phone and Tablet and select the Minimum SDK.
  4. Check Wear and select API 20: Android 4.4 (KitKat Wear) or higher as the minimum SDK
  5. Click the Next button.
  6. In the Add activity to Mobile window, select Blank Activity then click the Next button. You can change the activity name, layout name, and title.
  7. In the Add activity to Wear window, select Blank Wear Activity then click the Next button. You can change the activity name, and the layout names.
  8. Click the Finish button.



Creating an Android Wear Project

Run the mobile module to run it in your phone or tablet device (or emulator). To run and view the wearable app, run the wear module and choose your emulator. You will see something like the one below:



To learn more about developing for Android Wear, take Udacity's Android Wear Development course, built by Google. You can also join the Android Wear Developers Google+ Community

November 12, 2015

Getting Started with Android Emulators

To develop and test Android applications, you will need a physical device or an Android emulator. The Android SDK has an Android Virtual Device (AVD) emulator that runs on your computer. AVD Manager is a graphical user interface that you can use to create, modify, and manage Android emulators.

To open the AVD Manager:
  • In Android Studio, select Tools > Android > AVD Manager or click the AVD Manager icon () in the toolbar.
  • From the command line, navigate to <sdk-directory>/tools and execute android avd.

AVD Manager from the Command Line

If you open the AVD Manager from the command line, you will see the UI similar to the one below:

To create an Android Emulator, click the Create button. Fill up the name, and select the device, target, CPU/ABI, and skin. You can also add hardware functionalities, like keyboard, camera and SD card. Click the OK button to create the emulator.

AVD Manager from Android Studio

If you open the AVD Manager from Android Studio, you will see a different UI:

To create an Android Emulator, click the Create Virtual Device. Select a device configuration then click Next (If you want a new configuration, click the New Hardware Profile instead. Select the System Image OS name and API Level then click Next. Fill up the name and check the configuration then click Finish.

Starting the Android Emulator

You can start an emulator by selecting it in the AVD Manager and clicking the green run image (or the Start button if you run AVD Manager from the command line). When running an app from Android Studio, it will install and launch on the running emulator. If an emulator is not yet open, you can launch it in the Device Chooser dialog. From the command line, you can use the adb install <apk-path> to launch the APK in your emulator.

x86 Emulators and HAXM

When using an x86 system image for an Android Virtual Device (AVD), you should install HAXM (Hardware Accelerated Execution Manager). Check out this post on how to setup and install HAXM.

Using an Android emulator allows you to see how your app will look and behave in an actual device. There are some limitations though (like you can't call from emulators). Read more about the Android emulator here. Other than using a physical device or an AVD, you can also use other third-party emulators. I am using Genymotion most of the time for development.