Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 9    Views: 75

DJM
Lost but trying
Profile
Posts: 50
Reg: Aug 20, 2013
planet earth
500
07/20/15 07:00 PM (9 years ago)

Android - BT_LOGIN - want to use tablet password

Android app What I want to do it lock some of my app screens not all of them I was looking to use the BT_LOGIN screen and want to modify it to use the tablet password. so I am guessing I capture the password input variable and compare it to the root app password clickit_appDelegate.rootApp.getRootUser().logInPasswordText.getText().toString(); if they don't match - send error if match login does that sound reasonable? Thanks DJ
 
CMCOFFEE
Android Fan
Profile
Posts: 2017
Reg: Jan 04, 2013
Amarillo, Texas
26,670
like
07/21/15 06:09 AM (9 years ago)
The code you used above I believe is for the apps password from login screen Im guessing. I dont think you wouldn't be able to get the tablet password Because that seems like it would be a security issue.
 
AlanMac
Aspiring developer
Profile
Posts: 2612
Reg: Mar 05, 2012
Esher, UK
37,120
like
07/21/15 06:47 AM (9 years ago)
I agree. And I suspect any tablet device pin or password is likely to be encrypted. The BT Login screen is intended to work against a user account you've created in the control panel. If you could explain a little about why doesn't that work for you, maybe we can come up with an idea?
 
DJM
Lost but trying
Profile
Posts: 50
Reg: Aug 20, 2013
planet earth
500
like
07/22/15 07:41 PM (9 years ago)
I might not be reading how to use it correctly then. It looked like it validated users/passwords from a website. Basically my app had 2 sections, one section is a set up area I don't want the user to have access to. So I want to password protect those screens. I just to set up a screen when the "admin" can set up a password and reset it for the admin screens. I was looking at the DeviceAdminSample from the Android Sample More complex than I want. Something like below DevicePolicyManager devicePolicyManager = DevicePolicyManager.getSystemService(Context.DEVICE_POLICY_SERVICE); ComponentName demoDeviceAdmin = new ComponentName(this, name of activity); devicePolicyManager.setPasswordQuality( demoDeviceAdmin,DevicePolicyManager.PASSWORD_QUALITY_UNSPECIFIED); devicePolicyManager.setPasswordMinimumLength(demoDeviceAdmin, 5); boolean result = devicePolicyManager.resetPassword("123456", DevicePolicyManager.RESET_PASSWORD_REQUIRE_ENTRY); Toast.makeText(this, "button_lock_password_device..."+result, Toast.LENGTH_LONG).show();
 
CMCOFFEE
Android Fan
Profile
Posts: 2017
Reg: Jan 04, 2013
Amarillo, Texas
26,670
like
07/22/15 08:31 PM (9 years ago)
Their phone would probably have to be rooted for that to work
 
DJM
Lost but trying
Profile
Posts: 50
Reg: Aug 20, 2013
planet earth
500
like
07/23/15 07:10 AM (8 years ago)
I am doing this with a tablet not a phone
 
CMCOFFEE
Android Fan
Profile
Posts: 2017
Reg: Jan 04, 2013
Amarillo, Texas
26,670
like
07/23/15 07:24 AM (8 years ago)
It wouldn't matter.any device I meant
 
AlanMac
Aspiring developer
Profile
Posts: 2612
Reg: Mar 05, 2012
Esher, UK
37,120
like
07/23/15 07:38 AM (8 years ago)
Maybe I misunderstood, but it sounds to me as if the standard BT login plugin will do exactly what you need. https://www.buzztouch.com/plugins/plugin.php?pid=A7B885BDC392B02BCAEF5F3 The short description says it all: "Login screens allow you to password protect any screen or menu item. User credentials are authenticated against a list of users in the control panel or a custom script on your website. " In your case, you have a user id in the control panel for your admin. You decide on the user id and password. The logion compares what you type in to the control panel. No java code to modaify, no rooting, just use the plugin. Or is there something not obvious that stops this being the way to go? Alan
 
DJM
Lost but trying
Profile
Posts: 50
Reg: Aug 20, 2013
planet earth
500
like
07/23/15 03:55 PM (8 years ago)
I will take a look again I think I am missing something. too little sleep the last couple of days, working too much I am going to try to look at this tomorrow after hopefully getting some sleep tonight. Will keep you posted
 
DJM
Lost but trying
Profile
Posts: 50
Reg: Aug 20, 2013
planet earth
500
like
07/24/15 05:30 PM (8 years ago)
So I took some time today to dig through the BT_Login screen plugin and it looks like when you enter your userid and password it has to authenicate to ZZ website. Is that a correct statement? That is the authentication is does.
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.