Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Programmatically open Settings-> Security tab on Button Click

How can I open Android > Settings > Security tab from within my app?

In my app, I have one simple button and I want to open the Security tab setting on button click listener event.

I have tried to open android settings, but how do I open specifically the security one?

like image 678
Anny Avatar asked Apr 02 '15 04:04

Anny


People also ask

How do I get to programmatically in Android settings?

Now you can use Intent intent = new Intent(android. provider. Settings. ACTION_SECURITY_SETTINGS); startActivity(intent); There are whole bunch of constants for every main settings category that you can choose from.

How do you check auto start permission is enabled or disabled programmatically?

There's no way to find out whether the Auto-start option is enabled or not. You can manually check under Security permissions => Autostart => Enable Autostart .

How do I get to settings in Android Studio?

Click File > Settings (on macOS, Android Studio > Preferences) to open the Settings dialog.


1 Answers

Try this instead:

        Intent intent = new Intent(Settings.ACTION_SECURITY_SETTINGS);

        startActivity(intent);
like image 116
Chandrakanth Avatar answered Oct 16 '22 21:10

Chandrakanth