• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Having Issues with the Keygaurd task

clawlan

Newbie
A am trying to create a profile that runs when my HTC DNA phone connects to my car's bluetooth network. When the phone pairs, I want a couple different apps to open up. I first learned that if the phone's display is off, then the apps won't start. So I added the Secure Settings plugin and added a WAKE task to happen first. But even though the screen turns on now, the keygaurd is still active which prevents the apps from running. So the next thing I did was add a task to turn keygaurd OFF after the WAKE task, then run the apps, then turn the keygaurd back ON.

The issue is that the keygaurd ON behavior is wonky. It's not really turning it back on until I exit one of the previously started apps. For example, There are two apps that the task started. When I exit one of them, all of a sudden the keygaurd locks and i have to unlock it again to exit the 2nd app. Ideally, the keygaurd should just be re-enabled in the background for the next time the device goes to sleep as per normal, rather than forcefully activating it immediately after exiting an app directly after the keygaurd was set back to ON.

Here is the Task:
  1. Secure Settings: Screen on
  2. Secure Settings: Keygaurd OFF
  3. Load App 1
  4. Wait 3 seconds
  5. Load App 2
  6. Secure Settings: Keygaurd ON

Anys ideas?
 
In my experience, for what it's worth, messing with the keyguard is just more of a headache than it should be.

As your connecting via bluetooth, I'd suggest the following.

App: car home ultra (there is a trial)
App: nfc retag (also has a trial)

Get and install an nfc tag on the car dock, that can kick off bluetooth and gps, then tell it to call upon a tasker task. Car home ultra has an option to 'keep display on' or you can use tasker to set the display timeouts to longer while it's docked.
 
In my experience, for what it's worth, messing with the keyguard is just more of a headache than it should be.

As your connecting via bluetooth, I'd suggest the following.

App: car home ultra (there is a trial)
App: nfc retag (also has a trial)

Get and install an nfc tag on the car dock, that can kick off bluetooth and gps, then tell it to call upon a tasker task. Car home ultra has an option to 'keep display on' or you can use tasker to set the display timeouts to longer while it's docked.

looking at NFC Retag, it looks like i wouldnt even need tasker since that app can run other apps which is essentially all i am using tasker for. Regardless, the 'keep display on' is not my issue. It's that the apps triggered by tasker wont run unless the keygaurd has been bypassed.

Is there a way to fake the normal finger swipe keygaurd bypass rather than completely toggling it OFF/ON?
 
Not that I'm aware of, but that doesn't count for much. I'm sure others will be able to help you further.
 
The keyguard involved tasks are as stated a real hit n miss. For me it works perfectly every time based on WiFi SSID connected status, but in the past on older Roms sometimes it would work sometimes not.
The only thing I could think off to check is are both Tasker and Secure Settings ticked as Device Administrators in your settings?
 
Thanks all for the suggestions. What I found works best is to move the KEYGAURD ON action to the exit task rather than being a part of the entry task. So, when I turn the car off and the bluetooth disconnects, the keygaurd reactivates and that seems to be working fine.
 
Back
Top Bottom