change N1 behavior/settings & automate tasks based upon connected bluetooth device? - Android Software Development

change N1 behavior/settings & automate tasks based upon connected bluetooth device?
I've had my ATT N1 for the past 1.5 wks and have been loving it. I know with the desktop dock for the N1 that bluetooth can be automatically enabled when docked (at least it does for me). i hope to see this go one step further perhaps. i've tried searching on the market and here on xda, but I haven't found anything that does what i'm thinking of...
I'd like the phone to change various behaviors (eg. sound alerts, screen unlocking, application launching, etc) depending upon the bluetooth device that it is paired with. Essentially, creating setting profiles dependent upon the connected bluetooth device and reverting settings when disconnecting from said devices.
I envision:
-connecting w/ car bluetooth:
disable screen unlocking (having to unlock via pattern while driving is not only annoying but possibly dangerous)
jump to a particular home screen, automatic launching of application such as car home, google maps/nav, music, etc
enable maximum screen brightness (if plugged in and charging could be another modifier. the N1 AMOLED really is pretty bad in direct sunlight and is even worse when trying to view while wearing sunglasses)
set max volume
upon disconnecting, revert to original settings, disable bluetooth
-connecting w/ desktop dock [bluetooth] (bluetooth isn't an absolute requirement here since it can recognize the dock due to the electrical contacts)
disable screen unlocking
silencing most alarms/alerts (so that i can sleep in peace w/o being woken up to by random spam/marketing emails overnight)
upon disconnecting/undocking, revert to original settings
are there any combination of apps/settings that can make this possible? at this point, i'm not too interested in rooting my phone...
thanks

BlueDock (market) plus Tasker (in beta, not yet in the market - http://tasker.dinglisch.net/).
In a future version Tasker will hopefully be able to do this on it's own. But currently you have to hack it useing BlueDock to start an application you don't really need, have Tasker detect the start, kill the app, and then change your settings according to your needs. One drawback is that the app started by BlueDock will only start once the phone is out of sleep mode. So you have to press the unlock button once - no need to swipe to unlock, though.
As for disconnecting you have to abuse the change in the power status.
The setup is quite complex. I will post my setup on the tasker wiki as soon as the next version is released (which will, I hope *gg*, provide a bugfix that make this a little smoother) and I have time. ;-)
I have a widget which I use to indicate whether I want to listen to podcasts (using BeyondPod) or to music. Upon switching on any of my bluetooth devices it will start playback and set the loudness according to the device connected - it will have to be louder with the car bluetooth than with the headset. Upon detecting the car bluetooth it will also start Waze.

interesting. i know what i'm asking is a bit complex. but i'll definitely keep an eye on Tasker. as they're mostly background tasks, any idea as to the battery consumption of these applications? (eg. surprisingly the "Shake Them All" live wallpaper i had installed was consuming up to 10% of battery time recently and was ultimately uninstalled even w/ those cute androids)

My usage pattern says:
40% Display
35% Calls
6% Standby
5% Android System
5% Phone inactive
2% EarthRot
2% Mediaserver
2% Android OS
Tasker isn't even listed.
Within Tasker I have more that a dozen profiles and about 30 tasks.

Related

Power control of the Vogue

Maybe this shows that I am a noob, but here it goes.
I want to save my battary power when running the GPS, but all the power saveing settings turn the phone onto standby, thus loosing GPS lock (and when I am using my better bluetooth GPS, it locks out the bluetooth and I have to re-boot). Is there some why to just turn of the screen? Is that "an app for that"? I am currently trying out SVM Power Manager, but you can not set it to turn the screen off in 2 minites or whatever. To use it how I need, I would have to turn off the OS's power saver, and always manualy turn off the screen using SVM Power Manager. All the power manager apps I have seen work like that.
Help!
you will probably have to buy an extended battery man. i think even real android phones batteries drain pretty quick from what i hear.
Did some testing. It seems that the battery will last for about 5h with the screen of (using SVM Power Manager to turn it off), and the GPS running (GPSed running it).
Understood that the battery is just under powered, but I was wondering if there was a way to make the screen automaticaly turn off after X amount of time, but not have the phone go into standby.
I also bought one of those battery powered battery chargers (battery extender). But the one I got turned out to have only 500mAh (compared with 1100mAh in the phone battery), so it turned out to only help a bit. Maybe I will try to make one with a voltage regulator and a rechargable 9V battery
I think one of the pmsleepmodes may support this (in default.txt) Try 2 or 3. It seems like one of these didnt do a full power collapse, but did turn the screen off.
katmandu421: I am not familiar with this stuff. Can you give me a bit of a more detailed explination?
Is this a built in windows mobile funciton. Can I access this in the registry?
I love it how most of us would assume he's talking Android. Yes in android, editing your default.txt to sleep mode 0 would turn off the screen, but not sleep the system. 1,2, or 3 would allow the different system board types used in various Vogues to go to sleep.
WinMo however is a different story. The GPS in the Vogue is a low power chip, but from everything I can gather is requires the system to stay fully awake. If you find an app that allows you to turn off your screen, post back but I don't believe there is much hope to that. Windows seems to think that when the lights go out, it's sleepy time.
Also, the radio on the Vogue doesn't sleep, and it's use to wake up the phone i.e. incoming calls. The GPS is part of the radio so if there is a way to keep the system board awake, in theory it should work.
SVM Power Manager will turn off the screen while keeping everything awake, but it is not automatic. I have maped the camera button to this program, so it is not a huge hassle, but I realy would like to have it automatic.
Will consider installing Android.
Titus_Andronicus said:
SVM Power Manager will turn off the screen while keeping everything awake, but it is not automatic. I have maped the camera button to this program, so it is not a huge hassle, but I realy would like to have it automatic.
Will consider installing Android.
Click to expand...
Click to collapse
Did anyone ever figure out how to do this? I'm trying to figure this out as well. After finally getting GPS to work, now I'd like to be able to use some apps that need to run when in standby.
mnations said:
Did anyone ever figure out how to do this? I'm trying to figure this out as well. After finally getting GPS to work, now I'd like to be able to use some apps that need to run when in standby.
Click to expand...
Click to collapse
Check on Dev&Hacking. An app just came out today that does exactly what you are asking for here.
http://forum.xda-developers.com/showthread.php?goto=newpost&t=707458
Enjoy
egzthunder1 said:
Check on Dev&Hacking. An app just came out today that does exactly what you are asking for here.
Enjoy
Click to expand...
Click to collapse
Thanks! That looks like a handy app.
An update (in case anyone hits this thread later)...I made this one change which seemed to clear up all of the problems (found elsewhere but can't post outside link yet.)
[HKEY_LOCAL_MACHINE\Comm\ConnMgr\Providers\{7C4B7A3 8-5FF7-4bc1-80F6-5DA7870BB1AA}\Connections\Phone as Modem]
"Enabled"=dword:00000000"
Now this is in conjunction with QuickGPS and all the other fiddling I've done, so I don't if this alone is responsible.
However, when running Google Maps or other GPS applications I get a lock within 5-15 secs. Also, when coming back from standby it's able to re-lock in the same amount of time. This normally required a soft restart before.
For apps that track your routes, such as SportyPal which I've been using for mapping my bike rides, they can keep a lock even in standby mode. I'm not sure if the app itself is able to hold a lock or if QuickGPS may be helping it. Either way it works.

Tasker - Configure your DHD to safe energy

Hi,
some people asked what to do until their DHD arrives. They proposed some games...
I have a better suggestion.
Many people suffer short battery and there are many discussions and tipps like turn your GPS off, disable 3G connection if you don't need it. That's all perfectly right. Do you now that you can perfectly automate this by using an app called tasker. You can configure very very much.
I don't have an android phone at the moment (waiting for my DHD), but I have a vision what to configure when it have arrived. I would like to write and test the scripts beforehand but I can't. See my configuration proposals below. Maybe somebody with an android phone is happy to script it and shorten waiting time. Or somebody with a DHD can do it and report the effect.
Description - Version 1.0
Number 1a:
IF the screen is locked/black screen (I'm not using the phone)
switch to 2g
ELSE (screen is unlocked)
switch to 3g
ENDIF
Alternative Number 1b (Even more powerful):
IF the screen is locked/black screen and I'm not using the phone
switch to 2g and switch off data connection.
every 30 minutes switch on the data connection for 5 minutes for synching (facebook and so on)
ELSE (the screen is unlocked)
switch to 3g + data connection
ENDIF
**Description number 1: It's quiet energy consuming for your the phone to hold the 3g connection, even more in areas with bad connection or during driving/moving. On the other hand you don't need that fast connection if you don't surf or use apps. So if your phone is locked only 2g is used. This is enough in order to sync facebook & co. This first condition is also known as juicedefender mode
Number 2:
IF navigation/maps software is started
switch GPS on
ELSE
Leave GPS off
ENDIF
**Description number 2: GPS is energy consuming as well. So turn it off and let it turn on if the apps x, y, z are launched.
Number 3:
IF I'm in a predefined GPS oder cellular zone (at home)
Turn on WLAN
ELSE
turn off WLAN
ENDIF
(This means if I'm leaving home, WLAN turns off.)
**Description number 3: WLAN is energy consuming as well. So turn it off and let it turn on if you are in an are where you know you have WLAN, e.g. at home, at work, at you daily coffee shop.
Number 4:
IF phone is switches in the car holder
switch GPS on
start the car panel
start mp3 player (Winamp beta)
(some people may ad "turn on bluetooth" here)
ELSEIF the phone is switched off the car holder
turn off GPS
stop car panel
stop MP3
ENDIF
(This means if I'm leaving my car, GPS is turned off)
**Description number 4: Just to make live comfortable.
Click to expand...
Click to collapse
prob not the correct spot to ask, but how battery consuming is tasker? I've tried locale on some of my older android phones and they drained more battery with locale then without due to polling time and position, is tasker any different?
Can Tasker switch 3G to 2G and vice versa? Last time I checked, it cannot do that.
Came from the developer:
http://groups.google.com/group/tasker/browse_thread/thread/acda45a4fac8a651
@arielext: Tasker does not drain a lot of battery. I own and use Tasker, my HTC Desire battery life is still the same compare to before using Tasker.
arielext said:
prob not the correct spot to ask, but how battery consuming is tasker? I've tried locale on some of my older android phones and they drained more battery with locale then without due to polling time and position, is tasker any different?
Click to expand...
Click to collapse
From the examples I see above it seems that Tasker doesn't act on locations but on hard coded rules.
Nevertheless, I wonder if the monitoring of all the conditions I see in the scripts will actually save the battery. Are there any comparissons made?
I am having a problem with the GPS on in Tasker. I try to turn it on when the Car Panel starts (no dock to dected so far), but it seems to ignore tasker command. The task runs ok, as I placed a notification sound for testing, but the GPS just stays off. Anyone experiencing the same problem?
(it did work on Milestone with Locale)

Specific Tasker profile help

I figured this thread was a good place for this. If not, please re-direct me...
I'm looking to create Tasker profile "A" that stops Tasker profile "B" if; there is WiFi activity from app "A" in the past 5 minutes or less, and if there is a download in progress. Is this possible? And could I get some direction/ideas? Any help is appreciated!
-XDA Premium on CM7 Nook Color
What to you mean by "wifi activity"? Do you mean traffic throughput, on/off or connected/disconnected events?
bobstro said:
What to you mean by "wifi activity"? Do you mean traffic throughput, on/off or connected/disconnected events?
Click to expand...
Click to collapse
Any activity other than updates, basically any active uses but not passive. I have a profile that shuts down the wifi after 5 minutes of the display being off but wanted to add exceptions such as I'm in the middle of a chat with a chat app that is always logged on so the wifi won't go off until a certain time after the last active wifi action from that specific chat app
-XDA Premium on CM7 Nook Color
Tasker lets you set up scripts to respond to states and events. You should be able to set a task to trigger on screen off and not a list of specific apps running. I do this with GPS on my phone so it only (and always) comes on when specific apps are running. In your case, something like "screen off and not chat running".
Tasker is pretty slick, but it's not always quick. I find it's fine for turning things off, but it sometimes is slow turning things on in a responsive manner. The GPS doesn't always get turned on in time for Maps not to complain, for example.
The problem with Tasker is that it can tell if an app is running in the foreground, but not whether it's passing traffic, at least in my experience. For the rudimentary wifi functions on my NOOKcolor, I found Green Power just as effective. It will shut down wifi after a period with no traffic, and periodically turn it back on to sync on a schedule, if you want. It is not sensitive to a specific app running, however.
bobstro said:
Tasker lets you set up scripts to respond to states and events. You should be able to set a task to trigger on screen off and not a list of specific apps running. I do this with GPS on my phone so it only (and always) comes on when specific apps are running. In your case, something like "screen off and not chat running".
Tasker is pretty slick, but it's not always quick. I find it's fine for turning things off, but it sometimes is slow turning things on in a responsive manner. The GPS doesn't always get turned on in time for Maps not to complain, for example.
The problem with Tasker is that it can tell if an app is running in the foreground, but not whether it's passing traffic, at least in my experience. For the rudimentary wifi functions on my NOOKcolor, I found Green Power just as effective. It will shut down wifi after a period with no traffic, and periodically turn it back on to sync on a schedule, if you want. It is not sensitive to a specific app running, however.
Click to expand...
Click to collapse
Well if it can't detect certain traffic then I guess Green Power is my next shot. Thanks for the advice.
Tasker Read SMS
Hi. I installed Tasker and am trying to follow their walk throughs but the current version appears to be entirely different and I just can't figure out how do do any of this stuff. Could really use some help or an XML file. All I want to do is set up a profile that turns on bluetooth, gps fires up Google Maps and then starts listening for SMS text and read the SMS by voice if I get one.
All of their examples don't really jive with the way Tasker seems to work now.
Avatar, there are some obvious barriers I can see right off the bat, namely, no GPS or SIM card on the nook. Most of Tasker's functions (and wiki pages) relate to built in android functions so for example, instead of one action to enable GPS, it becomes a complicated series of actions such as enabling bluetooth, loading whichever bluetooth/gps app you use to connect, and simulating the correct sequence of button presses, waiting for it to connect, as well as dealing with it if it doesn't connect on the first try. It's very shonky and prone to failure compared to just enabling GPS on a device which has it.
I'd imagine the sms stuff is even more complex as you're already using a workaround to have that ability in the first place, so you'll have to work around that workaround, like the GPS. I bought a cheap phone to handle all that and its a much more straightforward and enjoyable car/tasker experience, minus the 7 inch screen.

Xoom 4.0.3 screen opens by itself

I have had this problem even from android 3. My xoom will randomly open to lock screen, and if I don't see it it will stay there and drain it's battery. Is there a way to make it close the screen again automatically, or even prevent it from opening? I have tried everything, shutting down wifi completely (for notifications) among others.
i have same issue
Do you have a bluetooth headset connected to your device. Mine would turn on by itself if I left and active bluetooth device attached. Once I started turning of the bluetooth antenta regularly this stopped happening for me.
To tell you the truth I do have my iphone connected to my xoom via bluetooth but the bluetooth feature is off at all times except for when I need it (for teathering purposes). I just checked again and it is off (since months that I opened it last time) both on mobile andxoom. I will delete the pairing though and hope for the best.
Any other suggestions?

Preventing Screen Locking when at Home or in Car?

Just getting used to my Moto X 2015 and can't quite figure out how to get it to behave the way I want...
I work at home, and would like my device to be quickly woken up and available without have to put in a PIN or pattern. Right now, I ended up enabling Smartlock (when paired to car bluetooth), and also home via location (for when I'm in the house); however, if I turn off location/GPS (to conserve battery), then smartlock doesn't work. So what has ended up happening is that with location off at home, if I tape the phone I get the lock screensaver. The only way I know to get back into the device is to hit the powerpoint, and which point it prompts me for my PIN.
If it were possible, I would like a way to tap (or otherwise gesture) to wake up the phone unlocked while either at home or in the car. How would I do that? Do I need to NFC to make this work (have never used it on any phone yet).
Any help is appreciated.
Why would you need to save battery when you are at home?
The way Android uses Location nowadays, unless you have some rogue app constantly pinging your location, "disabling" it doesn't really save an appreciable amount of battery. Leave location services on for a day or two and see if it drains your battery, I'd be willing to bet it won't.

Categories

Resources