5 ways developers can improve app user experience with Android 13

by: | Jan 24, 2023

Android 13 introduces new features that can improve app user experience on Android phones and tablets. In this post, we look at five features from Android 13 that can help developers make their apps more lovable ❤️. And we’ll explain the steps developers need to take to implement these great new features.

1. Create themed app icons

Remember how exciting it was when Android added the ability to customize mobile devices by switching the wallpaper? Unfortunately for many Android app developers, their icons broke and looked awful on different user-chosen wallpapers. Google responded by introducing Material You in Android 12. Material You is the third version of Material Design and includes a feature called Dynamic Colors.

This feature generates a color palette by picking a single color from the user’s wallpaper and applying it across the app. However, the feature does not change the app icon colors — and it only applied to Google Apps on Pixel devices. Android 13 brings this feature to the AdaptiveIconDrawable API, making it easier for developers to support themed app icons on every application.

How to support themed app icons in Android 13

To support adaptive icons based on chosen wallpaper colors, Android developers need to only take one simple step: Add a monochromatic app icon version by including the <monochrome>tag with the monochromatic app icon path inside <adaptive-icon> tag at ic_launcher.xml.

The ic_launcher.xml code should look something like this:

<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
  <monochrome android:drawable="@drawable/monochromatic_app_icon"/>
  . . .
</adaptive-icon>

Android 13 themed wallpaper with monochromatic icons

This themed wallpaper shows monochromatic app icons. Source: Google.

 

2. Enable language preferences for your app

Another significant change in Android 13 is the addition of Per-App Language Preferences. As the name suggests, users can now choose specific languages for each app instead of changing their entire phone system’s language preferences. This change helps users who speak more than one language or prefer having a specific app using another language. It is also easier for development and QA testing. When testing language localization in an Android 13 app, it is simpler to make a change and verify everything is still working. On prior OS versions, Android development teams had to take the extra step of changing the entire system language for the sole purpose of a single test.

How to support multiple languages in your Android 13 app

The per-app language feature is one more reason for developers to add translations to your app to cover the most used languages. Remember that you’ll still need to add resources for other languages so Android 13 can translate the app correctly. It’s a straightforward process: Add new locale-based strings.xml files for every supported language with the correct translations. If you are using Android Studio, the steps to add a new strings.xml file are:

    • Step 1: Choose FileNewValues Resource File.
    • Step 2: Type strings on the File Name field and select Locale from Available qualifiers.
    • Step 3: Select the desired language for the file, as seen below:

Android 13 localization resource file selection

You can also distinguish languages by country. In the example above, we create a language resource file for the Portuguese spoken in Brazil, and could also add another language resource file for the Portuguese spoken in Portugal. If your app supports multiple languages already, there’s no additional work needed. To verify your app’s language preferences work in Android 13, follow these steps:

  1. Open the Settings App.
  2. Tap System Languages & input App languages.
  3. Select the app to change the language.
  4. Choose a language.

Android 13 App language settings screen

The Android App Language settings screen. Source: Google.

3. Improve permissions management with System Photo Picker

Another UX improvement in Android 13 is the System Photo Picker. The Photo Picker API (first released in Android 11) allows users to choose which specific pictures can be accessed by an app. The Android 13 Photo Picker API operates at the system level and improves both user privacy and usability, as there won’t be pop-ups asking permission to share an entire photo gallery with an app. It also means that you, as a developer, can remove these broad permissions from your app:

    • READ_EXTERNAL_STORAGE
    • READ_MEDIA_AUDIO
    • READ_MEDIA_VIDEO
    • READ_MEDIA_IMAGES

Removing these permissions is safer for your user and for you — as your app will be less vulnerable to security breaches caused by granting access to all external storage, media, audio, and image files.

How to use the Photo Picker API in Android 13

You can use the new Photo Picker API in your Android app by adding the following lines when requesting the user to choose images:

  • val intent = Intent(MediaStore.ACTION_PICK_IMAGES)
  • startActivityForResult(intent, REQUEST_CODE_SINGLE_SELECT)

It is also possible to limit the number of files selected by adding an extra parameter to the intent called MediaStore.EXTRA_PICK_IMAGES_MAX. To limit the selectable data to images or videos only, add intent.type = “video/*” or “image/*”.

Android 13 System Photo Picker
The Android System Photo Picker allows users to choose which photos to share with an app. Source: Google.

4. Add copy and paste feature for both text and images

In Android 11 Google added the Clipboard preview for screenshots. The Clipboard appears as an overlay at the bottom-left corner of a screen, with some editing and sharing actions to take on the image. I use this feature almost every day — and Android 13 improves this user experience.

Android 13 now offers Clipboard preview functionality for both text and images. The feature includes a small icon within the copied text or image and provides two intents to handle the content: A markup feature for images and a lightweight text editor.

The new feature makes it easier for users to edit and share content across applications – helping apps that support it become more engaging and useful.

How to support copy and paste for text and images in Android 13

This feature will be enabled for text fields from your app once you make them selectable, which can be easily achieved on XML Files and Jetpack Compose:

  • XML files: Add the selectable=true property on text components.
  • Jetpack Compose: Place the text composables inside the SelectionContainer composable.

When working with Jetpack Compose, you can support the copy-and-paste feature for multiple text strings by placing them into a single SelectionContainer.

The Clipboard preview can be challenging to implement for images on your app. The clipboard content format can be text, URI, or Intent — but there is no support for images. However, there are some workarounds to enable image previews. For example, save the image in a file and add the file URI to the clipboard.

This Copy and Paste developer article includes more information about the Clipboard Framework — and how to enable copying data to the clipboard, including a safe way to mark content as sensitive and prevent it from being copyable.

Android 13 Clipboard Preview for text and images

These screenshots show the behavior of text (left) and an image (right) after being copied to clipboard in Android 13. Source: Esper blog.

5. Improve media notification with PlaybackState-derived controls

Last but not least, we think the new media controls derived from PlaybackState and the Android Media library can make a big difference to user experience. On Android 13, the media controls can be customized using PlaybackState instead of MediaStyle notifications. By doing this, it is possible to display up to five actions when the media notification is expanded — and up to three actions otherwise. The collapsed form takes the first three actions from the following list:

  1. Play / Loading Spinner / Pause;
  2. Previous / Custom / Empty;
  3. Next / Custom / Empty;
  4. Custom
  5. Custom

Developers can customize their Android 13 apps even more when displaying media content with PlaybackState — including at least four customizable slots for the media notification.

How to support PlaybackState in Android 13

Adding custom actions to the media notification is very simple. Just add it to the PlaybackState builder by providing the action identifier, the name of the action, and the icon that will represent this custom action, as presented here:

PlaybackState.Builder()
  .addCustomAction(/*First Custom Action*/)
  .addCustomAction(/*Second Custom Action*/)
  .build()

Android 13 media notifications with PlaybackState

Two screens showing the Android 13 media notification icons in collapsed (left) and expanded (right) states. Source: Esper blog.

Android 13 UX Improvements FTW!

As you see in the five features we highlighted, Android 13 can dramatically improve your app’s user experience. To learn more about Android 13, read Android 13 Features & APIs or this Android 13 changelog.


Want to improve your Android app user experience?

These five features are just a few of the exciting new Android 13 features that can improve app experience and user engagement. ArcTouch can review your app and provide recommendations to take full advantage of Android 13. If it’s been more than a year since your last major app refresh, you’re due for a review.

Contact us to set up a free consultation.