googblogs.com

All Google blogs and Press in one site

Skip to content
  • Home
  • Categories
    • Google Ads Developer Blog
    • Google Africa Blog
    • AdWords Agency Blog
    • Android Blog
    • Android Developers Blog
    • Australia Blog
    • Blogger Buzz
    • Consumer Packaged Goods Blog
    • Custom Search Blog
    • DoubleClick Advertiser Blog

Discover tools for Android data migration and improve your app retention

Posted by Sean McQuillan (@objcode) and Prateek Tandon (@ptandon05)

What happens to app usage and accessibility when people get new phones? The feedback we've had is that people want apps to work straight out of the box, just like on their old phones.

Developers of successful apps might also be used to thinking about user activation in a model borrowed straight from web. On the web, people register new accounts, activate by finding great features, then become retained when they experience value, and come back repeatedly to use your web page.

The story is much the same on mobile. People register to create new accounts, activate by using your great features, then become retained when they find value and repeatedly launch your app. However, there's one big difference. Android apps typically store more information compared to your average web session. You usually never have to re-enter your password for an Android app for years, post account creation, that is until the moment you get a new phone.

Getting a new phone can be a rare event for many people - some going years between upgrading devices. However, overall a large proportion of those who use your app will get a new phone every year. We have several tools to help you keep people logged in, engaged, and happy when they use your app on a new phone.

Back up your app data

Auto Backup for apps should be configured for every application. This feature does exactly what it says - automatically backs up your app data. So when people get a new phone, their app data is automatically restored before your app launches.

To configure Auto Backup for your app you need to setup include/exclude rules:

AndroidManifest.xml

<application ...
    android:fullBackupContent="@xml/autobackup">

xml/autobackup.xml

<?xml version="1.0" encoding="utf-8"?>
<full-backup-content>
    <include domain="sharedpref" path="."/>
    <exclude domain="sharedpref" path="device.xml"/>
</full-backup-content>

When configuring include/exclude rules it's important to avoid storing sensitive user data in Auto Backup, although it's a great place to store user specific settings and other app content!

To implement tracking for Auto Backup register a BackupAgent and listen for onQuotaExceeded(long, long) callback. If your app exceeds the 25MB backup limit, this callback will be your notification of failure. In a well configured app this will never happen, so you can track it as a crash report.

Learn more about Auto Backup for apps.

Optimize log-in

When we talk to people about the experiences they want on their new phones they're very clear; they want your app to remember who they are, and they don't want to re-enter a password. There are several ways you can accomplish this as a developer:

  • Use Google Sign-In to make login frictionless. People can sign in with their Gmail account, or any email address. Most importantly, they don't need to remember a password. On top of improving registration and activation, enabling Google Sign-In will also help with retention as it allows those getting new phones to reactivate with a single button, or even automatically. Even better, you can use Google Sign-In for the same login experience for your iOS, Web, and Android applications. This seamless experience is also available if your app uses Firebase Auth to handle Google Sign-In.
  • Make things simpler by using Google Smart Lock and Autofill. These two features work hand in hand to help people safely access their passwords. Autofill was introduced in Android O, and will offer to save your app user's passwords to the Smart Lock datastore, or their preferred password manager, automatically when they log in. To prepare your app, setup Autofill hints, and exclude fields that should not be filled by the Autofill framework.
<TextView

android:id="@+id/username" android:layout_width="wrap_content" android:layout_height="wrap_content" android:autofillHints="username" />

<TextView android:id="@+id/password" android:layout_width="wrap_content" android:layout_height="wrap_content" android:autofillHints="password" />

<TextView android:id="@+id/captcha" android:layout_width="wrap_content" android:layout_height="wrap_content" android:importantForAutofill="no" />

  • Integrate the Smart Lock for Passwords API to safely store passwords. It's backwards compatible to API 9 and works great on devices with older versions of Android that don't work with Autofill. Similar to Autofill, Smart Lock API will offer a dialog to save people's passwords after they log in. But even better - it enables programmatic retrieval for automatic return to user sign-in, even across new devices and in Chrome. To support this Smart Lock functionality you will need to include some code in your app; check out the Codelab to learn how to integrate Smart Lock for Passwords to your app. Also, be sure to link your app and website, for a smooth experience across Chrome and Android with Autofill and Smart Lock.
  • Consider using the Account Transfer API so your app can transfer credentials from an old phone to a new one. It does this using an encrypted bluetooth/cable, and you can transfer data from phones running API 14 or higher. Account transfer happens when your app user is setting up their new phone for the first time, though your app doesn't need to be installed from the Google Play Store. When your app re-installs from Google Play, the credentials will be available to your app on first launch. Watch more best practices to get started with the Account Transfer API, and read the API guide for Account Transfer.
  • Codelabs

    If you haven't already, try the Auto Backup for Android Codelab, and SmartLock Codelab.

    Improving retention on Android for many people will involve trying to overcome the friction of device switches. With a rich toolbox at your disposal to transfer settings with Auto Backup, and to improve the login experience with Google Sign-In, Smart Lock for Passwords, Autofill, and Account Transfer API, you have the opportunity to deliver a great user story: your app works on people's new phones, just like it did on their old phones.

    How useful did you find this blogpost?

    ★ ★ ★ ★ ★

    Source: Android Developers Blog


    This entry was posted in Android Developers Blog and tagged Android, android developers, Auto Backup, Autofill Framework, Featured, Google Play, Google Sign-In, Smartlock on February 12, 2018 by Android Developers.

    Post navigation

    ← Ending support for iOS 8 in the IMA SDK Email members of a Team Drive →

    Recent Comments

      Archives

      • July 2025
      • June 2025
      • May 2025
      • April 2025
      • March 2025
      • February 2025
      • January 2025
      • December 2024
      • November 2024
      • October 2024
      • September 2024
      • August 2024
      • July 2024
      • June 2024
      • May 2024
      • April 2024
      • March 2024
      • February 2024
      • January 2024
      • December 2023
      • November 2023
      • October 2023
      • September 2023
      • August 2023
      • July 2023
      • June 2023
      • May 2023
      • April 2023
      • March 2023
      • February 2023
      • January 2023
      • December 2022
      • November 2022
      • October 2022
      • September 2022
      • August 2022
      • July 2022
      • June 2022
      • May 2022
      • April 2022
      • March 2022
      • February 2022
      • January 2022
      • December 2021
      • November 2021
      • October 2021
      • September 2021
      • August 2021
      • July 2021
      • June 2021
      • May 2021
      • April 2021
      • March 2021
      • February 2021
      • January 2021
      • December 2020
      • November 2020
      • October 2020
      • September 2020
      • August 2020
      • July 2020
      • June 2020
      • May 2020
      • April 2020
      • March 2020
      • February 2020
      • January 2020
      • December 2019
      • November 2019
      • October 2019
      • September 2019
      • August 2019
      • July 2019
      • June 2019
      • May 2019
      • April 2019
      • March 2019
      • February 2019
      • January 2019
      • December 2018
      • November 2018
      • October 2018
      • September 2018
      • August 2018
      • July 2018
      • June 2018
      • May 2018
      • April 2018
      • March 2018
      • February 2018
      • January 2018
      • December 2017
      • November 2017
      • October 2017
      • September 2017
      • August 2017
      • July 2017
      • June 2017
      • May 2017
      • April 2017
      • March 2017
      • February 2017
      • January 2017
      • December 2016
      • November 2016
      • October 2016
      • September 2016
      • August 2016
      • July 2016
      • June 2016
      • May 2016
      • April 2016
      • March 2016
      • February 2016
      • January 2016
      • December 2015
      • November 2015
      • October 2015
      • September 2015
      • August 2015
      • July 2015
      • June 2015
      • May 2015
      • April 2015
      • March 2015
      • February 2015
      • January 2015
      • December 2014
      • November 2014
      • October 2014
      • September 2014
      • August 2014
      • July 2014
      • June 2014
      • May 2014
      • April 2014
      • March 2014
      • February 2014
      • January 2014
      • December 2013
      • November 2013
      • October 2013
      • September 2013
      • August 2013
      • July 2013
      • June 2013
      • May 2013
      • April 2013
      • March 2013
      • February 2013
      • January 2013
      • December 2012
      • November 2012
      • October 2012
      • September 2012
      • August 2012
      • July 2012
      • June 2012
      • May 2012
      • April 2012
      • March 2012
      • February 2012
      • January 2012
      • December 2011
      • November 2011
      • October 2011
      • September 2011
      • August 2011
      • July 2011
      • June 2011
      • April 2011
      • March 2011
      • February 2011
      • March 2010
      • January 2010
      • December 2009
      • November 2009
      • October 2009
      • September 2009

      Categories

      • AdMob Blog
      • Ads Developer Blog
      • AdWords Agency Blog
      • Android Blog
      • Android Developers Blog
      • Apps Feed Blog
      • Artificial Intelligence
      • Australia Blog
      • Blogger Buzz
      • Consumer Packaged Goods Blog
      • Custom Search Blog
      • Data Liberation Blog
      • DoubleClick Advertiser Blog
      • DoubleClick Publishers Blog
      • DoubleClick Search Blog
      • Geo Developers Blog
      • Google Ads Developer Blog
      • Google Africa Blog
      • Google Analytics Blog
      • Google and Your Business
      • Google Apps Developer Blog
      • Google Canada Blog
      • Google Chrome Blog
      • Google Chrome Releases
      • Google Cloud Platform Blog
      • Google Commerce Blog
      • Google Developers Blog
      • Google Drive Blog
      • Google Europe Blog
      • Google Fiber
      • Google for Education Blog
      • Google for Nonprofits
      • Google for Work Blog
      • Google Green Blog
      • Google India Blog
      • Google LatLong Blog
      • Google New Zealand Blog
      • Google News Blog
      • Google Scholar Blog
      • Google Testing Blog
      • Google Translate Blog
      • Google Travel Blog
      • Google Web Fonts Blog
      • Google Webmaster Central Blog
      • Inside AdSense
      • Inside AdWords
      • Inside Search Blog
      • Official Gmail Blog
      • Official Google Blog
      • Online Security Blog
      • Open Source Blog
      • Politics & Elections Blog
      • Public Policy Blog
      • Research Blog
      • Student Blog
      • Uncategorized
      • YouTube Blog
      • YouTube Blog – Australia
      • YouTube Blog – U.K.
      • YouTube Blogs
      • YouTube Creators
      • YouTube Creators – UK
      • YouTube Engineering and Developers Blog
      Proudly powered by WordPress