Reputation: 51
I have an intent to open BiometricsAndSecuritySettingsActivity:
Intent intent = new Intent(Settings.ACTION_SECURITY_SETTINGS);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
context.startActivity(intent);
On Samsung A52 with Android 12 I got ActivityNotFoundException
I've tryed to look at intent-filters via PackageManager:
val packageManager = context.packageManager
packageManager.getPackageInfo("com.android.settings", PackageManager.GET_INTENT_FILTERS)
But I didn's see anything about intent-filters. May be it caused by a bug, which represented here: https://issuetracker.google.com/issues/36908355
I've gone forward and tryed to look up about intent-filters via adb.
I've used adb shell dumpsys package com.android.settings
. I've exported result to the file and found this lines:
android.settings.SECURITY_SETTINGS:
d32d8d9 com.android.settings/.Settings$BiometricsAndSecuritySettingsActivity filter d8ea29e
Action: "android.settings.SECURITY_SETTINGS"
Category: "sec.voice.category.DEFAULT"
Category: "android.intent.category.DEFAULT"
mPriority=1, mOrder=0, mHasStaticPartialTypes=false, mHasDynamicPartialTypes=false
The same info I've got on Android 9
But, here is the difference between. On Android 9 I have this:
b99cc29 com.android.settings/.Settings$BiometricsAndSecuritySettingsActivity filter android.settings.SECURITY_SETTINGS:
Action: "com.android.settings.action.SETTINGS"
mPriority=1400, mOrder=0, mHasPartialTypes=false
But dumpsys from Android 12 doesn't have any:
d32d8d9 com.android.settings/.Settings$BiometricsAndSecuritySettingsActivity filter f7b917f
Action: "android.intent.action.MAIN"
Category: "android.intent.category.DEFAULT"
So, do you have any ideas how to redirect a user to the BiometricsAndSecuritySettingsActivity directly? Not by using android.settings.SETTINGS
?
Upvotes: 5
Views: 1078