Tasker/NFC - Running tasks while phone is locked? - Android Q&A, Help & Troubleshooting

Just a basic question I think...
Should tasker natively be able to run tasks from the lock screen or while the device is sleeping/display off?
I'd assumed so, but so far my NFC tasks only work while the device is unlocked. I've got Hue Pro Tasker set to respond to NFC tags that turn on devices around the house. I've been having to unlock the my phone to get it to read the tag and run the task.
All said, I'm running on a Nexus 6 (rooted). Maybe Lollipop or the device is part of my issue, I'm not sure.
Thanks!

Related

[Q] Multiple Android devices, synchronized alarms, remote(?) snooze/dismiss

I have a somewhat complex question, and I am hoping that someone knows a good approach or apps that I can use.
I have Android devices in multiple rooms around my house, primarily set up as clocks, all on the home wi-fi network, of course. I have a primary phone, a couple of retired phones with wi-fi only, a couple of tablets with wi-fi only. (My eventual goal is to have them all connected together for several purposes, including an intercom system; this current project is a stepping stone.)
I have reminder alarms that go off all day long. Due to physical problems, the ability to control an alarm remotely is very handy.
I used to have the reminder alarms on my chumby, and I could ssh into that and control the alarm. I could change the alarm time, snooze, turn alarms on or off, etc. I used to just ssh into the chumby, then leave that konsole open on a virtual desktop on the linux machine, and switch to it when I needed to access the chumby. I also had an android remote control for it, very spiffy.
Sometimes, though, I was in another room and I didn't hear it. Problematic.
Yes, my obvious solution is to put all the alarms on my phone and carry it with me all the time. Except if I were the sort of person who has a mind like a steel trap, I wouldn't _need_ the reminder alarms in the first place It doesn't help much if the phone alarm is going off and it's three rooms away. Either I won't hear it, or I'll have to get up to shut it off, and I might not be able to.
So here's what I'd like to do:
* For each alarm, ALL the android devices sound off.
* Snoozing or dismissing the alarm from one device snoozes or dismisses the entire alarm (they all stop making noise, and they all start again when the snooze is up).
* Snooze or dismiss the alarms from my linux box with the same effects as from the android devices.
* Have some way to direct the alarms to just my phone until further notice--when I am going to be out of the house, I'll still need those reminder alarms, and the poor dogs don't need to deal with alarms sounding for hours until I get home.
1) It seems like the easiest way to manage this would be to set up something like a streaming media server on the linux box, and have it play on each of the android devices at times set up in a crontab. I *think* it was possible to stream media through multiple chumbies at the same time, so surely it's possible to do it through multiple android devices? Yes?
But I don't know how to use one to snooze a program set off by a crontab. I also don't know how to divert all the alarms to my phone [for use when leaving the house] if the alarms are primarily controlled by a linux server at home. I don't think my wi-fi reaches that far.
2) It seems like the next-most easy way to do this would be some kind of script that remotely controls the various android devices, but I have no idea where to start. I do know that you can access the terminal on an android phone, you can write shell scripts, and that you can ssh into phones if you have the right apps. What I don't know is how to control the android alarms from the command line or how to synchronize media on multiple devices.
Again, I'd want to snooze/dismiss alarms from any of the android devices on the wi-fi network, or from my linux computer.
I'd want to be able to turn off all alarms except the primary phone occasionally. It'd be awesome if the other devices could automatically detect if the phone were on the network, and only sound if it were present.
3) Other options? Are there apps or programs or scripts or methods that I don't know about, that would make this easy-peasy? Am I fretting when there is already a solution?
Thank you.
Bump? Please? Anyone? Anything?
Well, I'm just throwing my thoughts out there. This definitely sounds like a difficult task.
I assume that you are not able to write your own android apps, neither am I. So we just can't build our own solution.
I don't have an idea that solves all your questions, but I have some ideas for some of them.
Regarding your need to change the behavior if you leave your perimeter:
There are apps that can trigger predetermined tasks based on your location (wifi, GPS, etc), so you could use that.
You definitely need some kind of Webserver, connecting your phone to the other devices when you're on UMTS.
There are apps like "Android lost" that enable you to remotely control your devices, for example triggering alarms, etc. Maybe you could put that into some use.
Regarding your idea with the streaming server:
Could you set up all the devices so they start playing as soon as the server starts streaming? Maybe let vlc constantly run listening to your server on all the devices. Or a Internet radio is probably better because it can run in the background playing "silence" the whole time.
Create a shortcut on all devices to send a command to the server to stop the streaming, those servers should be manageable through ssh.
Install a normal alarm on your phone. Combine this with the location based triggering, so it is only turned on while your outside your house. Have a shortcut on your phone to manage the server and the house alarms as well.
I think this might work and should be actually be possible to realize.
I know this is not well written at all and not really in a straight line, I just made it up on the fly.
I'll try to turn it into a Tl;dr
1. Set up Internet radio server on your home network.
2. Tune all house devices in to said server.
3. Play alarms over Internet radio
4. Use command shortcuts to turn off alarm
5. Use app to automatically toggle the alarm on your phone based on your location.
6.???
7.profit
Let me know what you think, especially if it was any help at all. I like projects like that!
Sent from my GT-I9300 using xda app-developers app
Okay, great, that is really helpful and gives me a place to start Thank you!
I do have Tasker, and I'm willing to buy other apps if they look like they'd help, but I think Tasker is probably going to be my biggest help with the location detection.
I do not have any idea how to tell Tasker "turn off alarms on [primary phone] phone if [home network] is detected, turn on X, Z, and Q alarms if [home network] is not detected." I've played around a bit with it and realized that getting Tasker to execute specific actions with other programs--in this case, Alarm Clock Xtreme--is really kind of obscure, if it's even possible. It must be possible, yeah?
--Wait, is there an alarm clock for the Alarm Control Freak that will *also* detect [home network]? I loooove the way I can use Alarm Clock Extreme: unlimited numbers of preprogrammed alarms, just toggle the ones I need; all kind of options with respect to what happens when the alarm goes off, choice of snooze duration, etc etc. If there's one like that that _also_ has the option to detect location, that would be awesomeness.
Or...hmmm...I suppose I could have it freeze Alarm Clock Xtreme if it's on [home network] but activate it if it's off. I really do have to get around to rooting the phone, I suppose.
...
Do you have any suggestions for what to use for streaming from the house server, and what apps to use for receiving the streaming? Oh, I see you mentioned VLC (for some reason my brain parsed that as VPN); I'll look into that.
I think if there's a decent app for listening to streaming (suggestion welcome!), and the server can stream to all the devices at once, I can probably figure out how to use just one device to ...mute the server? (With the app itself, or a shortcut, or a short ssh script maybe.) Since they all need to be listening 24/7, muting is the thing to do, right? If I turn off the server, that could make them disconnect or stop listening, right?
I still need a snooze mechanism, though. Among other things, sometimes I need to postpone whatever the reminder alarm is going off for; sometimes I need it to help me keep track of the passing of time after the alarm goes off. It's complicated. I need to be able to snooze.
...
Question: In this setup, how do we prevent the alarms from going off on all the devices when the primary phone has left the house? I can see how we get the alarms on the primary phone TO go off, but not how we turn off the streaming alarms. I mean, I don't know how to tell the server to stop serving if it can't detect [primary phone]; is that possible?
It's not that I object to music playing when I'm not home. It's that if the dogs wake up while I'm gone, they'll need to pee. I'd really, really like not to have to clean that up every time I leave
Hm. A kind of bulky and inefficient way to do it could be turning off the streaming on the devices. Perhaps have them turn off the streaming app when the phone leaves the network, and then start it up again when they detect it again.
This is slightly problematic, because my house has very, very, VERY bad reception inside. We have to have a repeater (effectively a second network) for The Spouse's computer, which is FIFTEEN FEET from the wi-fi router. With no walls between. Really, really terrible reception. My phone drops off the wifi network, and immediately reconnects, dozens of times in a day. So does my laptop.
Soooooo I probably need a better metric than "is [primary phone] visible on wifi? No? TURN IT ALL OFF!" Maybe this is better: "Has [primary phone] been off the network for 15 minutes? Okay! TURN IT ALL OFF!" But reconnecting would still be a bit of a pain, unless the other devices only check for re-connections when the streaming app is already off. Hmmmm. I suppose they could check, say, 20 minutes before an alarm is due to go off, then 5 minutes before, and otherwise not check at all.
Except that, drat, it's the server that knows the alarm times, not the devices. They're _mostly_ on the hour, but not always. And what if I forget and it's partway through a "snooze" when I'm heading out the door? They should definitely shut off rather than continue once the snooze duration is up.
...
Nuts, it looks like this is not going to be the jumping-off point for a whole-house intercom system the way I hoped it would be. Not if everything is strung though the server, which is only working with streaming media. I could really, really use that intercom system. I just want to be able to touch a shortcut on one device and have all the rest of them repeat whatever that device hears. Then tap it again [to stop broadcasting] and let someone else respond, if they want to, from another device, the same way.
This will eventually need to reach to an outbuilding, with either a cat6 line run to it or a wireless repeater, so bluetooth won't do. I'm wondering if Skype set up to call all the other devices in the house would do it, but I want push to talk, not push to dial. (Not to mention the pain in the neck of giving each wi-fi only device a whole voip setup.)
(The various intercom apps I've tried don't work very well. The first time one of the devices leaves the home network, they never seem to reconnect and accept transmissions again. Even the apps that are _supposed_ to work if they have ANY kind of reception, including mobile data or other wifi networks.)
...
You've given me a lot to think about, thank you. But I know I am not there yet. I am wide open to further suggestions, for mechanisms, for apps, for anything!
Just a quick reply to signal you that I'm still there
I, hopefully, will come back later with a more detailed answer.
Regarding your WiFi connection problems, are you living in an area with a lot of different wireless networks present? Because this sounds to me like the channel your WiFi router is set to is already overcrowded. At such a close distance, as you described, there should be excellent reception. Unless other signals interfere, causing your mentioned frequent disconnects.
Solution: Download the free app "WiFi Analyzer" from the market and run it to see if other networks are causing interferences.
Regards, Ichwillquark
ichwillquark said:
Regarding your WiFi connection problems, are you living in an area with a lot of different wireless networks present?
Click to expand...
Click to collapse
Ah, no, actually. Quite the opposite. We're way out and surrounded by non-technically-minded people. We're the only wireless network anywhere near here, according to, for example, OpenSignalMaps and The Spouse's various wardriving type apps. Hm, pretty sure he uses Wifi Analyzer too, actually.
It's the freaking HOUSE. We can't get _any_ reception inside; not wifi, not cell, not radio, not TV. Go three steps outside the house and we have crystal-clear cell and radio reception. We've _tried_ to change "channels" on the wifi router, change routers, change DSL modem, all kinds of things; nothing works. It's the freaking house.
Being so remote is part of the problem. I have reminder alarms that go off all day; if I leave, I am gone ALL day. The poor dogs!
...
Thanks for bouncing the signal and letting me know you still exist I do too. Would love to hear anything else you have to suggest. [Hey! I think I finally hit the minimum post limit necessary for being able to click "thanks!" Spiffy!]
I don't know how helpful to you this could be, but Timely, a recently created alarm clock app has alarm syncing. I don't know to which extent (snooze sync?) but it might be worth inquiring to the creator(s).
There's a trial function too from what I can remember, but after that you will need to purchase whichever functions you'd like to keep.
https://play.google.com/store/apps/details?id=ch.bitspin.timely
If this suits you, I imagine it would be more convenient than a convoluted Tasker task.
polobunny said:
Timely, a recently created alarm clock app has alarm syncing.
Click to expand...
Click to collapse
"Manage, dismiss and snooze alarms on all your devices at once"
Oooooooh, that sounds WONderful!
That does sound a lot easier than running a media stream from a server, and working out scripts to snooze or dismiss.
I don't _see_ any mention of anything except a ringtone for the alarm sound, either on Play or on their website. I'll try it out and see.
...
The Tasker [or some other location detection] looks like it's still going to be necessary, though, and I still don't know how to do it. I need to disable the alarms on ALL the other devices when I--and the primary phone--leave the house. But the alarms on the primary phone still need to go off.
So I do still need some way for [something] to detect the phone, and to disable the alarms on [everything else] when it leaves the house.
...
Oh, POOP. Timely is not *compatible* with some of the devices.
Those are rooted Sensations with ancient versions of Android. If I put updated ROMs on them, will they be able to handle more recent apps? I mean, they can't even get Google Play, currently, they're still using Market. We didn't want to mess with them, because re-setting up a phone is annoying enough once, and we _thought_ they had all the apps they were going to need.
elfchick said:
Oh, POOP. Timely is not *compatible* with some of the devices.
Click to expand...
Click to collapse
I might be wrong, but this might be just because the resolution of some of your devices is not supported. Which doesn't necessarily mean that the app won't work just fine, it's just the market trying to safe you from an inconvenient user experience. A possible workaround would be to download the app on a supported device, extract the apk, and then install them on the unsupported ones.
Other workaround would be to get an app that spoofs the information that is send to the market about your device's resolution. I just read about this possibility today. The xposed framework has an applet that does that.
Interesting about the possibilities of getting an app installed without the Market's "approval"; I'll try that if Timely responds to the questions I sent them. And hey, if it's just that I have a really old ROM on there...well, it might be worth updating the version of Android on those phones anyway.
...
I just read about NFC tags, and I wonder if I could use them for this. Apparently you can buy NFC tags and program your phone to recognize them. So you can, for example, save battery by tapping the phone to a pre-programmed NFC tag on your door as you are leaving, and the phone will turn off wi-fi.
Perhaaaaaaaps I could use this in some way to turn off alarms in the house as I am leaving. Tap the NFC tag, a script disables the alarms on everything but [primary phone]. Tap it again when I get home, re-enable the alarms. That way nothing has to be constantly checking for the presence of [primary phone]. I can be scatterbrained, but if I put it by my keys I *should* manage to see it and remember to tap it, and tap it again when I get home and put my keys away.
Very intriguing. This seems like it _might_ be something I can script. As soon as I figure out just what I need to do to disable and re-enable alarms automatically.
Don't forget it's necessary for your phone to be NFC enabled. So definitely the Sensation cannot use the NFC directly, don't know which phone is your primary so that's to consider.
polobunny said:
Don't forget it's necessary for your phone to be NFC enabled. So definitely the Sensation cannot use the NFC directly.
Click to expand...
Click to collapse
Yeah, thanks The Sensations were retired this year when we replaced them with HTC Ones, so not a problem. I thought it'd be more clear, though, throughout the thread, if I use phrasing with descriptors like [primary phone] instead of expecting people to rmemeber which of my devices is which. (I found this thread hilarious; I could almost have been the one who wrote it: http://forum.xda-developers.com/showthread.php?t=2486180 ...very helpful.)
I'm thinking touch the NFC tag on the way out and the way in, and [...profit?] the HTC One somehow sends signals to the other devices to disable/re-enable their alarms. Don't know how to do this yet, but it seems like a MUCH better idea than having all the other devices constantly scanning the network to make sure they can find [primary phone]. Especially since they might be trying to find it while it's temporarily disconnected.
Hey elfchick, just following up as you mentioned that syncing multiple devices for an Alarm clock app was just a first step and I was wondering if you had taken this concept any further?
I've got several unusual ideas about setting up tablets as Home Automation devices and wondered if you had taken this idea any further.
Thanks, Earl

Location-based Smart Lock not working - what am I doing wrong?

Is it just me or does location-based Smart Lock not work? Basically, even though I setup my home location (I even used other troubleshooting steps where they tell you to setup multiple pins, etc)... but the phone never stays unlocked at home. Is it just me?
VS996, 20j... stock rooted ROM.
What am I doing wrong?
@schwinn8
After reading your post I checked my Smart Lock settings and I see that I had to re-enable them. I don't know why this is, but it's not the first time. Not sure if I checked when I upgraded to vs996 20j. I think it's just one of those things that don't work as advertised. Like On-Body Detection.
Yeah, I was hoping that I could do the same with bluetooth detection (ie, if a certain BT is around, then it would remain unlocked) but it seems even that option requires that you're connected to that device, not that it's just nearby. Very disappointing that all this still doesn't work.

Enable passive NFC when phone is off or locked

I use my Xiaomi to open my NFC doorlock. However, it only works when the screen is unlocked. On my old LG G3 I could read the NFC UID even when the phone was turned off so I could get in even if the battery was too low to run the phone. This was the default behaviour. My door is the active transponder so I do not need to start an app on my phone. The phone must just transmit the UID when it gets energized by NFC. Maybe the secure element must also be active.
Where do I turn on this setting on a Xiaomi with MIUI 11?

Keeping TMobile V60 screen unlocked while at home?

Hello, is there a way to keep the phone from locking while connected to my Home wifi?
Yes, Google Smart Lock will do this. It does not work consistently, so you may need to go into it, disable your address (assuming you make it location-based) and re-enable it from time to time. You can also set Smart Lock to stay unlocked when paired to a device. It won't keep your phone unlocked more than 4 hours, but that's 4 hours of not having to put in your fingerprint or PIN #.
yep_nexus said:
Yes, Google Smart Lock will do this. It does not work consistently, so you may need to go into it, disable your address (assuming you make it location-based) and re-enable it from time to time. You can also set Smart Lock to stay unlocked when paired to a device. It won't keep your phone unlocked more than 4 hours, but that's 4 hours of not having to put in your fingerprint or PIN #.
Click to expand...
Click to collapse
Thanks nexus, exactly what I need.

Question Fingerprint unlock ON with periodic PIN screen lock?

Fingerprint scanner is very convinient, but not that much secure as PIN or password. Is there any way (preferrably for non-rooted Pixel 6) to force my phone to periodically ask for a PIN or password to unlock (once every hour or afrer X mins of inactivity or so), but still keep a fingerprint unlock on? I know I could schedule to reboot my phone, but the phone would be unavailable during reboot (no phone calls) and I think I would need some third party app to save and restore notifications (which can be lost during reboot). Any suggestions?
My aim is to prevent someone to force me to unlock my phone with a fingerprint. They could use a force to put my finger on the fingerprint scanner, but no one can get a PIN out of my head. Yeah, I'm paranoiac - there's no need to remind me ;p
In that case, best and only solution is to stop using fingerprints. Just use pin and turn on notification history.
And what about available options for this matter on rooted phones? Is there any way to force Android to lock a phone with a PIN after X minutes? I don't want to stop using fingerprint scanner completely, but at the same time I don't want it to be the only screen unlocking option. I don't believe there's no way to accomplish this.
Alternatively I came up with an idea to make a "soft reset", kinda like on older Windows OS where instead of rebooting entire OS we could simply kill and restart explorer.exe process (I used to do that after installing some software which wanted to reboot my OS before first use). Does anyone know if such thing is possible and how to make it? I guess if it would be similiar approach to the one I used on Windows (restarting some process) then I could simply schedule some script to run every hour or so, but what that script would be?
Maybe use Tasker, and set a profile that open an app every amount of time?
I always have used this "lock" app, basically lock the phone so only with the password you can unlock it.
It's free, no ads or bs.
Lock - Apps on Google Play
Ultra-simple lock screen
play.google.com
snake218 said:
Maybe use Tasker, and set a profile that open an app every amount of time?
I always have used this "lock" app, basically lock the phone so only with the password you can unlock it.
It's free, no ads or bs.
Lock - Apps on Google Play
Ultra-simple lock screen
play.google.com
Click to expand...
Click to collapse
Thanks for suggestion, I'll check that out later, but I'm quite doubtful it'll work as the app you suggested seems to override other screen lock options, so it would switch off fingerprint scanner once activated. I'll give it a try though.
There is already a built in function called 'lockdown'. I don't know if can be triggered via Tasker though.
Choose when your Pixel phone can stay unlocked - Pixel Phone Help
You can keep your Pixel phone unlocked in some situations, like when your phone is in your pocket or connected to another device you use often. When you use Smart Lock, you only need to unlock once wi
support.google.com
Turn on lockdown​Important: Lockdown will only work until you unlock your phone. If you want keep using lockdown, turn it on each time you want to use it.
Hold the power button for a couple seconds.
Tap Lockdown. This turns off notifications, fingerprint or face recognition unlocking, and Smart Lock while on your lock screen.
Click to expand...
Click to collapse
chaimav said:
There is already a built in function called 'lockdown'. I don't know if can be triggered via Tasker though.
Choose when your Pixel phone can stay unlocked - Pixel Phone Help
You can keep your Pixel phone unlocked in some situations, like when your phone is in your pocket or connected to another device you use often. When you use Smart Lock, you only need to unlock once wi
support.google.com
Click to expand...
Click to collapse
Right, I forgot about it, but as you noticed - I also don't know if it could be triggered via Tasker. I think it's time to finally play with Tasker for a bit. Fingers crossed!
$ROGAL$ said:
Right, I forgot about it, but as you noticed - I also don't know if it could be triggered via Tasker. I think it's time to finally play with Tasker for a bit. Fingers crossed!
Click to expand...
Click to collapse
Please report back on your findings

Categories

Resources