Showing posts with label Android. Show all posts
Showing posts with label Android. Show all posts

Friday, May 19, 2017

Make more money with subscriptions on Google Play

Posted by George Audi, Tom Grinsted and Larry Yang, Google Play


The subscription business model is one of the best ways to make more regular, reliable, and recurring revenue on Android and Google Play. In fact, both developers and users love subscription apps so much that we�ve seen a 10X growth in consumer spend over the past three years and double the number of active subscribers in the past year. Thousands of developers are offering subscriptions through Google Play and are already seeing success with our billing platform. That�s why we�ve been working hard to help you take advantage of this opportunity and give you greater insights into your business and Android users.




New features to help your subscriptions business
thrive



You've got a high-performing product with fantastic features and compelling
content, but your business can't succeed without acquiring new users. In
addition to free trials, intro pricing, flexible billing periods, and more, we
recently launched the ability to pay for subscriptions with Google Play
balance
. Although people have already been using gift cards to pay for
Play content in over 20 countries, the use of gift cards to pay for
subscriptions in regions where cash is a popular form of payment, such as Latin
America, has resulted in as high as a 15% increase in subscription spend.



But it's not just about acquiring new customers, it's about retaining the ones
you have. That's why we are introducing account hold, where we
work with you to block access to your content or service if a user's form of
payment fails. This directly links a payment failure to the user losing access
to your content and/or premium features, which is enough to get them to go and
choose a new form of payment. When Keepsafe�the developer of href="https://play.google.com/store/apps/details?id=com.kii.safe&hl=en">Keepsafe
Photo Vault, a photo locker for private pictures and videos with over 50M
downloads�integrated account hold, their renewal rate on Android increased by
25%. We have over a dozen developers in early access today, and we will be
announcing public availability at the end of June.



We know data is vital to running your business, so we're excited to announce a
new subscriptions dashboard in the Play Console, and a new
report on Android app subscribers.





The dashboard brings together subscription data like new subscribers, cancellations, and total subscribers. It also displays daily and 30-day rolling revenue data, and highlights your top-performing products. This will give visibility into your subscription products and users and will help guide your business decisions.



Insights to help you grow your subscriptions
business



In addition to products and features, understanding people's needs is core to
building a successful subscription business. We talked to 2,000 Android app
subscribers in the US and UK and asked them how and why they use the apps they
do. The results shared in 'href="http://services.google.com/fh/files/misc/subscription_apps_on_google_play.pdf">Subscription
apps on Google Play: User insights to help developers win'
report
highlight some of the opportunities for you to grow your subscriptions user
base, set pricing strategies and learn to keep your users engaged, including:


  • Use free trials to acquire users. 78% of users start with a
    free version of an app, and many cite a discount or end of a free trial as a
    reason to pay.
  • Keep your content appealing and updated to get and keep users
    paying
    . It's the most important driver in converting users from free to
    paid users, as well as keeping users engaged and retained.




  • There is a huge opportunity to make money from
    subscriptions.
    While pricing elasticity varies by category, few users
    cite price as a reason to churn from a paid subscription and 64% either budget
    on a per app basis or not at all (as opposed to budgeting across all app
    subscriptions).


To find out more about your growing your subscription business with Google Play,
watch
our I/O session
, download
the research report (PDF)
, and get started with subscriptions
with Google Play In-app Billing
.






How useful did you find this blogpost?






?
?
?
?
?




Wednesday, May 17, 2017

Android and Architecture

















Android and Architecture


The Android operating system provides a strong foundation for building apps that run well on a wide range of devices and form factors. That being said, we've listened to developer feedback; Issues like complex lifecycles and the lack of a recommended app architecture make it challenging to write robust apps.





 We need to make it easier�and more fun�to write robust apps, empowering developers to focus on areas where they can innovate. Today we're announcing a guide to Android app architecture along with a preview of Architecture Components. Rather than reinventing the wheel, we're also recognizing the work done by popular Android libraries.











Opinions not Prescriptions


We know that there's more than one way to write Android applications.  What we're providing is a set of guidelines that can help you architect an Android application to work best with the unique ways that Android interacts. The Android framework has well-defined APIs to handle contact points with the OS, such as Activities, but these are entry points into your application, not building blocks for your application architecture; Framework components don't force you to separate your data model from your UI components, or provide a clear way to persist data independent of the lifecycle.




Building Blocks


Android Architecture components work together to implement a sane app architecture, while they individually address developer pain points. The first set of these components helps you:




  • Automatically manage your activity and fragment lifecycles to avoid memory and resource leaks

  • Persist Java data objects to an SQLite database









Lifecycle Components


New lifecycle-aware components provide constructs to tie core components of your applications to lifecycle events, removing explicit dependency paths.



A typical Android observation model would be to start observation in onStart() and stop observation in onStop().  This sounds simple enough, but often times you'll have several asynchronous calls happening at once, all managing the lifecycles of their component.  It's easy to miss an edge case.  The lifecycle components can help.




Lifecycle, LifecycleOwner, and LifecycleObserver


The core class for all of this is Lifecycle. It uses an enumeration for the current lifecycle state along with an enumeration for lifecycle events to track the lifecycle status for its associated component.






Lifecycle States and Events



LifecycleOwner
is an interface that returns a Lifecycle object from the getLifecycle()
method, while LifecycleObserver
is a class that can monitor the component's lifecycle events by adding
annotations to its methods. Putting this all together, we can create
lifecycle-aware components that can both monitor lifecycle events and query the
current lifecycle state.




public class MyObserver implements LifecycleObserver {
public MyObserver(Lifecycle lifecycle) {
// Starts lifecycle observation
lifecycle.addObserver(this);
...
}
public void startFragmentTransaction() {
// Queries lifecycle state
if (lifecycle.getState.isAtLeast(STARTED)) {
// perform transaction
}
}

// Annotated methods called when the associated lifecycle goes through these events
@OnLifecycleEvent(Lifecycle.Event.ON_RESUME)
public void onResume() {
}
@OnLifecycleEvent(Lifecycle.Event.ON_PAUSE)
public void onPause() {
}
}
MyObserver observer = new MyObserver(aLifecycleOwner.getLifecycle());




LiveData


LiveData
is an observable lifecycle-aware data holder class. Your UI code subscribes to
changes in the underlying data, tied into a LifecycleOwner,
and LiveData
makes sure the observer:



  • Gets updates to the data while the Lifecycle is in an active state (STARTED
    or RESUMED)

  • Is removed when the LifecycleOwner
    is destroyed

  • Gets up-to-date data when the LifecycleOwner
    restarts due to a configuration change or is restarted from the back
    stack


This helps to eliminate many pathways for memory leaks, and reduces crashes by
avoiding updates to stopped activities.


LiveData
can be observed by many listeners, each tied to a lifecycle owner such as a
Fragment or Activity.





ViewModel


ViewModel
is a helper class that contains UI data for an Activity or Fragment that serves
to separate view data ownership from UI controller logic. A ViewModel is
retained as long as the scope of its Activity/Fragment is alive, including when
the Activity/Fragmentis destroyed and recreated due to a configuration change;
This allows ViewModel to make UI data available to the recreated activity or
fragment instance. Wrapping UI data stored within the ViewModel with LiveData
provides the data an observable lifecycle-aware home. LiveData handles the
notification side of things while the ViewModel makes sure that the data is
retained appropriately.







Data
Persistence


The Android Architecture Components also simplify data persistence with the Room
library. Room provides an object-mapping abstraction layer that allows fluent
database access while harnessing the full power of SQLite.

The core framework
provides built-in support for working with raw SQL content. Although these APIs
are powerful, they are fairly low-level and require a great deal of time and
effort to use:





  • There is no compile-time verification of raw SQL queries.

  • As your schema changes, you need to update the affected SQL queries
    manually. This process can be time consuming and error prone.

  • You need to write lots of boilerplate code to convert between SQL queries
    and Java data objects.


Room takes care of these concerns for you while providing an abstraction layer
over SQLite.





Database,
Entity,
and DAO


There are three major components in Room:



  • Entity
    represents the data for a single database row, constructed using an annotated
    Java data object. Each Entity is persisted into its own table.

  • DAO
    (Data Access Object) defines the methods that access the database, using
    annotations to bind SQL to each method.

  • Database
    is a holder class that uses annotations to define the list of entities and
    database version. The class content defines the list of DAOs. It's also the main
    access point for the underlying database connection.






To use Room, you annotate the Java data objects you wish to persist as entities,
create a database containing these entities, and define a DAO class with the SQL
to access and modify the database.




@Entity
public class User {
@PrimaryKey
private int uid;
private String name;
// Getters and Setters - required for Room
public int getUid() { return uid; }
public String getName() { return name; }
public void setUid(int uid) { this.uid = uid; }
public void setName(String name) { this.name = name; }
}


@Dao
public interface UserDao {
@Query("SELECT * FROM user")
List getAll();
@Insert
void insertAll(User... users);
}

@Database(entities = {User.class}, version = 1)
public abstract class AppDatabase extends RoomDatabase {
public abstract UserDao userDao();
}





Guide to App Architecture 




Architecture Components are designed to be standalone, but they're most effective when they're incorporated into an effective app architecture. Today we're launching a Guide to App Architecture that shows how to build a robust, modular, and testable app using Architecture Components. The Guide has three main goals:






  •  Defining principles that apply to Android app development. 

  • Describing an app architecture that works with those principles. 

  • Showing how to implement that architecture using Architecture Components. 


 We recommend all developers who have had to deal with these problems read the Guide; Even if you're happy with your existing app architecture, the Guide will have useful principles and insights.


Just the Beginning 


We're planning to continue being opinionated, and to continue to introduce new Architecture Components to make it easier for Android developers to make informed choices when architecting their applications. We encourage you to try the preview and provide feedback on what we're doing, because we're all in this together to make robust Android app development easier and more fun.

To learn more about Android Architecture, check out:







Android Announces Support for Kotlin



By Mike Cleron, Director,
Android Platform



Today the Android team is excited to announce that we are officially adding
support for the Kotlin programming
language. Kotlin is a brilliantly designed, mature language that we believe will
make Android development faster and more fun. It has already been adopted by
several major developers � Expedia, Flipboard, Pinterest, Square, and others �
for their production apps. Kotlin also plays well with the Java programming
language; the effortless interoperation between the two languages has been a
large part of Kotlin's appeal.




The Kotlin plug-in is now bundled with Android Studio 3.0 and is available for
immediate download.
Kotlin was developed by JetBrains, the
same people who created IntelliJ,
so it is not surprising that the IDE support for Kotlin is outstanding.


In addition to the IDE support, we're announcing a collaboration with JetBrains
to move Kotlin into a non-profit foundation. (Kotlin is already open sourced
under Apache2.)




Say "Hello" to Kotlin


Kotlin will be very familiar to anyone who has used the Java programming
language.



package helloWorld

fun main(args: Array) {
println("Hello World!")
}

At first glance, you will see comforting elements like curly braces, classes,
packages, functions and methods. But as you go deeper, you will discover that
although Kotlin is based on familiar concepts, it is a uniquely modern, elegant
and pragmatic riff on those models. In particular, Kotlin is highly expressive
with minimal syntactic friction between your thoughts and what you have to type
in order to express those thoughts. If when writing code you have asked yourself
questions that began "why do I have to �?" you will be pleased to learn that in
Kotlin the answer to many of those questions is "you don't!"



For example, perhaps you have asked why you need to type in a bunch of
boilerplate getters and setters as well as overriding equals(),
hashCode() and toString() when implementing a simple
class. Here is a typical example from the Java programming language (in a
microscopic font for brevity).



public class Customer {
private String name;
private String email;
private String company;

public Customer(String name) {
this(name, "", "");
}

public Customer(String name, String email) {
this(name, email, "");

}

public Customer(String name, String email, String company) {
this.name = name;
this.email = email;
this.company = company;
}

public String getName() {
return name;
}

public void setName(String name) {
this.name = name;
}

public String getEmail() {
return email;
}

public void setEmail(String email) {
this.email = email;
}

public String getCompany() {
return company;
}

public void setCompany(String company) {
this.company = company;
}

@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;

Customer customer = (Customer) o;

if (name != null ? !name.equals(customer.name) : customer.name != null) return false;
if (email != null ? !email.equals(customer.email) : customer.email != null) return false;
return company != null ? company.equals(customer.company) : customer.company == null;
}

@Override
public int hashCode() {
int result = name != null ? name.hashCode() : 0;
result = 31 * result + (email != null ? email.hashCode() : 0);
result = 31 * result + (company != null ? company.hashCode() : 0);
return result;
}

@Override
public String toString() {
return "Customer{" +
"name='" + name + '\'' +
", email='" + email + '\'' +
", company='" + company + '\'' +
'}';
}
}

In Kotlin, you don't have to type any of that. This single line is equivalent to
the entire class above.



data class Customer(var name: String, var email: String = "",
var company: String = "")



History and Reference


Kotlin has been around for quite a while; it was announced back in 2011 and the
first preview was released in 2012. Kotlin 1.0 was released in 2016, at which
point JetBrains committed to maintaining backwards compatibility for stable
features from 1.0 forward.



You can find excellent training material and references at https://kotlinlang.org/. The Android team has
found the Kotlin
Koans
tutorial to be especially helpful as a quick way to get started
writing some Kotlin snippets. These tutorials range from the simple to the
sublime as the material progresses from the basics to more sophisticated Kotlin
idioms.




Why Kotlin?


Why did the Android team decide to support Kotlin? Most importantly, it was
because we think Kotlin is a great language that will make writing Android apps
easier and more enjoyable.



Kotlin is also a great match for the existing Android ecosystem. It is 100%
compatible with the Java programming language. You can add as little or as much
Kotlin into your existing codebase as you want and mix the two languages freely
within the same project. Calling out to Kotlin code from code written in the
Java programming language Just Works�. Going the other direction usually works
without any developer effort too via some automatically applied translation
conventions (for example, things like property getters and setters are created
for you). With the help of a few Kotlin annotations, you can also customize how
the translation is performed.



Finally, many, many developers have told us they love the Kotlin language. (Many
of our own developers on the Android team have also been saying similar things.)
There is already an enthusiastic
community
of Kotlin developers
for Android, and the Android team has been routinely peppered with questions
about Kotlin at public events. The Android community has spoken, and we
listened.




A Quick Tour


To help you get a sense of where all of the excitement around Kotlin is coming
from, here is a quick, very-much-not-comprehensive tour of some of the
particularly appealing aspects of Kotlin:



Nullable


The Kotlin compiler enforces that variables that can hold null values are
explicitly declared � thus no more NullPointerExceptions at runtime!



var neverNull: String = "something"
var mightBeNull: String? = null // "?" indicates this can be null

if (neverNull.length > 0) { // This is OK

}

if (mightBeNull.length > 0) { // Compiler catches this error for you

}

Named parameters and default arguments


We've all seen methods that have too many parameters to keep track of. For
example:



fun orderPizza(size: Size, pepperoni: Boolean, mushrooms: Boolean,
ham: Boolean, pineapple: Boolean, pickles: Boolean,
sausage: Boolean, peppers: Boolean, onion: Boolean)
{
...
}

// Wait� did I just order pickles on my pizza?
// Why do we even have that option?
orderPizza(Size.LARGE, true, false, false, false, true,
false, true, false)

Compare that to a similar scenario using named parameters and default arguments:



fun orderPizza(size: Size,
pepperoni: Boolean = false,
mushrooms: Boolean = false,
ham: Boolean = false,
pineapple: Boolean = false,
pickles: Boolean = false,
sausage: Boolean = false,
peppers: Boolean = false,
onion: Boolean = false)
{
...
}

orderPizza(Size.LARGE, ham = true, mushrooms = true)

In addition to helping to avoid tragic pizza outcomes, this is much easier to
read. It also reduces the number of variants of overloaded functions you need to
write.



When statement


Kotlin has a variation of a switch statement that allows matching on arbitrary
expressions.



// Please don't put this in your app!
when {
password.equals("password") -> println("Insecure password!")
password.length < 4 -> println("Too short!")
else -> {
println("Secure password!")
}
}

Smart Casts


Why should you have to cast something to a class right after you just tested
that it is an instance of that class? In Kotlin, you don't have to do that
anymore.



if (obj is String) {
// Compiler casts obj to a String for you.
// (Would work with && instead of nested ifs too.)
if (obj.length > 0) {

}
}

This generalizes to the when statement as well:



// Assume reasonable implementations of Cat and Dog
when (obj) {
is Cat -> obj.meow(...)
is Dog -> obj.woof(...)
else -> {

}
}

Extension functions


Kotlin lets you essentially retcon
new methods onto an existing type. If you, like many people, wish that the
String class had a toPigLatin method, you can now add it yourself
without having to create a new helper class to wrap String or going through the
trouble of serving on a language committee:



// The "String." prefix indicates that this method should
// extend the existing String class
fun String.toPigLatin() : String {
...
}

val plainOldString : String = "some text"

// Can now call toPigLatin as if were a method on String
println(plainOldString.toPigLatin())

// Or:
println("some text".toPigLatin())

Destructuring Declarations


We have already seen how easy it is to define a simple data class:



data class Order(val itemCode: String, val quantity: Int,
val price: Float)

A function that uses one of these classes as the return type is very close to
supporting multiple return values:



fun getOrder(...): Order {
...
return Order(itemCode, quantity, price);
}

To get all the way there, you can use the destructuring declaration syntax. The
following statement takes the Order object, extracts its three
properties, and then assigns them to the three variables what,
howMany and howMuch � all courtesy of the Kotlin
compiler, which also infers the correct types for you.



val (what, howMany, howMuch) = getOrder(...)

Lambdas


Kotin has an extremely concise syntax for lambdas that makes is easy to express
powerful functional programming paradigms. Here's a simple example that uses a
lambda to test that everything in a collection is a String:



fun allStrings(collection: Collection)=
collection.all { it is String }

That lambda syntax is building block of one of Kotlin's coolest features: the
ability to create builders that use JSON-like syntax that also happens to be
syntactically valid Kotlin. This example is adapted from an extended discussion
here,
but you can get the flavor of what it possible with this snippet:



fun generatePage(withEmphasis : Boolean) {
val result =
html {
head {
title { +"Kotlin Builders" }
}
body {
h1 { +"Kotlin Builders" }
p {
+"This is "
if (withEmphasis) b { +"really " }
+"interesting"
a(href = "https://goo.gl/rHwJio") { +"More here" }
}
}
}
println(result)
}

There are a couple of interesting things going on here. First, this shows how
expressive Kotlin's functional syntax can be: in this example,
"html", "head", "body, etc. are all just
functions written in Kotlin and the stuff in curly braces that follows are
functional parameters. (This snippet uses functions with names that match HTML
tags to build a representation of a web page, but of course you can use this
pattern to build any complex data structure with whatever names you want.) The
second interesting thing is the "withEmphasis" conditional. This
may look like we are mixing code (if (withEmphasis) �) with data
(all the HTML-esque tags), but the "data" here is actually just more code. Since
it is all really just code, this lets you build complex data structures using a
declarative syntax while also having inline access to the full capabilities of
the Kotlin language.




Getting Started


If you want to get started with Kotlin, you can start playing with code online
immediately here. Just hit the green
triangle to compile and run.



To try Kotlin in your app, follow these steps:



  1. Download
    Android Studio 3.0


  2. Open one of your existing ".java" files

  3. Invoke "Code > Convert Java File to Kotlin File"


The IDE will then walk you through adding Kotlin dependencies into your project,
and then convert the code to functionally equivalent Kotlin code. (The IDE will
also offer to touch up all of the call sites to the converted class when
suitable to be more idiomatic Kotlin such as when static methods are moved to
companion objects.)



You can also find a lot more information on how to start using
Kotlin
on developer.android.com.








What�s New in Android: O Developer Preview 2 & More

Posted by: Dave Burke, VP of Engineering

android-o-logo.png
With billions of Android devices around the world, Android has surpassed our wildest expectations. Today at Google I/O, we showcased a number of ways we�re pushing Android forward, with the O Release, new tools for developers to help create more performant apps, and an early preview of a project we call Android Go -- a new experience that we�re building for entry-level devices.

Fluid experiences in Android O

It's pretty incredible what you can do on mobile devices today, and how easy it is to rely on them as computers in our pockets. In the O release we've focused on creating fluid experiences that make Android even more powerful and easy to use, and today we highlighted some of those:
  • Picture-in-picture: lets users manage two tasks simultaneously, whether it�s video calling your friend while checking your calendar, or reading a new recipe while watching a video on a specific cooking technique. We�ve designed PIP to provide seamless multitasking on any size screen, and it�s easy for apps to support it.

  • Notification dots extend the reach of notifications, a new way for developers to surface activity in their app, driving engagement. Built on our unique and highly regarded notification system, dots work with zero effort for most apps - we even extract the color of the dot from your icon. 

  • Autofill with Google simplifies setting up a new device and synchronizing passwords by bringing Chrome's Autofill feature to Android. Once a user opts-in, Autofill will work out-of-the-box for most apps. Developers can optimize their apps for Autofill by providing hints about the type of data expected or add support in custom views. 

  • A new homescreen for Android TV makes it easy for users to find, preview, and watch content provided by apps. Apps can publish one or more channels, and users can control the channels that appear on the homescreen. You�ll be able to get started with creating channels using the new TvProvider support library APIs

  • Smart Text Selection: In Android O, we�re applying on-device machine learning to copy/paste, to let Android recognize entities like addresses, URLs, telephone numbers, and email addresses. This makes the copy/paste experience better by selecting the entire entity and surfacing the right apps to carry out an action based on the type of entity.

  • TensorFlow Lite: As Android continues to take advantage of machine learning to improve the user experience, we want our developer partners to be able to do the same. Today we shared an early look at TensorFlow Lite, an upcoming project based on TensorFlow, Google�s open source machine learning library. TensorFlow Lite is specifically designed to be fast and lightweight for embedded use cases. Since many on-device scenarios require real-time performance, we�re also working on a new Neural Network API that TensorFlow can take advantage of to accelerate computation. We plan to make both of these available to developers in a maintenance update to O later this year, so stay tuned!  

(L) Android O: Picture-in-picture, (R) Android O: Notification dots


Working on the Vitals in Android

We think Android�s foundations are critical, so we�re investing in Android Vitals, a project focused on optimizing battery life, startup time, graphic rendering time, and stability. Today we showcased some of the work we�ve done so far, and introduced new tools to help developers understand power, performance, and reliability issues in their apps:

  • System optimizations: in Android O, we�ve done a lot of work across the system to make apps run faster and smoother. For example we made extensive changes in our runtime - including new optimizations like concurrent compacting garbage collection, code locality, and more. 

  • Background limits: up to now it�s been fairly easy for apps to unintentionally overuse resources while they�re in the background, and this can adversely affect the performance of the system. So in O, we've introduced new limits on background location and wi-fi scans, and changes in the way apps run in the background. These boundaries prevent overuse -- they�re about increasing battery life and freeing up memory.

  • New Android Vitals Dashboards in the Play Console: today we launched six Play Console dashboards to help you pinpoint common issues in your apps - excessive crash rate, ANR rate, frozen frames, slow rendering, excessive wakeups, and stuck wake locks, including how many users are affected, with guidance on the best way to address the issues. You can visit the Play Console today to see your app's data, then learn how to address any issues.

Android Go

Part of Android�s mission is to bring computing to everyone. We�re excited about seeing more users come online for the first time as the price of entry level smart phones drop, and we want to help manufacturers continue to offer lower-cost devices that provide a great experience for these users. Today we gave a sneak peek of a new experience that we�re building specifically for Android devices that have 1GB or less of memory -- Internally we call it �Android Go,� and it�s designed around three things

  • OS: We�re optimizing Android O to run smoothly and efficiently on entry-level devices

  • Apps: We�re also designing Google apps to use less memory, storage space, and mobile data, including apps such as YouTube Go, Chrome, and Gboard. 

  • Play: On entry-level devices, Play store will promote a better user experience by highlighting apps that are specifically designed for these devices -- such as apps that use less memory, storage space, and mobile data -- while still giving users access to the entire app catalog.

The Android Go experience will ship in 2018 for all Android devices that have 1GB or less of memory. We recommend getting your apps ready for these devices soon -- take a look at the Building for Billions to learn about the importance of offering a useful offline state, reducing APK size, and minimizing battery and memory use.



O Developer Preview 2, Now in Public Beta

Today�s release of O Developer Preview 2 is our first beta-quality candidate, available to test on your primary phone or tablet. We�re inviting those who want to try the beta release of Android O to enroll now at android.com/beta -- it�s an incredibly convenient way to preview Android O on your Nexus 5X, 6P, and Player, as well as Pixel, Pixel XL, or Pixel C device.



With more users starting to get Android O on their devices through the Android Beta program, now is the time to test your apps for compatibility, resolve any issues, and publish an update as soon as possible. See the migration guide for steps and a recommended timeline.



Later today you�ll be able to download the updated tools for developing on Android O, including the latest canaries of Android Studio, SDK, and tools, Android O system images, and emulators. Along with those, you�ll be able to download support library 26.0.0 beta and other libraries from our new Maven repo. The change to Maven from SDK Manager means a slight change to your build configuration, but gives you much more flexibility in how you integrate library updates with your CI systems.



When you�re ready to get started developing with Android O, visit the O Developer Preview site for details on all of the features you can use in your apps, including notification channels and dots, picture-in-picture, autofill, and others. APIs have changed since the first developer preview, so take a look at the diff report to see where your code might be affected.



Thanks for the feedback you�ve given us so far. Please keep it coming, about Android O features, APIs, issues, or requests -- see the Feedback and Bugs page for details on where to report feedback.

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.








Monday, May 8, 2017

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?


? ? ? ? ?







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?
? ? ? ? ?


Thursday, April 27, 2017

SafetyNet attestation, a building block for anti-abuse


Posted by Arindam Basu, Borbala Benko, Alan Butler, Edward Cunningham, William Luh



Building innovative security features for Android app developers and their users
continues to be a priority. As part of this effort, we provide SafetyNet
attestation
, an API for developers to remotely evaluate whether they are
talking to a genuine Android device.




SafetyNet examines software and hardware information on the device to assess its
integrity. The result is a cryptographically signed statement, attesting basic
properties of the device � such as overall integrity and compatibility with
Android (CTS) � as
well as metadata about your app, such as its package name and signature. The
following JSON snippet shows an example of how the API reports this information:




{
"nonce": "R2Rra24fVm5xa2Mg",
"timestampMs": 9860437986543,
"apkPackageName": "com.package.name.of.requesting.app",
"apkCertificateDigestSha256": ["base64 encoded, SHA-256 hash of the
certificate used to sign requesting app"],
"apkDigestSha256": "base64 encoded, SHA-256 hash of the app's APK",
"ctsProfileMatch": true,
"basicIntegrity": true,
}

The contents of an example attestation response, providing information about
the calling app and the integrity and compatibility of the device.





The SafetyNet attestation API can help your server distinguish traffic coming
from genuine, compatible Android devices from traffic coming from less-trusted
sources, including non-Android devices. This classification helps you better
understand the risks associated with each device so that you can fine-tune
preventive or mitigative actions in case of abuse or misbehavior.




We encourage developers to use SafetyNet attestations to augment their
anti-abuse strategy. Combine SafetyNet attestation with other signals, such as
your existing device-side signals and behavioral signals about what the user is
trying to do, in order to build robust, multi-tier protection systems.




For further information, check the recently
updated documentation
and see the SafetyNet API
Samples
on GitHub.

Thursday, April 20, 2017

App onboarding for kids: how Budge Studios creates a more engaging experience for families



Posted by Josh Solt (Partner Developer Manager, Kids Apps at Google Play) and Noemie Dupuy (Founder & Co-CEO at Budge Studios)



Developers spend a considerable amount of resources driving users to download
their apps, but what happens next is often the most critical part of the user
journey. User onboarding is especially nuanced in the kids
space since developers must consider two audiences: parents and children. When
done correctly, a compelling onboarding experience will meet the needs of both
parents and kids while also accounting for unique considerations, such as a
child's attention span.




Budge Studios has successfully grown their
catalog of children's titles by making onboarding a focal point of their
business. Their target demographic is three to eight-year olds, and their
portfolio of games include top titles featuring Strawberry Shortcake, Hello
Kitty, Crayola, Caillou and The Smurfs.





"First impressions matter, as do users' first experience with your app. In fact,
70%1 of users who delete an app will do so within a day of having downloaded it,
leaving little time for second chances. As an expert in kids' content, Budge
tapped into our knowledge of kids to improve and optimize the onboarding
experience, leading to increased initial game-loop completion and retention." -
Noemie, Founder & Co-CEO at Budge Studios




Three key ways Budge Studios designs better onboarding
experiences:





1. Make sure your game is tailor-made for kids




When Budge released their app Crayola
Colorful Creatures
, they looked at data to identify opportunities to create
a smoother onboarding flow for kids. At launch, only 25% of first-time users
were completing the initial game loop. Budge analyzed data against gameplay and
realized the last activity was causing a drastic drop-off. It required kids to
use the device's microphone, and that proved too challenging for very young
kids. Budge was able to adjust the initial game loop so that all the activities
were accessible to the youngest players. These adjustments almost tripled the
initial loop completion, resulting in 74% of first-time users progressing to see
additional activities.




2. Earn parents trust by providing real value upfront





Budge has a large of portfolio of apps. Earning parents' trust by providing
valuable and engaging experiences for kids is important for retaining users in
their ecosystem and achieving long term success.




With every new app, Budge identifies what content is playable for free, and what
content must be purchased. Early on, Budge greatly limited the amount of free
content they offered, but over time has realized providing high quality free
content enhances the first-time user experience. Parents are more willing to
spend on an app if their child has shown a real interest in a title.




Working with top kids' brands means that Budge can tap into brand loyalty of
popular kids characters to provide value. To launch Strawberry
Shortcake Dreams
, Budge decided to offer Strawberry Shortcake, the most
popular character in the series, as a free character. Dress Up Dreams is among
the highest converting apps in the Budge portfolio, indicating that giving away
the most popular character for free helped conversions rather than hurting it.




3. Test with real users




Budge knows there is no substitute for direct feedback from its end-users, so
Budge involves kids every step of the way. Budge Playgroup is a playtesting
program that invites families to try out apps at the alpha, beta and
first-playable development stages.




The benefits from early testing can be as basic as understanding how the size
and coordination of kids' hands affect their ability to complete certain actions
or even hold the device, and as specific as pinpointing a less-than-effective
button.




In the testing stages of Strawberry Shortcake Holiday Hair, Budge caught an
issue with the main menu of the app, which would not have been evident without
observing kids using the app.





Prior to Playtesting:






After Playtesting:







In the original design, users were prompted to start gameplay by audio cues.
During testing, it was clear that the voiceover was not sufficient in guiding
kids to initiate play, and that additional visual clues would significantly
improve the experience. A simple design change resulted in a greatly enhanced
user experience.




The onboarding experience is just one component of an app, but just like first
impressions, it has a disproportionate impact on your users' perception of your
app. As Budge has experienced, involving users in testing your app, using data
to flag issues and providing real value to your users upfront, creates a
smoother, more accessible onboarding experience and leads to better results.




For more best practices on developing family apps and games, please check out The
Family Playbook
for
developers.
And visit the Android Developers website to stay up-to-date with features and
best practices that will help you grow a
successful business on Google Play
.




1.http://www.cmswire.com/customer-experience/mobile-app-retention-5-key-strategies-to-keep-your-customers/




How useful did you find this blogpost?


? ? ? ? ?





 













Friday, April 14, 2017

Java 8 Language Features Support Update


Posted by James Lau, Product Manager



Yesterday, we released Android Studio
2.4 Preview 6
. Java 8 language features are now supported by the Android
build system in the javac/dx compilation path. Android Studio's Gradle plugin
now desugars Java 8 class files to Java 7-compatible class files, so you can use
lambdas,
method references and other features
of Java 8.




For those of you who tried the Jack compiler, we now support the same set of
Java 8 language features but with faster build speed. You can use Java 8
language features together with tools that rely on bytecode, including Instant
Run. Using libraries written with Java 8 is also supported.




We first added Java 8 desugaring in Android Studio 2.4 Preview 4. Preview 6
includes important bug fixes related to Java 8 language features support. Many
of these fixes were made in response to bug reports you filed. We really
appreciate your help in improving Android development tools for the community!




It's easy to try using Java 8 language features in your Android project. Just
download Android Studio
2.4 Preview 6
, and update your project's target and source compatibility to
Java version 1.8. You can find more information in our preview
documentation
.




Happy lambda'ing!

A New Issue Tracker for our AOSP Developers

Posted by Sandie Gong, Developer Relations Program Manager & Chris Iremonger, Android Technical Program Manager



Like many other issue trackers at Google, we're upgrading our Android Open Source Project (AOSP) issue tracking system to Issue Tracker. We are hoping to facilitate a better collaboration between our developers and our Android product teams by using a tool we use internally at Google to track bugs and feature requests during product development.



Starting today, all issues formerly at code.google.com/p/android/issues will migrate to Issue Tracker under the Android Public Tracker component. You may have noticed that we are already using the new tool to collect feedback on the O Developer Preview!



What has been migrated



Getting started with Issue Tracker



You can learn more about navigating our Issue Tracker from our developer documentation. By default, Issue Tracker displays only the issues assigned to you. You can easily change that to show a hotlist of your choice, a bookmark group, or a saved search. You can also adjust notification settings by clicking the gear icon in the top right corner and selecting Settings.



The mappings in Issue Tracker are also slightly different than code.google.com so make sure to check out Life of a Bug to learn more about what the various statuses mean.







Searching for component specific issues



Opening a code.google.com issue link will automatically redirect you to the new system. We've cleaned up some of the spam, but you'll be able to find all of the other issues from code.google.com in Issue Tracker, including any issue you've reported, commented on, or starred.



You can view all reported Android issues in the Android Public Tracker component and drill down to see reported issues for specific categories of issues, such as Tools and Support Libraries, by searching for specific components.

Filing a bug or feature request

Before filing a new issue, please check if it is already reported in the issues list. Let us know what issues are important to you by starring an existing issue.



Submitting a new issue is easy. Once you click "Create Issue", search for the appropriate component for your issue. Alternatively, you can just follow the correct issue creation link for each component listed in Report Bugs.



Here's some helpful links to get you started!








Topic
Relevant Links

Navigating and creating issues in the Android component

Navigating Google Issue Tracker

Google Issue Tracker announcements for other products