Wearshell+Tasker Recipes (& Wearshell +Tasker+Autovoice Recipes) - Wear OS Software and Hacking General

It's time to post some of recipes I find useful. I drive for a living so operating my mobile gadgets HandsFree+EyesFree is how I have to do it.
[Rooted Watch + Rooted Phone Required ]
Most of these recipes incorporate the Autovoice App that uses Google App to grab spoken commands, HOWEVER, just switching out a variable in these recipes/tasks for your specific input will get the job done ... if you're interested in Autovoice off your watch the final pages of this thread are informative http://forum.xda-developers.com/xposed/modules/mod-google-search-api-t2554173 ... sadly though, it looks like no-one who has Marshmallow ON THEIR PHONE has a working flow at this time.
ANNOUNCEMENT: This new 5.0 version of wearshell comes included with some better versions of some recipes so far posted here by me, especially tts. here is the thread: http://forum.xda-developers.com/android-wear/development/app-wearshell-t2902242
FROM THAT THREAD:
WearShell version 0.6.0 has just been released.
I also put together some BeanShell commands for download:
https://goo.gl/2mA1uU
These commands are included:
Wearshell Command Collection 1
brightness
filepull
filepush
killws
mediaplayer
openuri
tts
unzip
vibrate
volume
WearShell Command Collection 2:
https://goo.gl/2mA1uU
battery
md5
notify
record
showimage
startapp
sysload
toast
uptime
zip
Wearshell Commands Collection 3
WearShell 0.6.0 has just been released. It includes support for Result Intents, sensors support and bug fixes.
alarm
charging
freestorage
heartrate*
light*
stepcount
stt
timer
wifioff*
wifion*
Commands marked with * I could not test because my G Watch is lacking the sensors and WiFi support. If you find any errors please let me know, I'll try to fix them.
Hope it's useful
...................
I'll leave this thread up and adding recipes, because these recipes usually don't require a file to be loaded onto the watch, they just run from an intent. so I can add things to the list and others too.
All I know is these work on my Huawei Watch with 1.4 update and Galaxy Note 3 on KK4.4.2. Please post recipes you find useful (and earn my undying gratitude) and I'll repost what I find and post ones I've made.
[Quick Summary on How These Work: Wearshell installs on phone and watch. the Wearshell app ON PHONE doesn't even need to be running to function because it sleeps until a tasker intent sent to it wakes it up, then Wearshell connects to it's companion app ON WATCH (companion app is tiny and uses like zero battery) and passes code to the companion app that it then executes the code. Wearshell is an awesome bridge to pass shell commands and java code via tasker]
Thanks and hopefully enjoy.

Reboot Watch By Voice
"Ok Google Reboot"
PROFILE: "i named it watch reboot"
Event> Plugin>Autovoice>Recognized> Command: "reboot"
TASK: "i named it watch reboot"
Add Action> System>Send Intent
ACTION
de.fun2code.android.wear.shell.EXEC
EXTRA
bsh: Runtime.getRuntime().exec("su -c reboot");
LEAVE ALL OTHER FIELDS AS IS

Set Watch Brightness by Voice
"Ok Google Brightness xxx"
(xxx's are a number between 0 - 254 to set brightness level)
PROFILE: "i named it watch brightness"
Event> Plugin>Autovoice>Recognized> Command: "brightness" (then I speak a number between 0-254)
Advanced> Replacements:to =2,+=, =,:=,-=,one=1,two=2,three=3,four=4,five=5,six=6,seven=7, eight=8,nine=9,ten=10,eleven=11,twelve=12,thirteen =13,fourteen=14,fifteen=15,sixteen=16,seventeen=17 ,eighteen=18,nineteen=19,twenty=20
TASK: "i named it watch brightness"
Add Action> Variables> Variable Set
NAME
%spokenbrightness
TO
%avcommnofilter
Add Action>Task> If
CONDITION
%avcommnofilter > 254
Add Action> Variable> Variable Set
NAME
%spokenbrightness
TO
254
Add Action>Task>Endif
Add Action>Task> If
CONDITION
%avcommnofilter < 20
Add Action> Variable> Variable Set
NAME
%spokenbrightness
TO
20
Add Action>Task>Endif
Add Action> System>Send Intent
ACTION
de.fun2code.android.wear.shell.EXEC
EXTRA:
bsh: Runtime.getRuntime().exec("su -c settings put system screen_brightness %spokenbrightness; su -c input keyevent 26");
LEAVE ALL OTHER FIELDS AS IS
Notes: you might have noticed that the second if condition prevents the watch from going below brightness level 20. also that "input keyevent 26" that you see there just simulate a power button click on my phone which clears the Google search results from the screen of my watch so that I have my watch face back when the task completes

Voice Search Results in UC Mini Browser on Watch (VERY fast+smooth over Bluetooth)
"Ok Google search lions tigers and bears"
[Instructions on easy installing UC Mini Browser after the recipe]
PROFILE: "i named it watch uc mini"
Event> Plugin>Autovoice>Recognized> Command: "search"
TASK: "i named it watch uc mini"
Add Action>Variable>Variable Set
NAME
%url2wearshell
TO
"https://www.google.com/search?site=&source=hp&q=%avcommnofilter"
Add Action> System>Send Intent
ACTION
de.fun2code.android.wear.shell.EXEC
EXTRA
bsh: import android.content.Intent; import android.net.Uri; uri = %url2wearshell; intent = new Intent(Intent.ACTION_VIEW, Uri.parse(uri)); intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); context.startActivity(intent);
LEAVE ALL OTHER FIELDS AS IS
Install
grab "UC Mini Browser" from the playstore on your phone and use an app like "Apk Share" to get the apk, then on the watch go to developer options enable "adb debugging" and "adb over bluetooth," then use the app "Apps2Wear" from playstore to sideload it (it'll take a few tries, and make sure on the watch you clicked ok to allow connections over adb) ... then grab " /system/app mover root" from the play store and sideload it with "Apps2Wear" (it'll take a few tries) then run "/system/app mover root" on the watch to install "UC Mini Browser" as a system app (so that it gets permission to use the internet)...you might get a weird error saying it couldn't move UC Mini, but it moved 'enough of it' (the base apk) to get this working. So reboot for good measure and it'll be ready. (btw: because 'enough' of UC Mini got moved to system folder it won't survive a factory reset like a fully installed system app and will need a reinstall.)
Usage:
on my Huawei Watch there is no back button, so I recommend you open some links from the Google results 'in the background' (long press the links), then use the tabs button on the bottom bar to switch between pages (this speeds up browsing too). also I recommend you go to settings in UC Mini (bottom right corner on my watch and hard to click) and go to Customize and check "Hide Bottom Bar" = this gives you full screen without losing the bottom bar, it's great.

Text Messages Automatically Spoken On Your Watch (Watch TTS)
[ ** This recipe needs work to be good, but it's 'good enough' to allow me to keep my eyes on the road, and much better solutions are on the way I'm sure. Also, It requires a tiny tasker app to be made and sideloaded (it's only 5 easy actions to input)..]
The tasker app we'll make in this recipe is named "Watch Speak"
THE APP FACTORY APP::
TASK: "I named it watch Speak"
Add Action>File>Read File
FILE
/sdcard/speak.txt
TO
%watchspeak
Add Action>Variables>Variable Search and Replace
VARIABLE
%watchspeak
SEARCH
€ (<--- don't type this, but see that weird symbol?)
STORE RESULTS IN
%watchspeak
REPLACE MATCHES
...check the box
REPLACE WITH
' (<--- see that apostrophe?)
Add Action>Variables>Variable Search and Replace
VARIABLE
%watchspeak
SEARCH
¥ (<--- don't type this, but see that weird symbol?)
STORE RESULTS IN
%watchspeak
REPLACE MATCHES
...check the box
REPLACE WITH
" (<--- see that quote mark?)
Add Action> Alert>Say
TEXT
%watchspeak
LEAVE ALL OTHER FIELDS AS IS, UNLESS YOU WANT TO
CHANGE SPEED AND PITCH
Add Action>Task>Stop
IN TASKER:
PROFILE: "I named it Watch Speak"
Event> Phone>Received Text
TASK: "I named it Send Watch Speak"
Add Action>Variables>Variable Set
NAME
%watchSpeak
TO
text from, %SMSRN. it says, %SMSRB
Add Action>Variables>Variable Search and Replace
VARIABLE
%watchspeak
SEARCH
' (<---don't route this, but see that apostrophe?)
STORE RESULTS IN
%watchspeak
REPLACE MATCHES
...check the box
REPLACE WITH
€ (<--- don't type this, but see that weird symbol?)
Add Action>Variables>Variable Search and Replace
VARIABLE
%watchspeak
SEARCH
" (<---don't type this, but see that quote mark?)
STORE RESULTS IN
%watchspeak
REPLACE MATCHES
...check the box
REPLACE WITH
¥ (<--- don't type this, but see that weird symbol?)
Add Action> System>Send Intent
ACTION
de.fun2code.android.wear.shell.EXEC
EXTRA
bsh: Runtime.getRuntime().exec("su -c echo '%watchspeak' >| /sdcard/speak.txt"); Runtime.getRuntime().exec("su -c monkey -p com.gmail.paulporter1.watchspeak -c android.intent.category.LAUNCHER 1");
LEAVE ALL OTHER FIELDS AS IS
Add Action>Task>Stop
NOTES:
(a) the weird symbols ¥ and € in search and replace are because I do not know how to transfer the symbols ' and " from a variable into linux commands that are embedded in java code, because ' and " will break a command that is supposed to put text into a file, that file being the /sdcard/speak.txt file that our tasker app on the watch reads from, but without those symbols tts can't speak words correctly, so we switch them then switch them back.
(b) on my Huawei Watch the texts won't read out loud if you are actively using the watch (which I like actually) but you might get a duplicate reading once the watch goes idle.

Voice Command Your Watch To Read Last Text Message
PROFILE: "i named it repeat message"
Event> Plugin>Autovoice>Recognized> Command: "repeat message"
TASK:
(just use/reuse the task from the previous post, the task that resides on the phone)

Automate theater mode
This is a repost originally posted by ShadowEO.
In the task, add a Send Intent action with these parameters:
On:
Action: de.fun2code.android.wear.shell.EXEC
Extra: bsh: Runtime.getRuntime().exec("su -c settings put global theater_mode_on 1");
Off:
Action: de.fun2code.android.wear.shell.EXEC
Extra: bsh: Runtime.getRuntime().exec("su -c settings put global theater_mode_on 0");
Off will turn off theater mode, however still leave the watch screen off, however the screen will come back on with the next tap and theater mode will be off.

Notifications Automatically Spoken On Your Watch (Watch TTS
Use/Reuse the same recipe from a few posts back for speaking text messages, but just change these lines:
From this:
Add Action>Variables>Variable Set
NAME
%watchSpeak
TO
text from, %SMSRN. it says, %SMSRB
to this:
Add Action>Variables>Variable Set
NAME
%watchSpeak
TO
notification, %NTITLE

Change LCD Density By Voice
"Ok Google density xxx"
(where. xxx is a number I speak between 180-340)
PROFILE: "i named it watch density"
Event> Plugin>Autovoice>Recognized> Command: "density" (then I speak a number between 180-340)
Advanced> Replacements: to =2,+=, =,:=,-=,one=1,two=2,three=3,four=4,five=5,six=6,seven=7,eight=8,nine=9,ten=10,eleven=11,twelve=12,thirteen=13,fourteen=14,fifteen=15,sixteen=16,seventeen=17,eighteen=18,nineteen=19,twenty=20
TASK: "i named it watch density"
Add Action> Variables> Variable Set
NAME
%spokendensity
TO
%avcommnofilter
Add Action>Task> If
CONDITION
%avcommnofilter > 340
Add Action> Variable> Variable Set
NAME
%spokendensity
TO
340
Add Action>Task>Endif
Add Action>Task> If
CONDITION
%avcommnofilter < 180
Add Action> Variable> Variable Set
NAME
%spokendensity
TO
180
Add Action>Task>Endif
Add Action> System>Send Intent
ACTION
de.fun2code.android.wear.shell.EXEC
EXTRA:
bsh: Runtime.getRuntime().exec("su -c wm density %spokendensity; su -c input keyevent 26");
LEAVE ALL OTHER FIELDS AS IS

Pablo, tonight i want test all. Its wonderful.
I m curious how work speaker tts! Are there delay with this method?
Inviato dal mio SM-N9005 utilizzando Tapatalk

vingar said:
Pablo, tonight i want test all. Its wonderful.
I m curious how work speaker tts! Are there delay with this method?
Click to expand...
Click to collapse
you rock man, good luck. the watch will vibrate then 7-10 seconds later it talks. (the watch reads out emojis too, like ??? makes it say 'smiley face ring penguin) ... android is cool

pablo71 said:
you rock man, good luck. the watch will vibrate then 7-10 seconds later it talks. (the watch reads out emojis too, like ??? makes it say 'smiley face ring penguin) ... android is cool
Click to expand...
Click to collapse
Pablo you have a PM!

Any alternative for nonrooted phones? Don't want to root my new s7 edge yet... I miss the simple root and warranty from the nexus :/
Sent from my SM-G935F using XDA-Developers mobile app

[email protected] said:
Any alternative for nonrooted phones? Don't want to root my new s7 edge yet... I miss the simple root and warranty from the nexus :/
Click to expand...
Click to collapse
most of the tasker tasks I've exported as apps/apks and sideloaded onto my watch work just fine, and I don't think root is needed for any of that. just use your watches button combination to reboot into bootloader, then select recover mode, connect cable to your computer and use adb commands to sideload apps. there are some good threads in Android Wear section that I've been using to do stuff.

pablo71 said:
most of the tasker tasks I've exported as apps/apks and sideloaded onto my watch work just fine, and I don't think root is needed for any of that. just use your watches button combination to reboot into bootloader, then select recover mode, connect cable to your computer and use adb commands to sideload apps. there are some good threads in Android Wear section that I've been using to do stuff.
Click to expand...
Click to collapse
Thanks! I would simply use Adb reboot bootloader as usual on my nexus 4 and 7.
But saw the root needed disclaimer in your first post.
Sent from my SM-G935F using XDA-Developers mobile app

pablo71 said:
most of the tasker tasks I've exported as apps/apks and sideloaded onto my watch work just fine, and I don't think root is needed for any of that. just use your watches button combination to reboot into bootloader, then select recover mode, connect cable to your computer and use adb commands to sideload apps. there are some good threads in Android Wear section that I've been using to do stuff.
Click to expand...
Click to collapse
So this part of your statement: "most of the tasker tasks I've exported as apps/apks and sideloaded onto my watch work just fine"
I've been adding profiles in Tasker on my phone with WearShell installed and they are not working on my watch, I really wanted the brightness changes to be triggered by connect and disconnect from my home wifi network. I guess now I understand why the tasks don't work, since I have not sideloaded them into my watch. I also tried the automate theater mode that fails as well,
I totally missed the fact that they need to be exported as apps and sideloaded into the watch via adb. I missed that in this thread and the WearShell thread. Gah!

Pkt_Lnt said:
So this part of your statement: "most of the tasker tasks I've exported as apps/apks and sideloaded onto my watch work just fine"
I've been adding profiles in Tasker on my phone with WearShell installed and they are not working on my watch, I really wanted the brightness changes to be triggered by connect and disconnect from my home wifi network. I guess now I understand why the tasks don't work, since I have not sideloaded them into my watch. I also tried the automate theater mode that fails as well,
I totally missed the fact that they need to be exported as apps and sideloaded into the watch via adb. I missed that in this thread and the WearShell thread. Gah!
Click to expand...
Click to collapse
no no, I didn't explain myself very well in the previous post ... these recipes I've posted are not apks to sideload ... what I was referring to in the previous post is a few little Tasker apks I've side-loaded onto my watch, but I did not include those in this thread because this thread was for recipes that included wearshell ... pardon me for not communicating clearly in the previous post. If you wouldn't mind copying and pasting the intents in Tasker that are being sent to wearshell I would like to see them
this would set brightness to full, the number 254 does that in this intent
SEND INTENT
ACTION
de.fun2code.android.wear.shell.EXEC
EXTRA
bsh: Runtime.getRuntime().exec("su -c settings put system screen_brightness 254");
LEAVE ALL OTHER FIELDS AS IS

pablo71 said:
no no, I didn't explain myself very well in the previous post ... these recipes I've posted are not apks to sideload ... what I was referring to in the previous post is a few little Tasker apks I've side-loaded onto my watch, but I did not include those in this thread because this thread was for recipes that included wearshell ... pardon me for not communicating clearly in the previous post. If you wouldn't mind copying and pasting the intents in Tasker that are being sent to wearshell I would like to see them
Click to expand...
Click to collapse
Brightness:
Wifi disconnect (this actually has about 15 steps for various changes to the phone for sound and security)
Code:
Action: de.fun2code.android.wear.shell.EXEC
Extra: bsh: Runtime.getRuntime().exec("su -c settings put system screen_brightness 254 ");
Wifi connect (same, changes to sound and security)
Code:
Action: de.fun2code.android.wear.shell.EXEC
Extra: bsh: Runtime.getRuntime().exec("su -c settings put system screen_brightness 106 ");
I have also tried removing the space after the number and before the quote, since other bsh: entries I have seen don't show the space.
Code:
Extra: bsh: Runtime.getRuntime().exec("su -c settings put system screen_brightness 106");
Theater:
Start sleep tracking (Sleep as Android works as a plugin with Tasker, I set silent mode and try to start theater)
Code:
Action: de.fun2code.android.wear.shell.EXEC
Extra: bsh: Runtime.getRuntime().exec("su -c settings put global theater_mode_on 1");
End sleep tracking when alarm sounds (again, Sleep as Android as a plugin for Tasker allows the sleep tracking to terminate on alarm and run an intent)
Code:
Action: de.fun2code.android.wear.shell.EXEC
Extra: bsh: Runtime.getRuntime().exec("su -c settings put global theater_mode_on 0");

Pkt_Lnt said:
Brightness:
Wifi disconnect (this actually has about 15 steps for various changes to the phone for sound and security)
Code:
Action: de.fun2code.android.wear.shell.EXEC
Extra: bsh: Runtime.getRuntime().exec("su -c settings put system screen_brightness 254 ");
Wifi connect (same, changes to sound and security)
Code:
Action: de.fun2code.android.wear.shell.EXEC
Extra: bsh: Runtime.getRuntime().exec("su -c settings put system screen_brightness 106 ");
I have also tried removing the space after the number and before the quote, since other bsh: entries I have seen don't show the space.
Code:
Extra: bsh: Runtime.getRuntime().exec("su -c settings put system screen_brightness 106");
Theater:
Start sleep tracking (Sleep as Android works as a plugin with Tasker, I set silent mode and try to start theater)
Code:
Action: de.fun2code.android.wear.shell.EXEC
Extra: bsh: Runtime.getRuntime().exec("su -c settings put global theater_mode_on 1");
End sleep tracking when alarm sounds (again, Sleep as Android as a plugin for Tasker allows the sleep tracking to terminate on alarm and run an intent)
Code:
Action: de.fun2code.android.wear.shell.EXEC
Extra: bsh: Runtime.getRuntime().exec("su -c settings put global theater_mode_on 0");
Click to expand...
Click to collapse
I assume that all the other fields in this Send Intent action are left as is, so these intents are written perfectly. Now, the things that I'm about to say next are probably things you already know, but Tasker is extremely finicky with profiles, especially cloned profiles, and you have to back out of Tasker completely using the back button to activate profiles. Sometimes I have to delete profiles that should be working, and then recreate them. Once I do that they work flawlessly forever. Sometimes I have to turn the profiles on and off as well. Also I am pretty sure you are using the latest version of wearshell, because I read in that Forum that the previous version of wearshell did not work with the screen off on the phone. Hopefully the wearshell companion app is in memory on the watch so that it can receive communication from the app on the phone. You could try opening the app on the phone and starting and stopping at the server just to wake the it up and testing to see if they are running.. That server, by the way, is not part of any of this, you probably already know that the server is just to run test code through a web server interface that is on the watch. But running that server would be a great way to check that the companion app and the phone app are both operating and talking to each other.
EDIT: In tasker, is 'allow external access' granted in the settings? I'm not that great at tasker, but I think something like that in settings could be it maybe

pablo71 said:
I assume that all the other fields in this Send Intent action are left as is, so these intents are written perfectly. Now, the things that I'm about to say next are probably things you already know, but Tasker is extremely finicky with profiles, especially cloned profiles, and you have to back out of Tasker completely using the back button to activate profiles. Sometimes I have to delete profiles that should be working, and then recreate them. Once I do that they work flawlessly forever. Sometimes I have to turn the profiles on and off as well. Also I am pretty sure you are using the latest version of wearshell, because I read in that Forum that the previous version of wearshell did not work with the screen off on the phone. Hopefully the wearshell companion app is in memory on the watch so that it can receive communication from the app on the phone. You could try opening the app on the phone and starting and stopping at the server just to wake the it up and testing to see if they are running.. That server, by the way, is not part of any of this, you probably already know that the server is just to run test code through a web server interface that is on the watch. But running that server would be a great way to check that the companion app and the phone app are both operating and talking to each other
Click to expand...
Click to collapse
Yes, I know the idiosyncrasies of Tasker, I've been beta testing for a couple years, and if you saw the complexity of my myriad tasks.....
When I have the WearShell running, I get a screen wakelock that keeps the display on. I don't have it running because joschi70 in the WearShell thread stated (in response to you) it does not have to run for broadcasts .I have tried running it and still nothing changes on the watch.
Actually the server is only needed if you use the web API or the web interface itself.
If you use broadcasts to send commands it should work without having to start the WearShell server on the phone.
Click to expand...
Click to collapse
I did see the message on the watch that WearShell was installed. Of course, it does not show in the apps menu.

Related

Release rk-Location Switch (1.0.3) [Updated 15 April 2008]

Here is a 'Phone location based application trigger’. Launches other applications, command lines and MortScripts and anything based on time frame and location you setup. Works on Windows Mobile Professional 5/6 (PDA with Phone) only.
Some of the possible uses have been added at second post below.
This is more advanced version of my application rk-Sleep, where you could just perform one action at one location.
rk-LocSwitch can have any numbers of locations and any numbers of actions. But please do understand that this is not a 'readymade profile application' but by configuring it properly you could make it a profile application and much more. Ultimately you can automatically customize your phone based on where you are and the time span you setup.
Also support fixed actions, actions at pre-defined time, not based on the location (This is helpfull to set up backlight 'Bright' during day hrs and 'dim' during eventing/nights)(This feature is freeware and does not expire)
Now the important thing, this is not a freeware, it is 3.99 USD for XDA-Developers.com members. The trial version runs for 15 days so that you can test it and see if it satisfies you.
Update 1.0.6
Support for undefined/unknown location actions added.
Application now by default starts in minimized mode(not the sys tray mode)
Update 1.0.5
Error while 'Testing' the actions is rectified.
Update 1.0.4
Option to Show/Hide the Tray icon added
Debug support added.
Cosmetic changes done.
Update 1.0.3
Support for hide/show 'Un-Defined' location icon.
Bug fixes
Update 1.0.2
Support command line tags, eg Application could automatically send information such as LocationName, LAC, CellID by using the command line tags <LocationName>, <LAC>, <CellID. By this you could even send sms based on your location Entry/Exit along with location info.
Application can update registry with the current Location name, LAC and CellID.(HKCU\Software\rk-LocSwitch). Now your custom application can access the location information!
New menu added to copy TowerIds from one location to other.
New menu added to copy actions from one location to other.
New menu to force saving of the configuration data.
Bug fixes
Setup:
Install the application.
Run the application rk-LocSwitch from programs for the first time from the programs menu, after which the application starts automatically after soft resets.
A new task bar icon will appear in the task tray, click it to launch the application(application runs hidden, this is the only way you can access the UI to set it up)
First tab in the application is ‘General’, the information mostly read-only; you can specify the polling time (in minutes) and enable/disable the application.
‘Locations’: lot of information here. First you create a new location from the top part of the screen.
Location name is just a name such as ‘My Home’, ‘Office’ etc
Choose a icon ‘which would be displayed on the top notification bar’(you can have custom icons, just add the icons to the ‘\Icons’ folder under \Programs\rk-LocSwitch)
Check the box ‘Notify’(when ever you are at known location, a icon would show up on the title bar)
Specify the time frame such as 08:00 to 18:00(day schedule) or 22:00 to 06:00(for night schedule)
Specify if the location is of 'Undifined Type', If undefined then time frame settings are ignored and LocationIds are removed automatically.
Click OK to save this location
Add the current tower id displayed to the list, you could have multiple towers (if the location has interference from multiple towers or if you have say multiple ‘Places’ put under same location. Such as you want to configure the location ‘Office’ at two different physical locations but you want to have similar actions to perform.)
Now go to the ‘Actions’ button
You have ‘Entry’ and ‘Exit’ actions. You can add multiple actions for each action type. You can even order then ‘up’ or ‘down’. Use the ‘Action’ menu for additional commands such as ‘test the action’.
Next tab is 'Fixed Actions' here you could setup actions independent of 'Location' meaning these actions takes place irrespective of 'Locations' Useful for setting the backlight of the device.
Next tab is log where each attempt based on the polling time is logged. You can change the log action to log all, location change (Actions) only or none. Once you understand the concept put it to ‘None’(but if you think that something is not working then switch the log to all and investigate)
Last tab about: which is basically the registration module and the version info
Important notes:
Notes: if you want to configure home day and home night, you must have two locations setup such as ‘Home Day’ and ‘Home Sleep’ have the time frames carefully set e.g. 08:00 to 22:00(Home Day) and or 22:00 to 06:00(for night schedule). Do not overlap the time frames!
Keep the polling time as large as possible, unless you need real time response.(although I found keeping the polling to minimum (=2 minutes) did not make any noticeable difference to battery usage!. But test it out.
Do not forget to configure the ‘Entry’ and ‘Exit’ actions properly. Enter and exit actions generally should be cancelling each other (i.e. if you switch on flight mode on entry, make sure you have flight mode off on exit)
System is real time( ± Polling Time) , so if you are at home with flight mode activated and if you leave the home at mid night phone would switch back on.
If you really want to exit the program, use the right menu ‘Options’ and choose ‘Save & Exit’
When you start the application(not while activating the rk-LocSwitch) make sure the phone is not in flight mode
More importantly this is a ‘Switcher’ so I do not supply any command line applications to do your custom tasks; they are available in this site and over the internet. You are welcome to link in this thread so that it can be easily accessed by other users. But if some customization what you want is not available then you can make a request, and I will do my best to find one or built it myself.
Check in this thread for more pluggins
Note: This application requires Compact Framework 2.0
You need compact framework 2.0 installed inorder to run this application. The compact framework is already part of WM6, so if your device is WM6 skip this step. But most of the WM5 devices do not have this update. So you must download here and run the installation on your desktop (then active sync to update your device). Only after completing this step install the application.
Thank you all for the support.
Purchase
Download from here
Possible uses
Switch off Phone or Sound while at home during sleeping hours.
Keep backlight at low setting while inside house or office. Increase the backlight while outside house or office.
Make a alarm function say if you are at office play at mp3 at 5:00 PM
Wake you up at particular destination specifically travelling in bus or train where you travel regularly.
Load your favorite theme/wall paper as specific locations.
Send SMS on entry or exit of a location.
Will be updated…..
If you have some more ideas I am glad to update this list.
Flight Mode On/Off utility
Here is the command line flight mode on/off utility.
Command lines to switch on and off
Code:
\Program Files\rk-FltMode\rk-FltMode.exe on
\Program Files\rk-FltMode\rk-FltMode.exe off
\Program Files\rk-FltMode\rk-FltMode.exe toggle
If you are using rk-OSR to check mail you could enable and disable based on your location using the following command line
Code:
"\Program Files\rk-OSR\rk-OSR.exe" Enable --> Enables the rk-OSR
"\Program Files\rk-OSR\rk-OSR.exe" Disable --> Disables the rk-OSR
rk-TSR Support
rk-TSR a Theme Switcher, You can load a pre-set theme/wallpaper based on your location!
Code:
\program files\rk-TSR\rk-TSR.exe enable
\program files\rk-TSR\rk-TSR.exe disable
\program files\rk-TSR\rk-TSR.exe “\storage card\rkAzulBlue.tsk”
(For command line the theme must be listed in rk-TSR)
I am planning to add following new features in the near future.
Add fixed actions at specified time irrespective of the location: This might help to set back light ‘bright’ during day and low during night.
Allow actions during the device status change such as wifi connected/disconnected, active sync done, soft reset etc
If you have any specific request please go ahead let me know.
rk-bk-Light a backlight command line switcher
Here is the command line backlight switcher
Code:
[/FONT]
[FONT=Verdana]\Program Files\rk-bk-Light\rk-bk-Light.exe 2[/FONT]
[FONT=Verdana]\Program Files\rk-bk-Light\rk-bk-Light.exe 10[/FONT]
[FONT=Verdana]
Do not know if it works on all devices. But works on hermes
Note: This application requires Compact Framework 2.0
You need compact framework 2.0 installed inorder to run this application. The compact framework is already part of WM6, so if your device is WM6 skip this step. But most of the WM5 devices do not have this update. So you must download here and run the installation on your desktop (then active sync to update your device). Only after completing this step install the application.
Download from here
rk-LocSwitch Update 1.0.1
Fixes and enhancements
Added support for fixed actions
You can add any number of fixed schedules and add any number of actions on each such schedule(e.g. to set the backlight low during night and bright at day)
These fixed schedules not specific to the locations and will occur at the time specified.
Does work even if the application expired!(it is a freeware, only location service would not work)
Better file browser added, now you do not have to key in the command line.
Bug with the system not clearing some of the old notifications fixed.
Battery use better that before (almost makes no difference on the battery use!)
If you are upgrading from the old version please uninstall the old version and delete any existing notification manually (delete any notification with name ‘rk-LocSwitch’). Then install the new version.
Also added new component rk-BackLight to support setting backlight on command line.
rk-Calendar-Update: Convert all day Calendar events to time spanned events
To convert all day Calendar events to time spanned events automatically so that you don’t get reminders at midnight!
Use this utility if you are entering many appointments during day as 'Full Day Events' and difficult to manage it. Otherwise you can just run this utility once manually.
Read more about it here
Code:
\Program Files\rk-Calendar-Update.exe “08:00” “22:00”
Updates all your 'full day events' to fixed time event with specified time span.
Hmm, No one has any comments?
I really like the idea. Unfortunately, this does not work on CDMA.
tytnguy said:
Hmm, No one has any comments?
Click to expand...
Click to collapse
Wasn't there a topic about this app with many comments like adding vibration on/off? I'll try this app with hermes.
EDIT: Oh this is a new app (update of rk-sleep)
Guys, can this software send an sms to a predefined no. whenever the Tower ID changes.
mushipkw said:
Guys, can this software send an sms to a predefined no. whenever the Tower ID changes.
Click to expand...
Click to collapse
It can not send sms as it is now, if you find exe, or mortscript which could send an sms then you could use this program.
This program is like a trigger which calls other executables based on location, so as long as you can point to right executable then you are good.
But let me know if you are not able to find a executable to send sms, I might be able to build one for you.
Hi TyTnGuy,
is it possible to get the geographic Coordinatas wich assigend to the Tower ID somewhere in the www?
gnu0815 said:
Hi TyTnGuy,
is it possible to get the geographic Coordinatas wich assigend to the Tower ID somewhere in the www?
Click to expand...
Click to collapse
I am not aware of any source with the Geographic Coordinates, But with that info lot of new ideas though!
tytnguy
What kind of battery indicator app do you use?
Is it a standalone battery indicator? or part of other app?
Really nice.
Im looking from a very long time for an app. which can send an sms to a predefined no. But I couldn't find any such. I would be grateful if you can develop such app.
Thanx.
Looks realy good. Will test this on the HTC Trinity.
Keep up the good work!
mushipkw said:
Im looking from a very long time for an app. which can send an sms to a predefined no. But I couldn't find any such. I would be grateful if you can develop such app.
Thanx.
Click to expand...
Click to collapse
I am working on your request, should be there in a day or two.

Gotta do it...Tasker Thread!

Alright, lets show off some tasker profiles! Im always interested in ideas other have cooked up. I'll show you guys some stuff i came up with.
Hit thanks if you like it!
Heres a link to my Rom-Toggler thread!: http://forum.xda-developers.com/showthread.php?p=43912825#post43912825
Ill start populating the post. I realize that tasker profiles are a royal pain in the butt to read, so im going to create some colapsable projects.
Ill also color code certain things and ill try to stay consistent..Ill try to add a project every day. So the first one will be my car project.
Tips:
To avoid confusion with all the collapse-ables, close the ones youre done reading.
Have Secure Settings installed, and swipe to the helper section and install helper
HAve autovoice, you gotta start using this at some point..its pretty awesome.
%PACTIVE is a variable that means "profiles active"
you can long press a profile and press the settings button on the top right and if you scroll down you can uncheck the "display in notification" if you dont want your tasker notification to be over-populated
Projects will be Blue
Profiles will be orange
Enter tasks will be green.
Exit Tasks will be red.
If statements will start and end with pink.....end if
CAR PROJECT
This project has a couple of tasks that do stuff that are related to the car. hence the name.. It does the following:
1: When you get in the car, the screen will stay on, and if it does somehow close, the keyguard will be disabled. This prevents too much fiddling with the phone...This is turned off when you get out.
2: Alters volume levels and brightness when getting in and out of the car.
3: Marks down what time you got out of the car, starts counting how long youve been out of your car, and takes the GPS coordinates of your location when you get out of the car.
The purpose of this is so youll always know when you got out of the car, how long you have been parked (in case of parking meters, parking hours etc..) and allows you to navigate to your car so youll never lose it after parking in some obscure location.
This is done with minimalistic text to display that info, and upon pressing it, will activate the task to navigate back to your car. Ill attach a screen shot.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
4: When someone calls, my phone asks me if i want to answer it, instead of ringing, upon yes, it does, upon no it doesnt.
5: reads me my text, I have nothing to hide, but you could easily implement the yes/no prompt if you want it read to you or not.
6: turns wifi on, gps on, and you can add a bluetooth on if you want.
HERE ARE THE PROFILES:
Profile: Car Mode
Context:
State -> Docked any
State -> Headset plugged in
But really this could be anything.
Tasks:
Enter Task:
Load App -> Car Home (http://blog.brianmoses.net/2012/10/manually-installing-googles-car-home-app.html)
Secure Settings -> GPS Enabled
Wifi -> Off
System Volume -> 7
Media Volume -> 15
Auto Brightness -> on
Notification Volume -> 7
Secure Settings -> Keep Display On
Secure Settings -> Keyguard Disabled
Variable Set -> %SEARCHWIFI ~ 0 (Youll see why later)
Exit Task:
Variable Set %HOURSINCE ~ 0
Variable Set %MINSINCE ~ 0
IF - %TIME > 12.00 {
MINIMALISTIC TEXT -> (variable) ampm = PM
Variable Set -> %PARKEDTIME to (%TIME-12.00)
}
else if - %TIME < 12.00 {
MINIMALISTIC TEXT -> ampm = AM
%PARKEDTIME to %TIME
}
end if
MINIMALISTIC TEXT parkedtime = %PARKEDTIME
Secure Settings -> Keyguard Enabled
Secure Settings -> Lock Device
Secure Settings -> Keep display on - never
Kill App -> Car Home
Get Location -> GPS, timeout -> 100seconds
Variable Set -> %PARKEDAT ~ %LOC
Secure Settings -> GPS Disabled
Variable Set %SEARCHWIFI ~ 1
Profile: Update Time Since (Update what minimalistic text will show)
This counts how long youve been parked for and assigned an HOUR variable and a MINUTE variable to minimalistic text.
Since the "repeat" thing in tasker has a minimum of 2 minutes, i just made two of the same tasks and made the other wait a minute before starting.
Conext:
Every 2 minutes
Tasks: Timesince1
If - %TIMESINCE = 60 {
Variable Set -> %HOURSINCE to %HOURSINCE + 1 (do maths)
Variable Set -> %MINSINCE to 0
MINIMALISTIC TEXT - minsince = %MINSINCE
MINIMALISTIC TEXT - hoursince = %HOURSINCE
}
end if
if - %TIMESINCE < 60 {
Variable Set -> %MINSINCE to (%MINSINCE + 1) (do maths)
MINIMALISTIC TEXT -> minsince = %MINSINCE
MINIMALISTIC TEXT -> hoursince = %HOURSINCE
}
end if
Timesince2
wait -> 1 minute
If - %TIMESINCE = 60 {
Variable Set -> %HOURSINCE to %HOURSINCE + 1 (do maths)
Variable Set -> %MINSINCE to 0
MINIMALISTIC TEXT - minsince = %MINSINCE
MINIMALISTIC TEXT - hoursince = %HOURSINCE
}
end if
if - %TIMESINCE < 60 {
Variable Set -> %MINSINCE to (%MINSINCE + 1) (do maths)
MINIMALISTIC TEXT -> minsince = %MINSINCE
MINIMALISTIC TEXT -> hoursince = %HOURSINCE
}
end if
Profile: Read Text
context:
Received Text any
Variable Value -> %PACTIVE ~ *Car Mode*
Task: Read SMS
Silent mode -> on
Say -> %SMSRN says. %SMSRB
silent mode-> off
Profile: Car Call (Asks me if i want to answer the call or not, then the response will be passed off to another profile called CAR RESPONSE)
context:
Call incoming
Variable Value - %PACTIVE ~ *Car Mode*
Enter Task:
Media Control -> Pause (simulate media button)
Ringer Volume -> 0
Say -> Should i answer this call?
Auto voice recognize (Triggers autovoice to listen to you)
Exit Task:
Media Control Play
Profile: Call Response
Do the same for a "NO response" except the command in autovoice will be "no" and the task will end the call.
context:
AutoVoice recognized -> check event behavior, command = yes
Variable Value -> %PACTIVE ~ *Car Mode*
Task: Take Call
Take Call...lol
THIS ONE IS A TASK
Make this task so you can set your minimalistic texts tap behavior to open a tasker shortcut and then select this one.
IT will allow you to navigate to your car when you tap the widget, you may need to change the wait task if it takes longer for your phone to turn on GPS (not get a lock)
Create a task:
Secure Settings GPS Enabled
Wait 3 seconds
Open Map (this is a task under the APP task) Mode-> Navigate To, Address %PARKEDAT
TO SET UP MINIMALISTIC TEXT:
Im not going to tell you what the font should be, what size or what color the font should be etc etc, ill just tell you how to add the variables to minimalistic text
Tap and hold on your homescreen and add a 2x2 Widget
Delete all the premade stuff
if you swipe to the layout tab and press the "+" youll get a bunch of options to add stuff.
Swipe over to the MISC tab, and add a static text and a local variable. Theres a bug in Minimalistic text where if you add a bunch of local variables at once, itll make the values of them all the same..so youll have to add the things one at a time..pain in the butt i know.
so add a static text and a local variable. over and over till you have 4 local variables and 3 static texts.
have 3 rows, delete the ones you dont need by tapping the 3 dots and pressing delete row.
I have it set up like this:
----------------------------------------------------------------------------
[Static text = Parked At:]
----------------------------------------------------------------------------
[Locale Variable = parkedtime] [locale variable = ampm]
----------------------------------------------------------------------------
(optional)[static text icon = user interface-> hand pointy thingy]
----------------------------------------------------------------------------
[static text = Parked For: ]
----------------------------------------------------------------------------
[locale variable = hoursince] [static text = Hrs.] [locale variable = minsince]
----------------------------------------------------------------------------
Then swipe over to "Tap Behaviour" and check "start another activity"
press select and activity or shortcut
swipe right to the shortcut tab
select the "Find Car" task we created earlier
pick an icon for it if it asks by pressing the button on the lower right hand corner
END CAR PROJECT
WIFI PROJECT
These tasks will automate turning your wifi on and off based on locations you are at often. I.E. your house, your work, your buddies house, your girlfriends house, etc...
It works via the cell near state, however im not perfectly clear on how much battery this drains, so i took an extra precaution by having a %SEARCHWIFI variable, set to either 1, or 0, (on or off, respectively). This variable's value is easily changed in any profile, so its easy to avoid conflicting profiles, as well as saves battery by not continuously searching for cellphone towers.
What i do with this, is have a profile, Near Home for example, and when im in a new location i want to automatically connect to, i just clone it, change the name, re-search cellphone towers and voila! I have like 10 of these and it works perfectly. So ill only make a "Near Home" profile, then you can clone that.
I like to have a pattern lock when im out and about, but i dont like having one when im at a buddies house, or at my own house, so i have tasker deal with that. If you want this, first you have to set a pattern lock code. then this will take effect.
Profile: Search Wifi?
Context:
Not Wifi Connected (check invert after the wifi connected task)
Variable Value -> %PACTIVE !~ *Car Mode*
Enter Task:
Variable Set -> %SEARCHWIFI ~ 1
Exit Task:
Variable Set-> %SEARCHWIFI ~ 0
Profile: Wifi Time-Out
If you are near one of the places and you somehow disconnect, tasker will wait 20 seconds to see if youre still disconnected and if you are , turn wifi off, turn the pattern lock on, and in 10 minutes, if youre still in the area it will try to connect again. of course you can change the times to whatever you want.
Context:
Not Wifi Connected
task:
Wait 20 seconds
if - %WIFII !~ *connect*
Secure settings -> pattern lock enabled
Variable set -> %SEARCHWIFI ~ 0
Wifi -> off
end if
wait 10 minutes
Variable set -> %SEARCHWIFI ~ 1
Profile: Near Home
context:
Cell near (press scan)
state -> Variable Value -> %SEARCHWIFI ~ 1
Enter Task:
Wifi On
Secure Settings -> Pattern lock disabled
exit Task:
if - %WIFII !~ *connect* (i know this is overkill)
secure settings -> patternlock disabled
wifi off
end if
END WIFI PROJECT
REQUESTS PROJECT:
Voice commands in car to perform various responses to a received text, requested by oscar615
NOTE: autovoice recognize doesnt play well with pop-up sms windows...sometimes works, sometimes only works after you close the pop up.
oscar615 said:
Wow, your car code is almost what I was thinking about earlier today. About the only difference is when I get a text I would like it to give me 3 audible choices. 1- send a pre recorded text letting them know i am in the car. 2- Give me the option to do nothing and 3- the option to call the person who sent the text and have the phone set to speaker, and pause any music that is on. The problem is I am so new to tasker and really have no idea how to do this. I will study your code to see if I can learn what you did and maybe add the other options to it. I want it to all be voice responses and and prompts.
Do you have any idea what needs to be added to what you have created in order to get what I want?
Anyway great work. Thanks for doing this thread and posting your profiles.
Click to expand...
Click to collapse
Profile: Driving Text
context:
event -> received text any
state -> variable value - %PACTIVE ~ *car mode* (or whatever profile you have for your car)
task:
silent mode on
misc -> say -> Text received by %SMSRN. What should i do?
wait 150ms
plugin -> autovoice recognize
silent mode off
Profile: Cant talk
context:
autovoice recognized -> check event behavior -> command = can't
state -> variable value - %PACTIVE ~ *car mode*
task:
phone -> send sms -> number: %SMSRF, Message: Sorry, im driving, cant talk right now, check 'store in messaging app'
profile: call back
context: plugin -> autovoice recognized, check event behavior, command = call
state -> variable value - %PACTIVE ~ *car mode*
task:
call -> number: %SMSRF, check auto dial
With autovoice, if the command is "can't" you can say anything, and as long as "can't" is somewhere in the sentence, it will perform that action. unless you specified otherwise, but i wont get into that. If you say anything other than those, it will just close.
end oscar's request
END REQUEST PROJECT
I can only set up a set of profiles to shake on lock screen for flashlight. Thank god for this thread
Sent from my SCH-I605 using Tapatalk 2
hopesrequiem said:
I can only set up a set of profiles to shake on lock screen for flashlight. Thank god for this thread
Sent from my SCH-I605 using Tapatalk 2
Click to expand...
Click to collapse
lmao this is only the beggining....Ive got a lot more. It just takes SO LONG to type all this stuff out lol. Ill add more tomorrow!
Wow, your car code is almost what I was thinking about earlier today. About the only difference is when I get a text I would like it to give me 3 audible choices. 1- send a pre recorded text letting them know i am in the car. 2- Give me the option to do nothing and 3- the option to call the person who sent the text and have the phone set to speaker, and pause any music that is on. The problem is I am so new to tasker and really have no idea how to do this. I will study your code to see if I can learn what you did and maybe add the other options to it. I want it to all be voice responses and and prompts.
Do you have any idea what needs to be added to what you have created in order to get what I want?
Anyway great work. Thanks for doing this thread and posting your profiles.
oscar615 said:
Wow, your car code is almost what I was thinking about earlier today. About the only difference is when I get a text I would like it to give me 3 audible choices. 1- send a pre recorded text letting them know i am in the car. 2- Give me the option to do nothing and 3- the option to call the person who sent the text and have the phone set to speaker, and pause any music that is on. The problem is I am so new to tasker and really have no idea how to do this. I will study your code to see if I can learn what you did and maybe add the other options to it. I want it to all be voice responses and and prompts.
Do you have any idea what needs to be added to what you have created in order to get what I want?
Anyway great work. Thanks for doing this thread and posting your profiles.
Click to expand...
Click to collapse
Yeah absolutely, I actually have a profile that does something very similar. But for a different scenario...tell me; would you want to do this through a voice command? or through a pop-up dialogue?
Sent from my SCH-I605 using Tapatalk 4 Beta
eBoody said:
Yeah absolutely, I actually have a profile that does something very similar. But for a different scenario...tell me; would you want to do this through a voice command? or through a pop-up dialogue?
Click to expand...
Click to collapse
Thanks
I think voice commands would be better. Since I would be driving. The more hands free the better I think. But if popups were the only way, then that might work also.
oscar615 said:
Thanks
I think voice commands would be better. Since I would be driving. The more hands free the better I think. But if popups were the only way, then that might work also.
Click to expand...
Click to collapse
They most certainly are not...youre using an android device! anyways, ill post a profile that does what you want under a requests project. its actually easier to do voice options.
edit: its up!
eBoody said:
They most certainly are not...youre using an android device! anyways, ill post a profile that does what you want under a requests project. its actually easier to do voice options.
edit: its up!
Click to expand...
Click to collapse
Thank you so much. Now to study these (I need to learn, I have lots of ideas) all of this and get it going on my phone. Thanks again.
IS there any interest in this thread? if not ill stop, its pretty time consuming to type all that stuff out.
I'm extremely interested! I love finding new tasker setups. Your car profile is intense!
Sent from my SCH-I605 using Tapatalk 2
I'm really interested and am going to have to use that car setup of yours. Just a question I've been wondering is can one backup and upload a profile for easy imports? That would make things so much easier rather than trying to follow I guide in my opinion.
Very interested. I can barely use Tasker. Makes me feel like such a nub
Sent from my SCH-I605 using Tapatalk 2
ok great! ill keep posting profiles. Ill post the XML files for you to import too then, I hope there wont be any compatibility problems!
im trying to figure out a better way to be able to semi-toggle between two roms with tasker, i have a way, and it works, but i want a faster, less convoluted way to implement it. Its a little pop up box that has a button asking if you want to swtich roms. kinda cool. I got the inspiration from monaco's google-play edition/stock rom toggle thing.
eBoody said:
ok great! ill keep posting profiles. Ill post the XML files for you to import too then, I hope there wont be any compatibility problems!
im trying to figure out a better way to be able to semi-toggle between two roms with tasker, i have a way, and it works, but i want a faster, less convoluted way to implement it. Its a little pop up box that has a button asking if you want to swtich roms. kinda cool. I got the inspiration from monaco's google-play edition/stock rom toggle thing.
Click to expand...
Click to collapse
Dude you seem like you are going to be a great asset to this community! Thanks for all you've done so far and all you plan to do!
Sent from my SCH-I605 using Tapatalk 2
hopesrequiem said:
Dude you seem like you are going to be a great asset to this community! Thanks for all you've done so far and all you plan to do!
Sent from my SCH-I605 using Tapatalk 2
Click to expand...
Click to collapse
Hey thanks bud! Yeah I plan on it. Always learning though I'll post the tasker profile along with the necessary dependencies once I figure it out.
Sent from my SCH-I605 using Tapatalk 4 Beta
Thanks for the thread. I am working on the car mode now.
Sent from my ZTE N9120 using xda app-developers app
GTurn said:
Thanks for the thread. I am working on the car mode now.
Sent from my ZTE N9120 using xda app-developers app
Click to expand...
Click to collapse
Awesome, if you guys have any requests I'll be more than happy to help!
Sent from my SCH-I605 using Tapatalk 4 Beta
I have Tasker installed on my phone. I tried to use it a time or two but to no avail. So, I "froze" it in Titanium as I purchased the software. A tutorial or two would be nice- not saying for you to do so. It is obvious to me though that you really have a great understanding of Tasker. I just wanted to chime in on this thread to give you a huge *Kudos*
Do you think you could do screen casts video walk through of your set ups?
Sent from my SCH-I605 using Tapatalk 2
harajyuks said:
Do you think you could do screen casts video walk through of your set ups?
Sent from my SCH-I605 using Tapatalk 2
Click to expand...
Click to collapse
I really like that idea. Maybe a YouTube video or two could work as well. No pressure, just saying
Sent from my Samsung Galaxy Note II...

HOWTO: Tasker Padfone S/X-easily detect phone/tablet switch-swap GMD Gesture Control

I've had my Padfone S for a few months now but never really found the time to figure this out till I woke up early this morning.
Background, the Padfone series of phones have a tablet 'dock' which acts as an external larger screen when its plugged in. Does not appear as a dock in the android sense of the word, so the dock state for Tasker isn't useful. The HDMI state activates for a short while when plugged into the tablet but deactivates a short while later, so no use as well.
Earlier posts in Tasker's google group suggested using `dumpsys display` with grep, but that's quite ROM-specific, and besides its hard to debug without a terminal due to the sheer volume of output.
**Check Tablet mode part**
I used to just grep wm size or wm density for Override, but that had a bug.
So it turns out 'Override' simply means 'not the same as the mode I booted in'. My task failed when I rebooted as a tablet, it would give the opposite answer. The solution, after I've played around a bit, is two calls to wm size/density.
The first call is `wm size | grep "Physical size: 1920x1200" | wc -l` - I save this in %tabletboot, it has the value of 1 when booted as tablet, 0 if booted as phone.
The second call is `wm size | wc -l` - I save this as %samemode, it has the value of 1 if we're in the mode we booted in (tablet/phone) and of 2 if we're not (because there's an additional Override line).
The test is simply "If %tabletboot + %samemode is even" or is equal to 2, if you prefer. This would be true if we booted as tablet AND we're still in that mode or if we booted as phone AND we're in the opposite mode.
**GMD Gesture Control part**
The reason I wanted to do this was mainly because GMD Gesture Control could only work either in phone or tablet mode for me. Auto-detection of the touchscreen input didn't work because of course there are 2 touch screens, so for tablet mode I needed to select 'asus_dds_sis_touch' and 'HC_DEFAULT' in GMD's advanced settings while for phone mode I needed to select 'Himax-touchscreen' and 'HC_FT5X'. Of course, you may also want to have different gestures for the different screens.
First, from a Padfone perspective, you need to go to ASUS Customized Settings -> Padfone Settings -> Dynamic Display List and add GMD Gesture Control to the list not to be killed when switching modes. Tasker and any Tasker plugins which need to constantly run (such as Whatstasker) should also be here.
GMD Gesture Control puts its settings in two files (both in /data/data/com.goodmooddroid.gesturecontrol/shared_prefs) named 'GestureControl.xml' and 'gestures.xml'. You'll need to create two additional copies of these files and delete the originals. So I ended up with 'tabGestureControl.xml', 'phoneGestureControl.xml', 'tabgestures.xml', and 'phonegestures.xml'.
Now, back to Tasker. Set up a state profile based on the value of the %TABLET variable. You'll need an entry task and exit task, which are almost identical. Basically, both tasks need to do these steps in order:-
1. Delete both GestureControl.xml and gestures.xml (use Root, continue after error)
2. Symbolically link the right copy of GestureControl.xml/gestures.xml
3. Kill GMD Gesture Control using root to restart it.
4. Pause GMD Gestures (use AutoShortcut), wait 1 second, and then unpause GMD Gestures
Of course, step 2 differs in the entry/exit task, one is for tablet configuration, one is for phone. The rest are identical.
Step 1 can be done using Run Shell and calling `rm /data/data/com.goodmooddroid.gesturecontrol/shared_prefs/GestureControl.xml` or using Tasker's Delete File. Remember to delete both files.
Step 2 needs Run Shell to call `ln -s /data/data/com.goodmooddroid.gesturecontrol/shared_prefs/tabGestureControl.xml /data/data/com.goodmooddroid.gesturecontrol/shared_prefs/GestureControl.xml`. Again, remember to do this for both files.
Step 4 needs autoshortcut, so download that and use it, under Plugins.
That's about it. The same technique can be used for anything you want to change in this awesome Padfone device. Perhaps you'd want to activate an overlay or change an app's font settings. With Tasker, no limits =).

[XPM] MTC Manager - by MVG-V70

author MVG-V70
(translated from Russian| ORIGINAL)
New xposed-module xposed-mtc-manager (MTC Manager.apk recorder contains the basic functions of our family)
Capabilities:
1. The module functionality moved xposed-mcu, not allowing the radio to go to sleep while scrolling starter.
When you receive a signal to shut down the unit produces a delay of 5 seconds, if at this moment reappears food, nothing happens in the absence of power cassette player goes to sleep.
Because of the implementation of inclusion in our MCU, for the period of voltage loss goes off the screen.
2. The module is implemented whitelist applications that do not allow the system to cover the necessary services and applications in the care to sleep and when you press the "Acceleration" in the curtain. Thus, the module eliminates the need for mtc-wakeup-service.
File exceptions must be on the outside of the map in the catalog mtc-manager. Filename whitelist.ini
The file should list the names of the application packages whitelist.
example
add to the white list and MTC-Volume MapCamDroid:
/external_sd/mtc-manager/whitelist.ini
com.mvgv70.mtcvolume
info.mapcam.droid
The names of packages and services can be taken from the application manifest file or with a program like Package Viewer.
3. Alternative screensaver with a list of exceptions that runs in any (even abnormal appendix). Staff alternative mechanism is activated screensaver.
Probably it will not work on all firmware versions.
Settings in settings.ini file in the directory mtc-manager on the outside of the map.
settings.ini
# Including an alternate screen saver, if you specify false mechanism will work full-time:
screenClock = true
# Time off the screen when not set will be used the value of the full-time settings:
screenTimeout = 60
# The name of the software package screensaver
screenPackage = com.microntek.screenclock
# Name aktiviti screensaver
screenClass = MainActivity
# If the name of the package and Activiti not specified, will use the standard screensaver
The list of exceptions is in the file ss_exceptions.ini - should list the names of the packages, for example:
ss_exceptions.ini
com.microntek.music
ru.yandex.yandexmaps
Also, the screensaver does not start when talking on the phone, rear view camera, navigation, and turn off the radio.
If instead of a beautiful clock screensaver MTCSreenClock.apk called conventional digital clock on a black background, it is necessary to make sure that the application is installed MTCScreenClock.
If the application is installed, you can try to set the parameters and screenPackage screenClass in settings.ini
All apps by MVG-V70 (EXTERNAL LINK)
Could someone please help me with configuring the mentioned whitelist?
I have not found any *whitelist* file in my device.
Do I have to create such file?
If so, how and where?
I also found something on moving some MTC folders to ext_SDcard?? why should something like this be necessary?
I have not moved anything, all cathalogues are as installed in the Booroondook's ROM.
My purpose is to STOP system from closing the apps when the device goes to sleep (like when I turn off the car for 5 minutes, etc.). Every time all the apps that were running are closed and I have to start them again.
I don't want ANY app to close.
Thanks in advance!
[EDIT]:
I found some more info on a Russian forum and:
I manually created a folder "mtc-manager" on External_SD location, in which I created a whitelist.ini
file including:
pl.neptis.yanosik.mobi.android
com.maxmpz.audioplayer
com.petrows.mtcservice
I also created a start_services.ini file with the same content, as this was to speed up launching these apps during boot.
Neither of it made any difference.
The apps are still being closed during device goint to sleep and I noticed no diferrence whatsoever.
Any ideas why this doesn't work?

Question Is it possible to detect fold/unfold using tasker?

Is it possible to detect fold/unfold using tasker? And then execute some tasks as a result?
lombrozo said:
Is it possible to detect fold/unfold using tasker? And then execute some tasks as a result?
Click to expand...
Click to collapse
Apparently it is by looking at the log; kaledh44 has worked it out.
see this thread;
Nova Launcher lock rotation brave toggle desktop-mode (Using Tasker)
Using Tasker to change the default launcher for OPPO FIND N, by canceling Oppo's method to enforce their launcher. -- Requirements 1- Tasker (paid ~3$). --- Autoinput (2$), for Brave desktop/phone mode auto switiching. 2- Launcher of your...
forum.xda-developers.com
In Tasker create a new profile choose Event and search for logcat entry.
>>>Fold
Component
OplusFoldingAngleManager
Filter
notifyFaceHallEventChanged status:3
>>>Unfold
Component
OplusFoldingAngleManager
Filter
notifyFaceHallEventChanged status:0
And create a task for it
Done
kaledh44 said:
In Tasker create a new profile choose Event and search for logcat entry.
>>>Fold
Component
OplusFoldingAngleManager
Filter
notifyFaceHallEventChanged status:3
>>>Unfold
Component
OplusFoldingAngleManager
Filter
notifyFaceHallEventChanged status:0
And create a task for it
Done
Click to expand...
Click to collapse
Amazing! Thanks!
@kaledh44 do you know if is possible to have Gmail and GMaps in phone mode also in the internal display?
Thank you
danilos2k said:
@kaledh44 do you know if is possible to have Gmail and GMaps in phone mode also in the internal display?
Thank you
Click to expand...
Click to collapse
by using shell command
(adb shell wm density 300)
The only problem that we dont have root access which is needed to run this command in tasker
This appears to have been changed since.
The above solutions no longer worked for me consistently on Galaxy Fold 4.
I managed to get it working with this: ( Tested only on Galaxy Fold 4 )
Folded / Closed: Logcat Entry
Component: DeviceStateProviderImpl
Filter: notifyDeviceStateChangedIfNeeded, newState=0
Unfolded / Opened: Logcat Entry
Component: DeviceStateProviderImpl
Filter: notifyDeviceStateChangedIfNeeded, newState=1
These events are executed once, as/when the inside screen turns on/off.

Categories

Resources