17

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?

A P
  • 2,131
  • 2
  • 24
  • 36
Anny
  • 509
  • 1
  • 5
  • 14

2 Answers2

37

Try this instead:

        Intent intent = new Intent(Settings.ACTION_SECURITY_SETTINGS);

        startActivity(intent);
A P
  • 2,131
  • 2
  • 24
  • 36
Chandrakanth
  • 3,711
  • 2
  • 18
  • 31
-1

You can try this:

 startActivityForResult(new Intent(Settings.ACTION_SECURITY_SETTINGS), 0);

When the user hits the back button, your app will open again.

A P
  • 2,131
  • 2
  • 24
  • 36