Varun Kumar | Posted on | 2 min Read

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.

Avinash Tiwari | Posted on | 2 min Read

As I write this today, it’s been almost two months of full-scale disruption across the world due to Corona Virus pandemic.
 
As humans, we always have this tendency to believe that we can control the impact of events around us, until one day something exceptional happens and it breaks every assumption and norms, we are familiar with.
 
With no time to realize or sync in with the change, the world was struck with a sudden lockdown and crisis. We all were only surrounded by uncertainty and were panic stricken.
 
On the positive side, this period has forced everyone to slow down and focus on what’s really important at the moment. The word “essential” is clearly itched in our minds for some time to come.
 
At individual level, our mindless pursuit of material well-being has been replaced by our inner well-being. We are celebrating the return of fresh breathing air, clear blue skies, a fresh tinge of green in plants and trees around today.
 
After staying in a never thought of lockdown for more than 50 days, I thought of sharing my experiences and feelings and how I, as an entrepreneur am coping up with these uncertain times.
 
So, I would break this entire situation into 3 phases, which I am sure most of you would be able to relate to.
 

Phase 1: Chaos

 
This crisis created a chaos which forced us to think about what the essential elements for our business are. Does it matter how fancy our offices are, or how big the lunch or dinner is for a client? So, we started looking at three core essentials.
 
a) Our Product – What problem are you solving as a business and is it relevant in today’s time? At the same time will it be relevant for the coming future?
 
We started looking at it by asking the basic fundamental question – If we have to start the business all over again today, what part of business we would like to build? This analysis really helped us figure out what’s essential for us as a product/offering and business model? Apart from above, some open-ended questions helped us reimagine the future roadmap of product.
 
1. What are we currently not doing for our customers?

2. What are the needs of the customers for which there are no solutions?

3. Which areas of our existing customers are growing?
 
b) Our people – Removing all the fringe around people we had built over the years, it’s really “them” which has become the most important aspect now. If organisations want employees to do and deliver more, then employees must feel valued as people. That’s especially critical when health concerns intersect with work responsibilities. Guarding my most critical asset—my employees—both physically and mentally is my top priority now.
 
c) Our Customer – What is essential with the customer right now? Empathy, ability to listen and be a 2 AM friend to your customer. Flexibility to find ways to sail together in these difficult times.
 
We realised that hard selling can boomerang. Companies are already facing tough time. It was important to take care of the loyal clients and invest in them more. We decided to use this opportunity to strengthen your relationship with them and build more trust.
 

Phase 2: Stabilisation

 
With the teams settling to the new working conditions and adapting to virtual collaboration, we focused on the things that we as a businesses can and can’t do. We knew this is going to be the new normal and we had to develop well thought out contingencies and new approaches.
 
a) Not to keep head in the sand:
 
Financially, we immediately prepared ourselves for the plan A (worst case) and Plan B (optimistic case) and Plan C ( aggressive) . We started with Plan A. Whatever cost optimisation was needed was done quickly. We decided the focus areas based on whatever signals we were getting. Almost daily monitoring of situation helped us move switch from Plan A to Plan B and finally to Plan C quickly.
 
b) Spark the team spirit and keep moving together:
 
We created focused group of people handling different areas of organisation and had discussions with them on daily/weekly basis. We have started a lot of initiatives for learning new skills which can be anything apart from work. Learning a new language, cooking, photography anything…that you craved to do all this while. Trust me, I have seen a tremendous improvement in my team’s productivity and efficiency. They are more accountable and responsible towards their work and that has led us to witness some significant success even in these times.
 
c) Be human. Be helpful. Show solidarity. Mindful marketing: It is high time that we come out of the notion of business as usual. This is the time when we are doing “business unusual”, and it’s likely to be that way for some time. We reoriented our sales team not to be 2AM friends to our customer, not to hard sell but empathise. We checked with our clients and partner if they need any help. Help them in whatever way you can. It’s was and still is important to keep your name out there, but make sure you’re not being tone-deaf.
 

Phase 3: Realisation

 
Now, this is the current phase I am in, and it is truly an exciting phase for me as an entrepreneur and for us a company. With the help of our customers, partners and my team, we have got a fair idea of where the businesses will begin to focus. Ours being a enterprise SAAS product over cloud, has done wonders for companies adapting to the new working culture. We have a huge growth in the month of April and it’s continuing. We have been able to clear significant product backlog with some really exciting new features. We are upgrading our data centres to be ready for increasing load. At the same time, we have started our new DC in Singapore. We have on-boarded middle management in key areas of pre-sales and customer support. Overall, lots happening.
 
We are also mindful of the fact that crisis is not over. Situation across the world is still fluid. It’s difficult to predict the future at this moment. So, we have to be on our toes for some time to come. We have to be agile and adapt to the situation. But last two months have given immense learning as a business and personally as an entrepreneur.
 
I read this quote somewhere, and it’s truly what I believe in now – ‘Out of constraints comes creativity, out of chaos comes growth, out of fear comes success’.