Questions tagged [android-api-31]
45 questions
61
votes
11 answers
Android 12 Splash Screen Icon Not Displaying
I am seeing a weird issue with a new app that I am starting. I am utilizing the new Android 12 splash screen API to create my splash screen and I followed the guide provided by Google to do so. I included core-splashscreen in my project to provide…

Joseph Hawkes-Cates
- 1,911
- 2
- 12
- 13
48
votes
5 answers
How to configure Toast icon in Android 12?
Starting with Android 12, Google show a toast message with an app icon.
My application have launcher icon. Android 12 splash screen show app icon correctly.
Show toast by code
Toast.makeText(this, "Show simple toast",…

Denis
- 2,622
- 3
- 22
- 24
28
votes
8 answers
'VIBRATOR_SERVICE: String' is deprecated for API 31
As the title says, i upgraded to API 31. I had a function to perform a vibration, but in the line
val vib = this.getSystemService(Context.VIBRATOR_SERVICE) as Vibrator
the VIBRATOR_SERVICE is now shown as deprecated. How can i replace it? Or at…

m.i.n.a.r.
- 922
- 2
- 12
- 28
9
votes
1 answer
'getter for connectionInfo: WifiInfo!' is deprecated. Deprecated in Java (Api 31)
When I want to get info about current wifi connection via WifiManager.connectionInfo I get
this:
'getter for connectionInfo: WifiInfo!' is deprecated. Deprecated in Java
How can I do it in Android 12? (only want to get rssi)

Renattele Renattele
- 1,626
- 2
- 15
- 32
8
votes
1 answer
Android 12 doesn't return location with approximate location permission
On Pixel 4a with Android 12 (SPB5.210812.002), when approximate location permission is given by the user, no location is returned from FusedLocationProviderClient. When I change permission to exact location permission, then I'm able to get…

Myroslav
- 896
- 12
- 21
7
votes
1 answer
Android 12 Splash Screen Icon Not Showing From Notification
I am using the Android 12 splash screen API and while the splash screen icon shows without issue when opening the app from the launcher, opening the app from a notification only displays the splash screen background, without the icon or animated…

S01ds
- 301
- 5
- 8
4
votes
1 answer
Full screen in Flutter with android 12 api31
Hi everyone I have problems with the full screen I have tried various settings but I can not get a full screen on android 12 api31.
Currently I have set it like this.
I run app like this
SystemChrome.setEnabledSystemUIMode(SystemUiMode.manual,…

Andrei
- 51
- 4
3
votes
0 answers
Android API 31 level causes error for Flutter local notifications in the app
As per Google's policy, I updated my targetSdkVersion and compileSdkVersion to 31. But I noticed that the Flutter local notification package now throws error for incoming messages as below:
Targeting S+ (version 31 and above) requires that one of…

Gaurangi
- 31
- 2
3
votes
1 answer
3
votes
1 answer
exception.class.missing._Unknown_: Strongly consider using FLAG_IMMUTABLE without PendingIntent in source
I recently updated my app to target API 31 and have noticed a new crash being reported in the Google Play Console that makes no sense to me.
The crash caused by exception.class.missing._Unknown_: Strongly consider using FLAG_IMMUTABLE... for which…

Fat Monk
- 2,077
- 1
- 26
- 59
2
votes
0 answers
How to increase cordova splash screen dimension size after upgrade to cordova 11 and android API 32
I just update cordova to 11 and android API to 32.
Then found that the cordova-plugin-splashscreen no longer support, have to change to API splash screen.
So, in config.xml, Need to add the following line:

Panadol Chong
- 1,793
- 13
- 54
- 119
2
votes
1 answer
Hide notification bar on splash screen API 31
Is it possible to hide the notification bar on splash screen with the new Android 12 Splash screen API? So that the notification bar would be hidden from the very moment when the user launches an app.
I tried adding this to my…

Blank空白
- 117
- 8
2
votes
0 answers
Execution failed for task ':app:compileDebugJavaWithJavac' while updating targetSdkVersion from 30 to 31
I am migrating targetSdkVersion from API 30 to 31. Gradle wrapper version using is distributionUrl=https://services.gradle.org/distributions/gradle-6.1.1-all.zip. Gradle tool version is classpath 'com.android.tools.build:gradle:3.6.4' and…

Chinmay Mujumdar
- 21
- 1
1
vote
0 answers
Ionic 4 upgrade to Google Android API 31 crashes app
We currently have an Ionic 4 project that we upgraded to target Android API 31 but the app crashes when the permission request prompts on Android devices. (e.g. runtime permission request for location or camera)
Below is the Ionic project…

Dan
- 11
- 1
1
vote
1 answer
Android 12 - Beacon scanning... weirdest thing
Ok so here is my situation:
I have my app installed. It is now targeting Android 12.
I also have Kontakt.io Android sample app installed.
When I use Kontakt.io's sample app to scan for beacons, it works. Among other devices, I can see my beacons…

Alon Minski
- 1,571
- 2
- 19
- 32