Questions tagged [android-11]

For questions regarding programming in Android 11 (a.k.a., Android R), the primary 2020 version update for the Android OS.

Google released the Preview version of Android 11. Android 11 features [link][1]

https://developer.android.com/preview

796 questions
6
votes
1 answer

Android 11 (only) FragmentManager crashes - FragmentManager has been destroyed

Have there been any noticeable lifecycle changes on Android 11 that anyone has noticed? My app works fine on pre-Android 11 OSes but on my Pixel 4 is crashing out everytime with the error: E/AndroidRuntime: FATAL EXCEPTION:…
6
votes
0 answers

Android-11: How to open system location permission settings screen programmatically?

When targeting Android 11/API 30, applications will no longer have the ability to request access to location data all of the time from within an application — this option has been removed from the in-app permissions dialog. If an application wants…
user1443721
  • 1,110
  • 2
  • 14
  • 33
5
votes
0 answers

Android 11 Wireless Debugging pairing and persistent connection

My question actually consists of two: adb pair command was added recently in 30 version of Android platform-tools, but official Linux repos (in particular, Ubuntu 18.04 and Debian 10) have only 27 version as latest. Is there any way to be…
5
votes
0 answers

How to resolve missing variant arch:common for a dependency using Android.bp?

Originally, the dependency was included inside the Android.mk file for Android 9. This module would compile and run with no build errors. When migrating to Android 11, the dependency "libvlc" must be added to the Android.bp static_libs. …
Naman Jain
  • 321
  • 5
  • 21
5
votes
2 answers

App crashing when opening keyboard on Motorola devices running Android 11

We are facing an issue with Motorola devices running Android 11. On other devices, we are unable to reproduce this issue even on Android 11. We have already looked at UnsupportedOperationException: Tried to obtain display from a Context not…
5
votes
0 answers

How to change default/place holder Blue Android Icon in Toast, Android 11

I'm testing my app on an Android 11 emulator (Pixel 5 API 31), when I open a toast notification I see the following: Where the toast has a blue default/place holder android icon next to it. How do I replace this placeholder icon with my own…
J34245
  • 300
  • 2
  • 12
5
votes
1 answer

Android 11: regain app folder ownership after uninstall

I have a question regarding storage changes in Android 11. If I understand correctly, app can read/write/delete the files it created. Also I can then access those files for example like this: File path = new…
tomazj
  • 303
  • 3
  • 13
5
votes
3 answers

Generate Android bundle targeting API Level 30 (Android 11) using ionic and cordova

I'm an ionic developer and I've been dealing with these new requirements of Google Play when submitting an update (or a new app): Starting in August 2021, new apps will need to Publish with the Android App Bundle format. Starting in November 2021,…
5
votes
2 answers

Can we delete an image file using MediaStore API? if yes then how

I have a requirement to delete screenshot image file after a certain time using background service in my app and it was working fine using the above method private void deleteTheFile(String path) { File fdelete = new File(path); if…
5
votes
1 answer

Foreground service for GPS tracking stops working after time

Background: We have an app that does time registration for a group of people. In this example we use a Zebra TC26 (model: TC26BK-11A222-A6) and we clock in multiple people by scanning. Next the app tracks the GPS position of the phone to locate in…
Boeykes
  • 137
  • 2
  • 9
5
votes
2 answers

How to pick image from shared storage in android 11 device?

I used this library https://github.com/Dhaval2404/ImagePicker and I got a warning from the android play console, team We've detected that your app contains the requestLegacyExternalStorage flag in the manifest file of 1 or more of your app bundles…
5
votes
0 answers

Google says requestLegacyExternalStorage flag is detected, but my app doesn't use it

I'm receiving this email in apps compiled with api 29 and api 30. These apps does not contains requestLegacyExternalStorage flag and does not contains MANAGE_EXTERNAL_STORAGE. I already searched in manifest merger log, and in the final merged…
5
votes
1 answer

Unable to bind to service after moving to Android 11

I have two applications. One that is a foreground service that does not use any of the permissions introduced in Android 11 (camera, location etc). I have client apps that connect to my service. In android 8 this connection works, however when in…
zeroter5
  • 135
  • 11
5
votes
2 answers

Saving PDF in external Download directory on Android 11

In android 11 scoped storage is introduced. According to documentation to save non media file (like PDF) Storage Access framework should be use. So using Storage access framework user needs to choose location with system file picker to save non…
akash
  • 127
  • 1
  • 8
5
votes
0 answers

Android 11 - window.setDecorFitsSystemWindows applies for both - status and navigation

With old-fashioned flags we could create an app with translucent param applied only to a status bar. window.decorView.systemUiVisibility = window.decorView.systemUiVisibility or View.SYSTEM_UI_FLAG_LAYOUT_STABLE or…
blinker
  • 599
  • 5
  • 18