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

409 questions
42
votes
6 answers

intent.resolveActivity returns null in API 30

Looking at intent.resolveActivity != null but launching the intent throws an ActivityNotFound exception I wrote opening a browser or an application with Deep linking: private fun openUrl(url: String) { val intent = Intent().apply { …
22
votes
4 answers

requestLegacyExternalStorage is not working in Android 11 - API 30

Google has introduced some changes recently related to storage APIs in API 29 like scoped storage and we opted out by adding 'requestLegacyExternalStorage=true' in Manifest. But now when I targetSdkVersion 30, this no longer seems to work. Some of…
Ebin Joy
  • 1,478
  • 2
  • 14
  • 34
22
votes
7 answers

Android 11 Scoped storage permissions

I'm trying to better understand what I will be able to do once the Android 11 version will be released. My App use the file paths of images provided by Environment.getExternalStorageDirectory() to create albums of photos, but with Android 11 I won't…
Rob B
  • 267
  • 1
  • 1
  • 9
17
votes
4 answers

How to set fullscreen in Android R?

I need to put a screen in fullscreen in my app. For this I am using this code: override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) requestWindowFeature(Window.FEATURE_NO_TITLE) …
16
votes
2 answers

Android 11 (R) file path access

According to the docs file path access is granted in Android R: Starting in Android 11, apps that have the READ_EXTERNAL_STORAGE permission can read a device's media files using direct file paths and native libraries. This new capability allows…
HB.
  • 3,514
  • 3
  • 18
  • 41
13
votes
2 answers

Using Android 11 gives a lot of output log about accessing SQLiteDatabase interface

I am using API 30 - Android 11.0 in my emulator. Whenever I am running my application, I am receiving more than 200 lines of the following message in the log: Accessing hidden method…
13
votes
1 answer

Strict Secure Cookie policy error in Admob after updating to Android 11

After updating my app to compile with api level 30 (Android R, 11), I can't see admob test ads, and I'm receiving this error in the log: Strict Secure Cookie policy does not allow setting a secure cookie for http://googleads.g.doubleclick.net/ for…
NullPointerException
  • 32,153
  • 66
  • 194
  • 346
13
votes
1 answer

Android API level 30 setSystemBarsAppearance doesn't overwrite theme data

Pre-Android 11 (API Level 30) I had true set in my theme and was additionally changing this (when needed) in the the code with fun setLightStatusBar(){ window?.decorView?.let {…
13
votes
4 answers

GetNetworkType in Android 11

Following the changes posted here, the getNetworkType method is deprecated from Android R and onwards. When trying to use this method in a R compiled application, results in the following exception being thrown: java.lang.SecurityException:…
tomerpacific
  • 3,092
  • 8
  • 22
  • 41
12
votes
2 answers

How to troubleshoot Crash in App Running Android 11 (SDK 30)

I've never seen a stack trace like that and have no idea how to troubleshoot. It didn't happen in Android 10 (SDK 29) or earlier. The app is built with androidx support library and SDK 30. The phone where it has happened: Samsung Note 10+ 5G running…
Oleg Gryb
  • 4,361
  • 1
  • 22
  • 36
12
votes
1 answer

One-time permissions causing background scheduled jobs and alarms to be cancelled

We develop an Android SDK and, while testing the Android 11 Beta, we found a problem that does not seem to be reported yet. In Android 11, new one-time permissions have been introduced for Location, Microphone and Camera permissions. With this…
11
votes
3 answers

Consider adding a queries declaration to your manifest when calling this method when using intent.resolveActivity in android 11

I've an extension function for opening an intent for my activities: fun Activity.openIntent(action: String?, type: String?, uri: Uri?) { Intent() .apply { action?.let { this.action = it } uri?.let { this.data = it…
Saman Sattari
  • 2,330
  • 4
  • 20
  • 35
10
votes
2 answers

How do some apps reach the contents of ".../Android/..." sub-folders on Android 11 without root?

Background There are various storage restrictions on Android 10 and 11, which also includes a new permission (MANAGE_EXTERNAL_STORAGE) to access all files (yet it doesn't allow access to really all files ) while the previous storage permission got…
android developer
  • 106,412
  • 122
  • 641
  • 1,128
10
votes
2 answers

What does QUERY_ALL_PACKAGES permission do?

Android R Preview 1 introduced a new permission called QUERY_ALL_PACKAGES. The documentation for the permission says the following: Allows query of any normal app on the device, regardless of manifest declarations. Has anyone worked out what this…
Sam
  • 35,545
  • 30
  • 157
  • 202
9
votes
3 answers

Facebook Audience 6.2.0 /apex/com.android.art/lib64/libart.so (art::OatHeader::IsDebuggable() const+124) on Android 11

After updating to Facebook Audience 6.2.0 from 5.11.0 on an Android app with target SDK 29 I'm seeing a considerable amount of crash reports on a small percentage of Android 11 devices. According to a user that is having this crash and has…
1
2 3
27 28