0

I am using android settings inside my app(Launcher), so i can able to set a password protection, but far from that some tabs/device can able to access settings in different methods, so i am trying to create a password protection to the whole"system(Device)settings", how i can do it, is it possible , From my search i found this Android, Detect when other apps are launched Can any one tell me how it works..
And it says that will not work from JellyBean and above. READ_LOGS permission is now reserved for system apps only, Is there any way for JellyBean.

Community
  • 1
  • 1
Sree
  • 3,136
  • 2
  • 31
  • 39
  • Before accessing the settings, you can create a Dialog with a field for the password to be filled, like this thread here: http://stackoverflow.com/questions/8871150/edittext-in-dialog-android – g00dy Jul 04 '13 at 08:40
  • I wish to create a password protection to the whole system settings... – Sree Jul 04 '13 at 08:43
  • If by "System Settings" you mean the "settings" of your application, I think that the Dialog can fin into that requirement. Just show it and if the entered password is correct, visualize the "Settings", if not - then nothing happens or an error message appears, like aToast or something. – g00dy Jul 04 '13 at 08:45
  • I mean the device settings ..How i can able to know that i am accessing device settings – Sree Jul 04 '13 at 08:47
  • You're password protecting the Android Settings, which are built into the phone itself ? It's not an app you can prevent the access to. I think that this isn't allowed, for security reasons .. – g00dy Jul 04 '13 at 08:52

1 Answers1

0

If the solution proposed in the comment is ok with you, here I found this:

AlertDialog.Builder alert = new AlertDialog.Builder(MyFeedActivity.this);
        LayoutInflater inflater=MyFeedActivity.this.getLayoutInflater();
        //this is what I did to added the layout to the alert dialog
        View layout=inflater.inflate(R.layout.dialog,null);       
        alert.setView(layout);
        final EditText usernameInput=(EditText)layout.findViewById(R.id.dialogusername);
        final EditText passwordInput=(EditText)layout.findViewById(R.id.dialogpassword);

I hope it will fit your needs.

Community
  • 1
  • 1
g00dy
  • 6,752
  • 2
  • 30
  • 43
  • I know this but i am trying to create a password protection to the whole system settings – Sree Jul 04 '13 at 08:43
  • @Sree i am also facing same problem have you got the answer for this - to protect device settings – ask4solutions Jul 09 '15 at 12:37
  • @ask4solutions yes i managed that some how, but i am sorry i really forgot what i did.. bez it is long back – Sree Jul 13 '15 at 04:51