Tuesday, May 16, 2017

Android Things Developer Preview 4

Posted by Wayne Piekarski, Developer Advocate for IoT



Today, we are releasing the next Developer Preview 4 (DP4) of Android Things, bringing new supported hardware, features, and bug fixes to the platform. The goal of Android Things is to enable Android Developers to quickly build smart devices, and seamlessly scale from prototype to production using a Board Support Package (BSP) provided by Google.

AIY Projects and Google Assistant SDK

Earlier this month, we announced a partnership with AIY Projects, enabling Android Things support for the Raspberry Pi-based Voice Kit. And now with DP4, the necessary drivers are provided to support the Google Assistant SDK on all Android Things certified development boards. Learn more from the instructions in the sample.
New hardware and driver support

We are now adding a new Board Support Package for the NXP i.MX7D, which supports higher performance than the i.MX6UL while still using a low power System on Module (SoM) design. Support for Inter-IC Sound Bus (I2S) has been added to the Peripheral I/O API, now enabling audio drivers to be written in user space for sound hardware connected via an I2S bus. The AIY Voice Kit sample demonstrates how to use I2S support for audio. We have also provided the ability for developers to enable/disable Bluetooth profiles at run time.
NXP i.MX7D System on Module
Production hardware sample

Android Things is very focused on helping developers build production-ready devices that they can bring to market. This means building custom hardware, in addition to the software running on the Android Things system-on-module (SoM). As a part of this effort, we have released Edison Candle, the first in a series of production samples showcasing hardware and software designed to work together. The code is hosted on GitHub and the hardware design files are on CircuitHub, and can be easily fabricated by many 3rd party companies.
Edison Candle sample with source and schematics



Thank you to all the developers who submitted feedback for the previous developer previews. Please continue sending us your feedback by filing bug reports and feature requests, and asking any questions on stackoverflow. To download images for DP4, visit the Android Things download page and find the changes in the release notes. You can also join Google's IoT Developers Community on Google+, a great resource to get updates and discuss ideas, with over 4,900 members. We also have a number of great talks about Android Things and IoT at Google I/O, which you can view via live stream or as a recording later.








Friday, May 12, 2017

Here comes Treble: A modular base for Android

Posted by Iliyan Malchev, Project Treble team lead


On the Android team, we view each dessert release as an opportunity to make
Android better for our users and our ecosystem partners. One thing we've
consistently heard from our device-maker partners is that updating existing
devices to a new version of Android is incredibly time consuming and costly.



With Android O, we've been working very closely with device makers and silicon
manufacturers to take steps toward solving this problem, and we're excited to
give you a sneak peek at Project Treble, the biggest change to the low-level
system architecture of Android to date.



Life of an Android Release



First, it's helpful to understand the "life of an Android release". There are
several steps a new Android release goes through before getting into the hands
of users:





  1. The Android team publishes the open-source code for the latest release to
    the world.

  2. Silicon manufacturers, the companies that make the chips that power Android
    devices, modify the new release for their specific hardware.

  3. Silicon manufacturers pass the modified new release to device makers — the
    companies that design and manufacture Android devices. Device makers modify the
    new release again as needed for their devices.

  4. Device makers work with carriers to test and certify the new release.

  5. Device makers and carriers make the new release available to users.



With Project Treble, we're re-architecting Android to make it easier, faster and
less costly for manufacturers to update devices to a new version of Android.






The Vendor Interface



Android was unveiled in 2007 as a free, open-source mobile operating system.
From the beginning, we intended Android to be scaled across a variety of
manufacturers. We knew that consistency of API was important for developers, so
we created a compatibility program for the Developer API specified by the href="https://source.android.com/compatibility/">Compatibility Definition
Document (CDD) and its associated Compatibility Test Suite (CTS), now
comprising over a million tests.



The result today is that app developers can write a single app that works across
over a billion devices running on different hardware from different
manufacturers.








Project Treble aims to do what CTS did for apps, for the Android OS framework.
The core concept is to separate the vendor implementation — the
device-specific, lower-level software written in large part by the silicon
manufacturers — from the Android OS Framework.



This is achieved by the
introduction of a new vendor interface between the Android OS framework
and the vendor implementation. The new vendor interface is validated by a Vendor
Test Suite (VTS), analogous to the CTS, to ensure forward compatibility of the
vendor implementation.





Benefits of Project Treble



Today, with no formal vendor interface, a lot of code across Android needs to be
updated when a device moves to a newer version of Android:






With a stable vendor interface providing access to the hardware-specific parts
of Android, device makers can choose to deliver a new Android release to
consumers by just updating the Android OS framework without any additional work
required from the silicon manufacturers:






Project Treble will be coming to all new devices launched with Android O and
beyond. In fact, the new Project Treble architecture is already running on the
Developer Preview
of O
for Pixel phones.



In addition to the architectural changes, we're working with our silicon and
device partners to take their code changes, such as features for a carrier
network in a specific country, and move them into the common Android Open Source
Project (AOSP) codebase. For example, Sony and Qualcomm contributed dozens of
features and hundreds of bugfixes to Android O so they no longer need to rework
these patches with each new release of Android.



We plan to publish the full documentation for Project Treble on href="https://source.android.com/">source.android.com with the launch of O
later this summer.

Track your subscriptions better with the Google Play Developer API

Posted by Neto Marin, Developer Advocate


Back in 2012, we introduced free trials support for Android app subscriptions. A
free trial runs for a period of time that you set and then automatically
converts to a full subscription based on the subscription's billing interval and
price. Google Play supports free trials for all subscription types. Check out href="https://developer.android.com/google/play/billing/billing_subscriptions.html#trials">Free
trials in our documentation for more details.



This feature is an important tool for user conversion because the user can try
your app or game before committing to paying. To help you track the
subscription status better, we are adding a third "paymentState" value to the href="https://developers.google.com/android-publisher/api-ref/purchases/subscriptions#resource-representations">Purchases.subscriptions
API (on Google
Play Developer API
) to represent that the user is in a free trial. Possible
values are:


  • 0 - Payment pending

  • 1 - Payment received

  • 2 - Free trial




Since there is a new possible value, it is necessary to check how your back end
is handling the paymentState parameter. If you are doing something like this,
you potentially could have a problem:



// WARNING: Don't do this!
if (paymentState == 1) {
// User is in normal state
} else {
// Handle user in grace period # this would now be a bug
}


As a best practice, and to avoid issues on future updates, we recommend checking
specifically for each possible case, like this:



if (paymentState == 0) {
// Subscriber with payment pending
} else if (paymentState == 1) {
// Subscriber in good standing (paid)
} else if (paymentState == 2) {
// Subscriber in free trial
}


You can check the href="https://developers.google.com/android-publisher/api-ref/purchases/subscriptions#resource-representations">Purchases.subscriptions
documentation for more details. And if you're not offering free trials in your
app or game, don't miss the chance to increase user conversions by letting them
have a taste of your app - check out our documentation on href="https://developer.android.com/google/play/billing/billing_subscriptions.html#trials">Free
trials.

Monday, May 8, 2017

Build a portfolio of apps as you improve your Android dev skills with the new Advanced Android course


Posted by Jocelyn Becker, Senior Program Manager, Android Training



The Advanced Android App
Development
online course has been updated, improved, and extended to lead
you through building a range of sample apps to learn different advanced aspects
of app development.




With the latest self-paced course, you'll learn about fragments by building a
mix-and-match game to build Android characters.








You'll build a music quiz app to learn about media players and then create an
app that uses widgets to let users plant and water virtual plants.








You'll learn how to use libraries, by building an app that uses Google's Mobile Vision
API to recognize whether you're smiling or frowning. To learn how to make your
app aware of its location, you'll use the Google Places API with geo fences to
silence your phone where a loud notification would spoil the mood.




When you've finished the course, you'll know how to push notifications from a
server to client Android apps using Firebase Cloud Messaging, and how to test
your user interface with Espresso, a tool that that comes built into Android
Studio. Finally, the course covers how to publish your app to Google Play.




Android experts from Google worked with course developers at Udacity to create
the new lessons. The course is the next stage in your journey to become a
seasoned Android developer; we expect that you will have completed the Developing Android Apps course
before taking the advanced course.




The course is available online at Udacity; you can take it in your own time at
your own pace. It is available free, or you can take it as part of the Udacity
Android Developer Nanodegree.




Go build some awesome apps! Start learning now at https://www.udacity.com/course/ud855.

User experience tips to help you design your app to engage users and drive conversions


By Jenny Gove, Senior Staff UX Researcher, Google Play



We know you work hard to acquire users and grow your customer base, which can be
challenging in a crowded market. That's why we've heard from many of you that
you find tools like store
listing experiments
and universal
app campaigns
are valuable. It's equally important to keep customers engaged
from the beginning. Great design and delightful user experiences are fundamental
to doing just that.




We partnered with AnswerLab to conduct comprehensive user experience research
across a variety of verticals; including e-commerce, insurance, travel, food
ordering, ticket sales and services, and financial management. The resulting
insights may help you increase engagement and conversion by providing guidance
on useful and usable functionality.




The best app experiences seamlessly guide users through their tasks with
efficient navigation, search, forms, registration and purchasing. They provide
great e-commerce facilities and integrate effective ordering and payment
systems. Ultimately, an engaging app begins with attention to usability in all
of these areas. Learn tips on:





  • Navigation & Exploration

  • In-App Search

  • Commerce & Conversions

  • Registration

  • Form Entry

  • Usability and Comprehension




You can read the full article, design
your app to drive conversions
, on the Android Developers website, complete
with links to developer resources. Also get
the Playbook for Developers app
to stay up-to-date with features and best
practices that will help you grow a successful business on Google Play.






How useful did you find this blogpost?


? ? ? ? ?







Thursday, May 4, 2017

Running Android Things on the AIY Voice Kit



Posted by Ryan Bae, Android Things



A major benefit of using Android Things is the
ability to prototype connected devices and quickly scale to full commercial
products. To further that goal, the Android Things team is partnering with AIY
Projects
, a new initiative to bring do-it-yourself artificial intelligence
to makers. Today, the AIY Projects team launched their first open source
reference project: a Raspberry Pi-based Voice
Kit
with instructions to build a Voice User Interface (VUI) that can use
cloud services (like the new Google Assistant SDK or Cloud Speech API) or run completely
on-device with TensorFlow. We are releasing a special Android Things Developer
Preview 3.1
build for Raspberry Pi 3 to support the Voice Kit. Developers
can run Android Things on the Voice Kit with full functionality, including
integration with the Google Assistant SDK. To get started, visit the AIY
website
, download the latest Android Things Developer
Preview
, and follow the instructions.




The Voice Kit ships out to all MagPi Magazine subscribers on May
4, 2017, and the parts list, assembly instructions, source code, as well as
suggested extensions are available on AIY Projects website. The complete kit is
also for sale at over 500 Barnes & Noble stores nationwide, as well as UK
retailers WH Smith, Tesco, Sainsburys, and Asda.




We are excited to see what you build with the Voice Kit on Android Things. We
also encourage you to join Google's IoT Developers
Community
and Google
Assistant SDK Developers
on Google+, a great resource to keep up to date and
discuss ideas with other developers.

Tuesday, May 2, 2017

Why you should localize your app or game for Middle East and North Africa





By Mohammad El-Saadi, Business Development, Google Play



The Middle East and North Africa (MENA) region is a fast growing market for app and game developers on Google Play, and localizing is crucial to making the most of the opportunity. For example, the main grossing apps & games in Saudi Arabia have localized their store listings and their actual app and game on Google Play.



The British team behind the Skyscanner travel app had already localised it into more than 15 languages, yet the launch in Arabic was a huge milestone for them. Arabic speaking users really appreciated the localization and the app's average user rating increased from 4.62? to 4.77? after localization. Users engaged with the app longer, with an increase of 30% in their average session duration. Additionally 50% more travellers have been redirected to Skyscanner partners to book flight, hotel and car hire deals.





Skyscanner opening screen in English and in Arabic

But how difficult is it to correctly localize your app or game to Arabic?



The team at Skyscanner managed to develop Right-To-Left (RTL) Arabic language support within the app in two weeks: "Our initial fear was that we would need lots of manual coding for the layouts. However, the Android layout system handled all of the cases really well. We were already using *Start and *End margin and padding in line with guidelines, but there's also Android Studio support and Lint check to fix any issues automatically." says Mate Herber, Software Engineer.



Many other top apps and games developers are successfully investing in localizing for MENA users. For example, when game developer Pocket Gems localized War Dragons, the installs by Arabic speaking users tripled. Their percentage of revenue from Arabic language players also went from effectively 0% to ~1.5%.



We just refreshed the Now in Arabic collection (MENA only) with 16 newly localized apps and games, including titles like Netflix, Periscope and Transformers. It will be live until May 11 on Google Play in the following countries: Algeria, Bahrain, Egypt, Jordan, Kuwait, Lebanon, Morocco, Oman, Qatar, Saudi Arabia, Tunisia and United Arab Emirates.





Check our Localization Checklist for best practices when localizing for any language, and our Going Global Playbook. When your app or game in Arabic is ready, you can self-nominate to be part of future refreshes of the Now in Arabic collection by filling in this form.





How useful did you find this blogpost?
? ? ? ? ?