Category Page

Google has announced Android 11 roll out for select Pixel phones, as well as flagship smartphone models from Xiaomi, Oppo, OnePlus, and Realme. The manufacturers are releasing final beta ROMs based on Android 11 for their individual UIs. Google informed that the update brings changes to improve multitasking, and give users more control over their privacy with one-time app permissions. It also brings built-in screen recording to Android. The new Android 11 comes with many changes but the developers and QA needs to make sure that their app is compatible with the new Android version.

The most effective way to test the compatibility of apps with the latest Android is by testing them on pCloudy devices that have been updated to Android 11. Currently we have Google Pixel devices that are updated to the latest Android version. The new Android OS comes with changes in conversation notification, chat bubbles, media controls, smart device controls, etc. Let’s dive deeper into the updates to understand them better.

Screen recorder

There are plenty of apps on the Google Play Store that will record your phone’s screen. Android 11 might seem a bit late to the party, but it’s still exciting as there is one less app you’ll need to download. The screen recorder function lives in the Quick Settings tiles. You tap the Screen Record feature which gives you a few options before you start recording. For example, you can choose whether or not your screen-taps should also be recorded and whether the phone should capture audio, too. The whole thing is very simplistic, but it gets the job done.

Chat bubbles

Chat bubbles were planned for Android 10 but they faded into the background when the stable version of the OS launched. Now chat bubbles are here in Android 11 and taking centre stage. If you’ve ever used Facebook Messenger on Android, you already know how chat bubbles work. With Messenger, a “chat head” appears on your phone that overlays on top of pretty much every other app. A quick tap of the icon launches the chat and then you can minimize the chat back to an icon. You can remove the chat head until the next conversation starts. This is exactly how the system-wide bubble feature works, with the only major difference being that it can work for any chat app, not just Messenger or other apps that have a similar design.

Dark Theme Scheduling

Google finally introduced a native dark mode to Android 10 last year. However, it was fairly simplistic: it was either on or off. Meanwhile, Android skins from other manufacturers allow users to control when and why dark mode should be activated. With Android 11, users can now schedule the dark theme using one of two different metrics. Users can schedule a dark theme to turn on or off when the sun sets or rises. Users can also set up a custom schedule for dark mode activation if you wish.

Wireless Android Auto

Till now your phone had to be plugged in to use Android Auto. But in Android 11, every smartphone running the OS can take advantage of wireless Android Auto connections. The only limitation will be that the head unit in your car will need to support the feature. Obviously, this will still be a hefty limitation for folks who own cars that are a few years old, but it will start the transition towards every Android Auto experience eventually being totally wireless.

Share sheet

There is no doubt that Android’s sharing system was a mess. Thankfully, it is about to get more useful with Android 11. You can now pin apps to your share sheet in order to easily access them whenever you want to share something. This feature allows users to control which apps appear at the top of the list when you want to share something. Android’s current system of presenting apps in an order that it determines is confusing.

Improved voice access

By turning on voice access, you can simply tell your Android phone what to do using the power of Google Assistant. With Android 10, though, certain functions required you to voice-activate numbered on-screen elements. For example, you would say “Tap 4” while using the Twitter app to compose a new tweet (every link on the page would have a small number next to it). Now, though, you could say, “Open Twitter, compose tweet,” making your interactions with the phone much more fluid and natural. While this will only be helpful for a minority of users, it shows how Google is taking accessibility within Android very seriously.

Conclusion

To wrap it up, there are many minor changes in the new Android OS and many apps might get affected from the updates. This is why it is required to test the apps on the devices loaded with Android 11. This will ensure that the app works fine on different devices and also on different OS versions. So instead of buying the flagship devices on which the latest Android is available, you can just login to the pCloudy platform and test your app on real devices. It’s much more efficient as there is no issue of sharing the devices with other team members and you can perform manual and automated tests from anywhere, anytime.

Android 11 is scheduled to be released this year in September, but we will get the first Android 11 beta version on June 3, 2020. The new Android version contains some new features and important developer focused updates, as seen in the developer previews. Android 11 features include airdrop-style file sharing, motion sense gesture, screen recording and many more. The behavior changes in the latest Android version may affect your app regardless of the target SDK version. So let’s get familiar with the behavior changes that will help you make your app compatible with Android version 11.

Accessibility

In the new Android, your accessibility service cannot declare an association with the system’s accessibility button at runtime. You can declare your accessibility service’s association with the accessibility button using the flagRequestAccessibilityButton flag in your accessibility service metadata file, typically res/raw/accessibilityservice.xml. Earlier we used to add AccessibilityServiceInfo.FLAG_REQUEST_ACCESSIBILITY_BUTTON to the flags property of an AccessibilityServiceInfo object. But now the framework won’t pass accessibility button callback events to your service.

Open Mobile API changes

In Android 11, Open Mobile API has additional functionality:

1. Parse rules for carrier privileges.
2. Customize embedded Secure Element (eSE) access or provision an eSE using one or more of the following:

  • System privileged permission
  • Configurable Access Rule Application Master (ARA-M) application identifiers (AIDs)
  • System API to reset OMAPI reader

3. Provide readers a clear indicator for applications to filter device capability.

Security

The new Android stores each user’s app usage stats in credential encrypted storage. Therefore, neither the system nor any apps can access that data unless isUserUnlocked() returns true, which occurs if the user unlocks their device for the first time after a system startup or the user switches to their account on the device. If your app already binds to an instance of UsageStatsManager, check that you call methods on this object after the user unlocks their device. Otherwise, the API will return null or empty values.

Android 11 uses the Scudo Hardened Allocator internally to service heap allocations. Scudo is capable of detecting and mitigating some types of memory safety violations. Refer to the Scudo troubleshooting Android documentation if you see any Scudo-related crashes (for example, Scudo ERROR:) in native crash reports. Also, Android’s default SSLSocket implementation is internally built on top of Conscrypt SSLEngine.

App Compatibility

Android 11 update includes lists of restricted non-SDK interfaces based on collaboration with Android developers and the latest internal testing. Whenever possible, we make sure that public alternatives are available before we restrict non-SDK interfaces.

If your app does not target Android 11, some of these changes might not immediately affect you. However, while you can currently use non-SDK interfaces that are part of the greylist (depending on your app’s target API level), using any non-SDK method or field always carries a high risk of breaking your app.

If you are unsure if your app uses non-SDK interfaces, you can test your app to find out. If your app relies on non-SDK interfaces, you should begin planning a migration to SDK alternatives. Nevertheless, we understand that some apps have valid use cases for using non-SDK interfaces. If you cannot find an alternative to using a non-SDK interface for a feature in your app, you should request a new public API. To learn more about the changes in this release of Android, refer to Updates to non-SDK interface restrictions in Android 11.

Debugging

Android 11 offers debugging support for apps to identify potential JobScheduler API invocations that have exceeded certain rate limits. Developers can use this facility to identify potential performance issues. For apps with the debuggable manifest attribute set to true, JobScheduler API invocations beyond the rate limits will return RESULT_FAILURE. Limits are set such that legitimate use cases should not be affected.

The default mode for fdsan is changing in Android 11. It detects mishandling of file descriptor ownership, such as double-close and use-after-close. Previously fdsan used to log a warning and continue but now it aborts upon detecting an error. If you’re seeing crashes due to fdsan in your application, refer to the fdsan documentation.

Privacy Changes

There are some crucial changes in the privacy control in Android 11 and developers should review the privacy features and test their apps for compatibility. The first change we will talk about is One-time permissions. Now users can grant temporary access to location, microphone, and camera through a one-time permission. This feature grants more control to the users who do not wish to share information while using any app that uses these features. The next change is in package visibility. Android 11 changes how apps query and interact with other installed apps on the same device. Add the element to your app’s manifest and this change will affect the apps that target Android 11. There is an update for the background location access which will affect the apps that need all time access to location. Request foreground (coarse or fine) and background location permissions incrementally in separate calls to the permission request method. Before each request, use a full screen view to explain the benefits that users receive for granting that permission.

Apart from this there are many UI changes like system_alert_window permission and manage_overlay permission. For more information you can visit the Android documentation and also check out the behaviour changes in apps targeting Android 11.

Espresso is a testing framework for Android which automatically synchronizes your test actions with the UI of your app. It also lets the test wait until all the background activities have finished.
 
The pCloudy utility uploads your Application APK, test APK and other APK files to pCloudy. It will then acquire a device to run your test on, execute those tests and report back the status and test report.
 
In pCloudy you don’t have to set up the environment. Just follow these simple steps.
 
After the test cases are run you can see the detailed reports. Once automation ends, the device under test will be released automatically so that you or other users can use it later.
 
There are two ways you can execute espresso test cases. Here are the steps for both
 
1. pCloudy UI Dashboard
a. In pCloudy UI there is a section called Automation where you will find multiple automation frameworks integrated to the platform.
b.Select the Espresso automation and to fill in the required details.

 
Espresso-on-pCloudy
c. pCloudy Support two TestRunners.
i. AndroidJUnitRunner (android.support.test.runner.AndroidJUnitRunner)
ii. AndroidXJUnitRunner (androidx.test.runner.AndroidJUnitRunner)
 
Espresso-on-pCloudy
d. Select your Application and Test Application.
 
Espresso-on-pCloudy
e. Select the required devices.
 
Espresso-on-pCloudy
f. Click on Next button and Schedule the automation by clicking on the Schedule button.
 
Espresso-on-pCloudy
g. You will get a dialog box. Click on Ok.
 
Espresso-on-pCloudy
Espresso-on-pCloudy
h. You will get the active session details on the Dashboard and you will also be able to see the Live view.
 
Espresso-on-pCloudy
i. Liveview will help you to see the live execution on your test cases. Click on the Liveview icon
 
Espresso-on-pCloudy
2.pCloudy Utility
 
a. Download the espresso starter pack from here and Unzip it
b. You will find two files,
i. pCloudy_Espresso.jar
ii.Config.properties
c. Place the config.properties file and pCloudy_Espresso.js file into the same directory.
d. Update the config.properties file as guided in the comments in the file.
e. In your workspace, run the command by typing the java -jar pCloudy_Espresso.jar
 
Espresso-on-pCloudy
f. This will upload the required files which you have mentioned inside the config.properties files.

g. You will get the status of the Automation in pCloudy Dashboard ActiveSession.
 
Espresso-on-pCloudy
 
h. Even on the pCloudy dashboard, you can use the Liveview by which you can see the running test cases.
 
Espresso-on-pCloudy
i. Once the test execution is over, You will get a URL of the test execution report on the terminal.
 
Espresso-on-pCloudy
j. You can open the report from the dashboard Report section also. In the report, all the test details will be there as shown in the screenshots below.
 
Espresso-on-pCloudy
 
k. You will also get individual device reports. Inside the test case level details, you will find performance details, test case logs, device logs, and video files.
 
Espresso-on-pCloudy
Espresso-on-pCloudy