DEV Q: How to Toggle a Global Setting Programmatically (Bluetooth, Location, etc)? - Java for Android App Development

My Question:
How can I turn *OFF* one of a user's Global Settings, (such as "Location" or "Bluetooth", or "WiFi", etc)..?
(Back in the earlier days of Android, there were plenty of "Quick Toggle Settings" Widgets out there)..
But these days, you can no longer adjust those settings so easily..
However, I came up with a couple of ideas/thoughts on possibly how to do it, and need some clarification!
( 1 ) - Would obtaining "Phone Administrator" privileges, (similar to the way Launchers like NOVA do to perform certain actions) work?
NOTE: I'm referring to the App's you might find in (Settings > Lock screen and security > Other security settings > Phone administrators).
OR..
( 2 ) - Would becoming a "Device Owner" (like in the "Device Owner" Android Code Sample in Android Studio) be of any help?
I'm at a total loss for ideas at this point, and can't figure out how to do this..
Note that I am actually trying to turn OFF a setting, NOT on.. But I doubt that makes any difference..
If anybody could please provide me with some answers to my questions, I would greatly appreciate it!
Any information whatsoever would greatly help me!
Thanks!

I'm curious, why do you want to turn off the setting instead of requesting user to turn it off?

skychin said:
I'm curious, why do you want to turn off the setting instead of requesting user to turn it off?
Click to expand...
Click to collapse
Because in the way I intend to implement it, the user would have already asked for it to be turned off.. I just dont want them to need to go to an entirely different "System Settings" screen or whatever in order for them to do it.. I just want them to have the option to do it from within part of my App..
But your followup question which I've just quoted and answered, does nothing to help answer MY question unfortunately
Does anybody actually have any answers that could be of assistance to me?
I'm thinking if my App requests access to be added as a Device Administrator (similar to how NOVA launcher does it, for gestures and other things), it could open up my ability to do what i'm trying to do..
Can somebody please verify this, or give me some additional info?
I would greatly appreciate it..

Related

Owner Information

How the Hell do you enter owner info on the start screen. you know the "this device belongs to: "
was wondering about this too...if there is a lock screen (like the pattern thingie) so when someone finds it they cant open it, how will they know whos phone it is?!?! All my other phones I could put in something like, if found, please call ##...
friguy3 said:
was wondering about this too...if there is a lock screen (like the pattern thingie) so when someone finds it they cant open it, how will they know whos phone it is?!?! All my other phones I could put in something like, if found, please call ##...
Click to expand...
Click to collapse
For pattern lock: Settings > Location & Security > Security Lock
From there you can do a passcode or the pattern. I personally use pattern because it can replace the slide to unlock all together while keeping it secure.
I got the pattern lock....but what about adding a note or your personal contact information, thats whats missing...thanks
If there is a way, I haven't found it. I know you can do it on rooted devices, depending on how the rom is set up, but as far as the droid x, I haven't seen a way to do it. You can download an app from the market that will call your phone if you lose it. Also there are apps that will find your phone on GPS. I know this isn't really what your wanting to do, but it will help you if it gets lost.
after many hours on the net I found the answer. you get this by installing the antivirus program from the apps market. you change the "this phone belongs to:" by going to the antivirus program and pressing the menu button form there go to settings, then remote management and finely lost message. you can change the whole message
antirice said:
after many hours on the net I found the answer. you get this by installing the antivirus program from the apps market. you change the "this phone belongs to:" by going to the antivirus program and pressing the menu button form there go to settings, then remote management and finely lost message. you can change the whole message
Click to expand...
Click to collapse
That's just specific to that app. There is no way on the stock rom to set this information you are looking for. Just add a contact called Me to your contact list. That way if you lose the phone, somebody may call you (If they don't keep the phone)
antirice said:
after many hours on the net I found the answer. you get this by installing the antivirus program from the apps market. you change the "this phone belongs to:" by going to the antivirus program and pressing the menu button form there go to settings, then remote management and finely lost message. you can change the whole message
Click to expand...
Click to collapse
Too much work for something too small I think.
One way is to update your wallpaper image to have the text you want (using your favorite image editor). Of course then it'll show on the normal home/launcher as well. But a short "Belongs to John Doe, (555) 555-5555" towards the bottom-center should work.
just found WidgetLocker Lockscreen. I havent tried it yet but I guess you can put widgets on the lock screens so I can put a note there with all this information...worth a try

[Q] How to add a password on nook rooted

Hi
Thanks to the forum, I have rooted my Nook touch. I can access my emails and the market. But nothing is protected.
Is it a way to add a password to the Nook? or how can I set up the apps so they asked for a password.
Thanks
Secure your hacked Nook
There seems no solution to this at this moment but there are some workaround security mitigations.
1. Do not connect public Wifi to use your Nook. Use your own private Wifi and turn on AP isolation (i.e. Wifi clients on the same WLAN are isolated)
2. Install on Nook adbWireless and control adb ON/OFF over wireless
hxxp:// www .appbrain .com /app /adbwireless-(widget-version)/siir.es.adbWireless
SC Leung
Securing after TouchNooter 1.6.24
Would reverting to the original uRamdisk of the stock Nook touch make it secure?... i know it would make adb over wifi unavailable but if that is fine with me...
Somewhere on the forum is attached ramdisk that should enable adb over usb. The topic is something like "adb over usb"..
If you wish to lock single apps, I have had great luck with Protector. You can define any apps you want to be locked and when you try to open these apps, they ask for a password.
https://market.android.com/details?id=com.androidpassword.core&feature=search_result
I have not tried it on the new Nook myself but give it a try.
Lock
Use GoLocker
Go locker does really add number lock (iphone style) or connect-the-dots lock (android style) but they tend to leave a shadow on the screen, which was bothersome enough for me to stop using, and the number lock would show the number before becoming a *, so someone could look over your shoulder and pick it up...
Almost good! But the best choice so far for entire NST locking so far!
GO Locker: so far, little luck
Downloaded Go Locker.
It detected an outdated Go Launcher; I approved the download.
Enabled Go Locker and specified a PIN.
Cycled power on the Nook.
Behavior change: I can select among Go Launcher, Go Locker and Home when I press the Home soft button on the right of the screen. Makes sense.
But no request for a PIN.
Perhaps I missed one or more configurations steps?
Any suggestions?
Best regards,
drjekyll said:
Downloaded Go Locker.
It detected an outdated Go Launcher; I approved the download.
Enabled Go Locker and specified a PIN.
Cycled power on the Nook.
Behavior change: I can select among Go Launcher, Go Locker and Home when I press the Home soft button on the right of the screen. Makes sense.
But no request for a PIN.
Perhaps I missed one or more configurations steps?
Any suggestions?
Best regards,
Click to expand...
Click to collapse
You need to set GO Locker as the default so you can't just press home to bypass the lock, and when you reboot it doesn't start immediately unfortunately. But next time you lock the screen it should be there.
Thanks. I set the Go Locker as the default, but I did not see the locking work after reboot, nor how to lock the screen manually.
But my main concern is that approximately 40% of the screen was going grey, making icons and text in that area unusable.
So I removed Go Locker for now.
Is documentation available somewhere? With a quick check of the developer site I did not see enough.
Hi
Excuse me for my bad English writing.
......
I active internal android pass code on may NST. but I can't remove it !!!
however i like it .
for do it you need install ADW louncher . but you don't need any additional program and after uninstalling this launcher , pass code still exist .
in " ADW launcher desktop " do this steps :
Menu > Add > Custom Shortcut > Pick your activity > Activities >
next find "Settings" and collapse it . ( it is your android settings )
next find " Passcode(.ChooseLockPin) " > OK
Click on Shortcut you create ........ WOW !
select passcode.
remember you can't back to previous state !!!
if anyone could remove passcode please notify me .
hshsh said:
Hi
Excuse me for my bad English writing.
......
I active internal android pass code on may NST. but I can't remove it !!!
however i like it .
for do it you need install ADW louncher . but you don't need any additional program and after uninstalling this launcher , pass code still exist .
in " ADW launcher desktop " do this steps :
Menu > Add > Custom Shortcut > Pick your activity > Activities >
next find "Settings" and collapse it . ( it is your android settings )
next find " Passcode(.ChooseLockPin) " > OK
Click on Shortcut you create ........ WOW !
select passcode.
remember you can't back to previous state !!!
if anyone could remove passcode please notify me .
Click to expand...
Click to collapse
Solution by Gabrial http://forum.xda-developers.com/showpost.php?p=22110415&postcount=5
ok.
I edit my post too:
Solution by Gabrial : http://forum.xda-developers.com/showpost.php?p=22110415&postcount=5

Edge 7 Problems

Hello,
I'm starting to hate my S7 Edge, and I'm really missing my Edge 6 Plus. Has anyone else had these problems and perhaps have any advice for resolving them? I've searched around and can't find any other reports of these problems.
First, if I'm traveling, *sometimes* I can't use the Google Navigation App if I'm in motion. For example, if I'm driving home, and I decide to get gas, if I say "OK Google, navigate to the Gas Station" It will of course find a close gas station, and allow me to choose which one. After I do so, the app will plot a course, but then will fail to acquire a satellite. The app will just sit there constantly saying "Acquiring Satellite" (or something to that effect, I can't remember the exact error) but it never does find the satellite. The only fix for this is to repeatedly turn off and on the Location services, until eventually it just works. Which is extremely infuriating not to mention dangerous while driving. I rememeber falling in love with my S6 Edge Plus because it had such an easy time navigating and this S7 Edge is so consistently terrible at locating my position.
Second, this is a problem I did not know I had until today: After mis-placing my phone, I went to the Google "Find my phone" web page on my computer, to force my cellphone to ring. I have used this service before with all my other phones and it never failed to force the device to ring. But this time, my S7 did not ring. Luckilly I was able to find my phone on my own. When I did locate it, i noticed that there was an icon in the notification tray saying "Ringing phone" and yet the phone was NOT RINGING! With the phone in hand, I tried to use the webpage to locate my phone by ringing it again. The same thing happened. It put a notification up that my phone was "ringing" in the phone's notification display, but made no actual noise.
I checked the settings - > Lock Screen and Security -> Find my Mobile, and it asks me for my Samsung Account Password.
Why my samsung account? Why not google? I don't understand.
So I signed in, and google location service is set to ON, as expected. Remote controls is also set to ON. There is a notification at the bottom that says to track and control my device, go to: findmymobile.samsung
So I go there, and I tell it to ring my phone, and what do you know? It rings my phone perfectly. Noise and everything.
How do I switch it over to google's service? I really don't like most of Samsung's software offerings, and would prefer to use native google apps out of convenience. I don't remember ever having this problem with any other galaxy device. Not even my tablet does this.
Can anyone help?
I haven't had any GPS problems with mine (U.S. Sprint version). What are your location settings? Make sure it's set to use GPS, and not just network or WiFi.
Find My Mobile and Android 's service are two different things FMM is Samsung's product. To make sure Google's is active, go to Device Administrators and make sure Android Device Manager is turned on. Then go to Apps, scroll to the bottom and tap on Google, then scroll down and tap on Security. Make sure 'Remotely locate this device' (and 'Allow remote lock and erase' if you want that) are turned on.
meyerweb said:
I haven't had any GPS problems with mine (U.S. Sprint version). What are your location settings? Make sure it's set to use GPS, and not just network or WiFi.
Click to expand...
Click to collapse
I have GPS, WIFI and Mobile Networks turned on.
meyerweb said:
Find My Mobile and Android 's service are two different things FMM is Samsung's product. To make sure Google's is active, go to Device Administrators and make sure Android Device Manager is turned on. Then go to Apps, scroll to the bottom and tap on Google, then scroll down and tap on Security. Make sure 'Remotely locate this device' (and 'Allow remote lock and erase' if you want that) are turned on.
Click to expand...
Click to collapse
-Android Device Manager is turned on in the Device Administrators Section.
-I am not sure how to complete the second instructions. I do not see "Apps" as an option in the Settings panels. Can you advise where to find it?
Thank you!
Kirren said:
-Android Device Manager is turned on in the Device Administrators Section.
-I am not sure how to complete the second instructions. I do not see "Apps" as an option in the Settings panels. Can you advise where to find it?
Thank you!
Click to expand...
Click to collapse
Settings / Applications
Scroll to bottom, tap Google (on my Sprint S7 Edge, it's the very last item).
Scroll down until you see "Security" and tap there.
The first two toggles (on mine) are "Remotely locate this device" and "Allow remote unlock and erase."
meyerweb said:
Settings / Applications
Scroll to bottom, tap Google (on my Sprint S7 Edge, it's the very last item).
Scroll down until you see "Security" and tap there.
The first two toggles (on mine) are "Remotely locate this device" and "Allow remote unlock and erase."
Click to expand...
Click to collapse
Ah, I was able to find the settings under Google, however both are already checked. Are there any other settings I need to check?
{{Edit: I toggled the setting just to test it, and now it seems to be working. I don't know why this worked, because the setting was already properly configured. But it works now. *shrug* Thank you so very much for your help and patience!}}
Glad to help. I seen lots of things get fixed when you toggle a setting. Something in the settings file got corrupted, and toggling the settings on and off rewrote what should have already been there. At least that's my guess.

Smart Lock missing on H1611

I want my lock screen disabled while I'm at home and at work.
According to Google:
"Smart Lock for Android. Security that just works: with Smart Lock turned on, your Android phone stays unlocked when it’s connected to a trusted device — like your smartwatch — or when it’s in a familiar spot — like your pocket. So it’s ready to use when you need it.
How to turn on Smart Lock for Android:
On your Android phone, go to Settings > Search and type in “Smart Lock.” Then tap “Smart Lock” to customize how your device knows when it’s safe to stay unlocked. "
Well, nope. Not there. For some reason, the only "Smart" search result is "Smart unlock," which allows a Bluetooth device to wake up the phone. Anybody know how to get the real Smart Lock enabled?
[edit] - sorry, I should have posted this in Questions and Answers, but I don't have rights to delete this post or move it.
Go to settings, advanced, security, and find 'trusted agents' at the bottom. Make sure smart Lock is enabled, and then check for it again.
I'd try, but that'd require setting a screen lock, which I haven't found a way to disable after setting.
-n0cturne- said:
Go to settings, advanced, security, and find 'trusted agents' at the bottom. Make sure smart Lock is enabled, and then check for it again.
Click to expand...
Click to collapse
I appreciate the response. I was able to find Smart Lock within Trusted Agents, but enabling it did not add the feature to the phone's settings, as far as I can tell. I tried rebooting the phone. No change.
I guess its yet another problem with EMUI.. https://www.xda-developers.com/smart-lock-on-huawei-honor-devices-emui/

Drop-down menu available when the phone is locked !!!

Dear experts,
Today I got my Mi 9T. Still trying to find my way around, but... I find it PRETTY
ASTOUNDING, that when the phone is locked, I am able to swipe down on the
LOCKSCREEN, and I see all the icons for turning on and off of VITAL functions
like ringtone, wi-fi, mobile data...
This poses a SIGNIFICANT security risk, because anybody who steals the phone,
can turn off wi-fi and mobile data and then the Find my phone feature simply
won't work.
So, what is the solution to this ? I didn't find a way to disable that menu from
being shown in the lock screen...
Or maybe the Find my phone feature works when wi-fi and mobile data are off ?!?
Many thanks for your professional comments on that!
P.S .: I think it is like that on Samsung phones as well !!! WHY ?!?
I understand your concern, the drop down menu (aka Notification shade) can be dragged down on lockscreen and it is like this on every aosp kind off ROM....
But I am very sure that the icons CANNOT BE OPERATED unless you unlock the screen.
Try to turn off wifi and it should ask for password to unlock.
Can you check it out and conform it?
Settings -> Notifications -> Lock screen notifications* -> disable "Open notification drawer on the lock screen".
* the picture/icon on the left. It's not obvious it's a submenu (nor that there's such a critical setting hidden inside) because for no apparent reason they've decided to use a totally different design language here.
Thanks. Was great to read this, however I don't have this option... I only see apps, format and open notification shade... Nothing about the drawer
Any other ideas ?
darkman088 said:
Thanks. Was great to read this, however I don't have this option... I only see apps, format and open notification shade... Nothing about the drawer
Any other ideas ?
Click to expand...
Click to collapse
That is the one. Notifications / Lock screen notifications / Open notification shade on lock screen - set it off and you won't see it on Lock screen anymore
I found it!! Was just too slow to report here. It is called "Open notification shade on lock screen" !!
THANKS A LOT to everybody !!
darkman088 said:
Dear experts,
Today I got my Mi 9T. Still trying to find my way around, but... I find it PRETTY
ASTOUNDING, that when the phone is locked, I am able to swipe down on the
LOCKSCREEN, and I see all the icons for turning on and off of VITAL functions
like ringtone, wi-fi, mobile data...
This poses a SIGNIFICANT security risk, because anybody who steals the phone,
can turn off wi-fi and mobile data and then the Find my phone feature simply
won't work.
So, what is the solution to this ? I didn't find a way to disable that menu from
being shown in the lock screen...
Or maybe the Find my phone feature works when wi-fi and mobile data are off ?!?
Many thanks for your professional comments on that!
P.S .: I think it is like that on Samsung phones as well !!! WHY ?!?
Click to expand...
Click to collapse
funny thing is to today I was looking up how to secure my phone as I still have access to a lot of things by just pulling down the drop menu so ja since when has security become so weak and its mostly on expensive androids phones that its happening I have a button type phone made by vodacom yet its security is more secure that mine it has the ability to set users on the hotspot which makes you think that you actually wasting on expensive when the main purpose is to be secure I also punched into to YouTube and I searched for secure yet all the results is lol how to unlock any android this is insane and I FEEL THAT BY ROOTING YOUR PHONE AND GIVEN AN OPTION TO CHANGE LIMITED ACCESS WE SHOULD BE ABLE TO AT LEAST HAVE MORE SECURITY ON OUR PHONES
hwandroid said:
That is the one. Notifications / Lock screen notifications / Open notification shade on lock screen - set it off and you won't see it on Lock screen anymore
Click to expand...
Click to collapse
No such option seems to exist on Asus Zenfone

Categories

Resources