Create a profile to turn off WiFi or 3g data - Tasker Tips & Tricks

I want to create a profile to do the following after the phone screen is locked:
1- hibernate all grenified apps
2- turn off WiFi after network traffic is finished
3- convert 3g to 2g and disable data after network traffic is finished
Or I need an exposed module to to that

1. Use the Greenify app itself on Tasker plugins section (or try with 'stop package.name')
2. Use SecureSettings/AutoTools plugins (or try with 'svc wifi enable/disable' shell code)
3. Try this (will be necessary Xposed and its framework)

I can disable WiFi and 3g data in tasker but I need to do that job on one condition that there is no network traffic.
I want to do that because I want to leave the phone download an app and when it finsihes,tasker turns off wifi

@leprince2007
As far as I know there is not any variable you could use for net traffic.
I have been thinking of doing the same for my profile for some time as it is 4 years old, the only alternative I can suggest is to have a grace period, so when an app is no longer in focus the wifi/data connection will be on for 30 seconds ( can be customised to your personal preference). You can also add another condition if another app loads that requires a Wifi/data connection it will then kill the those actions.
Unless if someone else know there is away to control the wifi/data connection depending on traffic. That's the only thing I can suggest.

For measuring data transfer try this:
https://groups.google.com/forum/#!topic/tasker/k8GrBaZ7LQc
https://www.reddit.com/r/tasker/comments/4n26it/help_getting_tasker_to_monitor_mobile_data_traffic/

CrashOverride93 said:
For measuring data transfer try this:
https://groups.google.com/forum/#!topic/tasker/k8GrBaZ7LQc
https://www.reddit.com/r/tasker/comments/4n26it/help_getting_tasker_to_monitor_mobile_data_traffic/
Click to expand...
Click to collapse
Thank you sir for your help ,but I have a problem here, I don't know anything about coding.
Can you bring me the profile??

@CrashOverride93
Thanks for this I'm going to check to see if this works!
@leprince2007
I am willing to help you, but I will leave this to the person above 1st, to implement this in a task.

Can anyone help me,please??

leprince2007 said:
Can anyone help me,please??
Click to expand...
Click to collapse
OK here is what I did.
For simplicity I copied the Javascriptlet code mentioned in the thread above, and modified it so that you don't get any popups from Tasker.
1. You will need to add a veirible in the task where you want data traffic to be a condition, you will need to name it %Total usage then tap on the two wavy arrows, and type -1
2. You need to create a Javascriptlet you can do this by going to action > code > Javascriptlet
3. Copy the code below that I modified and paste this into the code section in the Javascriptlet. Leave the other settings at default.
var data = [];
var re = /wlan0:\s+(\d+)\s+(\d+\s+){7}(\d+)/;
var sourcestring = readFile('/proc/self/net/dev');
var matches = re.exec(sourcestring);*
data.push(matches[1], matches[3])
wait(1000);
sourcestring = readFile('/proc/self/net/dev');
matches = re.exec(sourcestring);*
data.push(matches[1], matches[3]);
var download = parseInt(data[2]) - parseInt(data[0]);
var upload = parseInt(data[3]) - parseInt(data[1]);
var total = download + upload;
//setGlobal('Download', download);
//setGlobal('Upload', upload);
setGlobal('TotalUsage', total);
4. Now what I did was create a if and else statement after the Javascriptlet, you will need to set your it too %Download then select math grater than and then specifie a number of bytes. I set mine to 500 and all works fine.
Let me know if you need more help

HatchetEgg said:
OK here is what I did.
For simplicity I copied the Javascriptlet code mentioned in the thread above, and modified it so that you don't get any popups from Tasker.
1. You will need to add a veirible in the task where you want data traffic to be a condition, you will need to name it %Total usage then tap on the two wavy arrows, and type -1
2. You need to create a Javascriptlet you can do this by going to action > code > Javascriptlet
3. Copy the code below that I modified and paste this into the code section in the Javascriptlet. Leave the other settings at default.
var data = [];
var re = /wlan0:\s+(\d+)\s+(\d+\s+){7}(\d+)/;
var sourcestring = readFile('/proc/self/net/dev');
var matches = re.exec(sourcestring);*
data.push(matches[1], matches[3])
wait(1000);
sourcestring = readFile('/proc/self/net/dev');
matches = re.exec(sourcestring);*
data.push(matches[1], matches[3]);
var download = parseInt(data[2]) - parseInt(data[0]);
var upload = parseInt(data[3]) - parseInt(data[1]);
var total = download + upload;
//setGlobal('Download', download);
//setGlobal('Upload', upload);
setGlobal('TotalUsage', total);
4. Now what I did was create a if and else statement after the Javascriptlet, you will need to set your it too %Download then select math grater than and then specifie a number of bytes. I set mine to 500 and all works fine.
Let me know if you need more help
Click to expand...
Click to collapse
They are very long steps!!!.Can you upload the profile for me,please???
i`am a beginner in using codes and I may make mistakes.
please help me

leprince2007 said:
They are very long steps!!!.Can you upload the profile for me,please???
i`am a beginner in using codes and I may make mistakes.
please help me
Click to expand...
Click to collapse
Yer coding is not my strength neither I just copy and paste and give thanks.
Here is a link where you can download my profile, you will need to import this within tasker.
https://drive.google.com/open?id=0B8M8tLEXhDNZbU9sM0RIYkYtazg

Thank you very much.I will try it and let you know.

HatchetEgg said:
Yer coding is not my strength neither I just copy and paste and give thanks.
Here is a link where you can download my profile, you will need to import this within tasker.
https://drive.google.com/open?id=0B8M8tLEXhDNZbU9sM0RIYkYtazg
Click to expand...
Click to collapse
Could you please re-upload that profile or email it to me. The link is not working, and I'd love to try it and study it.
[email protected] .com

thejackalsmark said:
Could you please re-upload that profile or email it to me. The link is not working, and I'd love to try it and study it.
[email protected] .com
Click to expand...
Click to collapse
Sure I can do that. Just so you know it does not contain the action to change 4/3G to 2G mode.
It also has other functions like if any other profile requires an internet connection via WIFI or DATA it will keep the connection on, but relies on the other profiles to switch off WIFI/DATA instead.
I have made a few tweaks to make the profile more efficient.
https://drive.google.com/file/d/0B8M8tLEXhDNZc2RMekJvLXg3RzQ/view?usp=sharing

HatchetEgg said:
Sure I can do that. Just so you know it does not contain the action to change 4/3G to 2G mode.
It also has other functions like if any other profile requires an internet connection via WIFI or DATA it will keep the connection on, but relies on the other profiles to switch off WIFI/DATA instead.
I have made a few tweaks to make the profile more efficient.
https://drive.google.com/file/d/0B8M8tLEXhDNZc2RMekJvLXg3RzQ/view?usp=sharing
Click to expand...
Click to collapse
Thanks a lot for re-sharing. The 4/3G<>2G isn't a big deal. I've never been able to get my LG Optimus f7 with Jellybean 4.1.2 using Boost Mobile service to switch to 2G no matter what tricks I've tried.
The biggest thing I'm interested in is having Tasker turn off my 3/4G data after a large/ time consuming download, such as a several hundred megabytes or more file, finishes.
I frequently start large downloads just before bed and turn off data when I get up and check the downloaded file.
Having Tasker monitor such downloads and automatically turn off data (I don't have wifi, just my phone's data plan) when they finish, would be outstanding!
I'll DEFINITELY be studying your profile very carefully and see if I can use it on my phone for this purpose.
Again, thanks for the time you took to reply to my request so quickly on an aging thread, AND sharing your profile.
The Jackal's "MARK"

thejackalsmark said:
Thanks a lot for re-sharing. The 4/3G<>2G isn't a big deal. I've never been able to get my LG Optimus f7 with Jellybean 4.1.2 using Boost Mobile service to switch to 2G no matter what tricks I've tried.
The biggest thing I'm interested in is having Tasker turn off my 3/4G data after a large/ time consuming download, such as a several hundred megabytes or more file, finishes.
I frequently start large downloads just before bed and turn off data when I get up and check the downloaded file.
Having Tasker monitor such downloads and automatically turn off data (I don't have wifi, just my phone's data plan) when they finish, would be outstanding!
I'll DEFINITELY be studying your profile very carefully and see if I can use it on my phone for this purpose.
Again, thanks for the time you took to reply to my request so quickly on an aging thread, AND sharing your profile.
The Jackal's "MARK"
Click to expand...
Click to collapse
You certainly can use it for what you want it to do, with a few tweaks to how the profile works, and changes to the traffic load.

Related

Data blocking/allowing per-application *IF ROAMING*

Hi,
I've been looking thru the net, however couldn't find anything useful for what i'm trying to do:
Consider this scenario: You're in and out of your homeland (ie. roaming often), and there are certain things that would make life easier, if there was network access despite roaming.
However, allowing data access system wide will create a bit of an issue in this case. Imagine you're abroad for a few days, and you just HAVE to check that one email account that's important. So you turn on the data-while-roaming switch and...VROOOOOOM... 20 applications urgently MUST have their updates right then and there, no questions asked. Also all unimportant email accounts come running to check whatever spam they can gather from the server. You get the picture.
So the idea is: I'd like to set per-application permissions for allowing data access while roaming. Meaning, i can leave my trusty data-while-roaming switch turned on all time, because any application i have installed must first be allowed to access the network.
I can imagine, this would firstly save the expensive bandwidth, and secondly also save battery power.
The question is: Is there any application out there that lets me do this? I know it sounds like an ordinary firewall, but the distinction between roaming/non-roaming is the essential one.
If i had to write it in pseudo-code, i'd probably go for something like
Code:
OnApplicationNetworkAccess
{
if(datamode == roaming && applicationpermission = onlinewhileroaming)
allowNetworkAccess();
else
blockNetworkAccess();
}
Has anyone ever seen anything like this?
Yes there is, 'droidwall' in the market. SGS has to be rooted though.
It allows to block per app, per 3G & Wifi. Only thing it doesn't do automatically is become active when roaming, you'll have to press one button for that...

Tasker App Question

Has anyone had luck using Tasker app on their Gtablet?
For one, I know almost nothing about programming, and I can't seem to find any decent tutorials on how to program tasks in the app.
I'm trying to make it so that my Gtablet will automatically shutdown if the screen times out for more than, for example, 30 minutes. Does anyone have some guidance or at least a place to start to teach myself how to use this program? I've gone to their wiki and other sites that show profiles and defines what each thing is, but they aren't put together all that well and they skip a lot of beginning steps that are obviously what I need to grasp how to make the most of this program.
Being edited...
johnsonjf said:
Has anyone had luck using Tasker app on their Gtablet?
For one, I know almost nothing about programming, and I can't seem to find any decent tutorials on how to program tasks in the app.
I'm trying to make it so that my Gtablet will automatically shutdown if the screen times out for more than, for example, 30 minutes. Does anyone have some guidance or at least a place to start to teach myself how to use this program? I've gone to their wiki and other sites that show profiles and defines what each thing is, but they aren't put together all that well and they skip a lot of beginning steps that are obviously what I need to grasp how to make the most of this program.
Click to expand...
Click to collapse
I use Tasker extensively on my phone, not so much on my G-Tab, but that is due to my needs, not the app. Due to limitations in Android, Tasker cannot address all situations - you can't use it as universally as you can use similar programs in Windows, for example.
For help, in addition to the home page (http://tasker.dinglisch.net/) and the Wiki (http://tasker.wikidot.com/profile-index), there is the user guide (http://tasker.dinglisch.net/userguide_summary.html) and the Google Groups link (http://groups.google.com/group/tasker?pli=1).
Simplest method for what you want to do: if you set your GTab WiFi to turn off when the screen is off and you have the QuickBoot app (which I have and like), you could set a Tasker Profile something like the following:
Context - WiFi disconnected
Tasker - wait 30 minutes
Plugin - quickboot Power off, if %WIFI ~ off
(As an alternative to step 3, if you have an app that powers off the tab, you could simply run that app as step 3).
This profile will run every time WiFi disconnects. It will wait 30 minutes and, if WiFi is still disconnected, it will power off the G-Tab.
Not perfect, of course - a better way to do it would be to do 30 1 minute waits, checking each time to see if WiFi is still off, and stopping the script if WiFi is on. This requires a variable to measure time and to turn off the GTab once 30 minutes has passed:
Context: WiFi disconnected
Tasker: Variable Set %WIFIOFF = 0
Tasker: wait 1 minute
Tasker: Stop if %WIFI ~ on
Tasker: Variable Add %WIFIOFF + 1
Tasker: Goto Action 8 if %WIFIOFF = 30
Tasker: Goto Action 3
Plugin: quickboot Power off
I could test this tonight, when I get home, if you want.
PM me if you need further help.

Tasker :post your tasker profiles

Hi.
Tasker beta updated recently to 4.8 and support new tile for
CM quick settings
So
i create this thread
to post and explore new profiles
I follow many projects from google and reddit
So i have set profiles for automate gps to high accuracy and back with secure settings
Vpn connect on wifi except secure point
Usb debuging only when i connect to certain pc (and just in case) when shutdown my device beacause i use encryption
Send sms to caller when driving
But most usefulls profiles found how to auto change cm profiles based taskers options cell near or wifi near bt near location etc...
CM detect profiles and CM profiles changer found to reddit are great jobs???
i expand my usage to CM profiles options
Based to these variables tasker upgrade all my device capabilites
Whats yours?
Is there a way for tasker you know if you've unlocked your phone. I want a task that flashes certain information when I unlock my phone
igbo_scouser said:
Is there a way for tasker you know if you've unlocked your phone. I want a task that flashes certain information when I unlock my phone
Click to expand...
Click to collapse
Information for what?
Mostly use is autoinput plugin with
Minimalistic widget
Have a look to this for more profiles
Just the data I have left until the end of the month. I have that side set up but I just need to know where I can find the variable that allows me to tell tasker that the screen has been unlocked and not just that it's on
igbo_scouser said:
Just the data I have left until the end of the month. I have that side set up but I just need to know where I can find the variable that allows me to tell tasker that the screen has been unlocked and not just that it's on
Click to expand...
Click to collapse
%KEYG
%KEYG seems to check if you have a keyguard enabled, and not if it's currently active.
Thanks for your help though
igbo_scouser said:
%KEYG seems to check if you have a keyguard enabled, and not if it's currently active.
Thanks for your help though
Click to expand...
Click to collapse
check with this
%KEYGUARDOFF
igbo_scouser said:
%KEYG seems to check if you have a keyguard enabled, and not if it's currently active.
Thanks for your help though
Click to expand...
Click to collapse
Tasker
%myDISPLAY is similar to the %SCREEN variable in Tasker, but it adds unlocked as a possible value, allowing us to differentiate between on and unlocked. These values are set based on the corresponding Tasker Events, and can be used as a Context (using Variable Value), or for flow control within Tasks.
Both of these didn't work. Maybe it's because I'm on the lg g4 and not on aosp
igbo_scouser said:
Both of these didn't work. Maybe it's because I'm on the lg g4 and not on aosp
Click to expand...
Click to collapse
Tasker recognize unlock as event so
Add a profile/event/display/unlock
Make a simple task to check if working
If work you can create a flow action
So monitor when device unlock (one profile)
And change variable value
and execute the desire task.(second profile) when new value set
I'm trying to get tasked to turn on LTE when I get an MMS and back off when its done downloading (closed had a module for NY Samsung phones but won't work on aosp)
Sent from my A0001 using Tapatalk
greekunit690 said:
I'm trying to get tasked to turn on LTE when I get an MMS and back off when its done downloading (closed had a module for NY Samsung phones but won't work on aosp)
Sent from my A0001 using Tapatalk
Click to expand...
Click to collapse
Did you try secure settings?
On Lolipop I have problem with mobile data dont automatic connect when I am out of wifi area.
Is there any way for tasker to solve this problem, I buy it last night, but its littly too complicated for me.
So something like this, when out of wifi area, connect to 3g, when in wifi area disconnect 3g.
What phone and what rom do you use?
Oneplus one, sultan latest 1.11
kvaju said:
Oneplus one, sultan latest 1.11
Click to expand...
Click to collapse
Download secure settings
Add profile/state/net/ wifi conect
New task /plugin secure settings /mobile data off
From main menu if expand profile you see the task you create
Tap to task and create exit task the opposite
But is known bug?
to @Sultanxda because automate data/wifi is main function of device
Did you post? Have you done clean installation?
I known its the main funcion od device, but I have trouble with every ROM on lolipop with this. Clean install, delete all apn create new, works one day ok, then same problem.
Thank you, will try to do this.
Google remove tasker from playstore
Available only from here

Online User-Interface - Real-time Anti-Theft/Phone Status

Greetings everyone,
https://youtu.be/T9aKmLTujik
What you see above is a "Control Panel" for my own Galaxy S7 Edge. I host this on my own website.
This means it can be seen and accessed from anywhere in the world, on any browser and/or device.
For privacy and security, I will implement a login system in the near future.
It has a couple of neat features, but since they are written in Dutch I will translate them to English:
Information:
Check battery level/percentage and check if your phone is being charged or not
Warns the user from the control panel if the battery is low.
Warns the user from the control panel to pull out the plug out of charging when it is fully charged
Check if your phone is in a light or dark place. I have optimized the light sensor as best as I could, The results are pretty accurate
Clipboard of your current copied content on your phone
Shows the phone model and the date and time of the last update sent from your phone
Check if Bluetooth is enabled or not
Check if Wifi is enabled or not
Show the current WiFi name, Wifi Speed, Wifi Channel & Wifi Signal Strength
Show the current Data Carrier / Mobile Signal strength (Weak, Normal, Strong)
Shows the current Call Volume percentage
Shows the current Media Volume percentage
Check if the screen of the phone is turned on or off
Check if GPS is enabled or not ( There is also a Live Google Maps on the right side, showing where the phone is right now )
Checks if the phone in call / calling / or getting called. ( in other words, it shows the user is busy with a phone conversation )
Checks if the user is browsing on the internet on the phone or not. ( It will check if a browser is open, needs more adjustments for more accurate readings )
I am surprised at the speed of the operations.
It takes a total of 3 to 4 seconds after clicking on "take a picture" button to take a picture from the front-camera and Upload it to my google drive.
It also removes the picture from my phone after it has been uploaded. WIth combination of SMS control this can be a great anti-theft option.
The "Record Audio" function works great too. after clicking on it on the control panel, it starts recording audio, waits 10 seconds ( records for 10 seconds ), stops recording audio and then uploads it to a special folder in my Google Drive.
The "Send SMS" function is very fast. after clicking on it, it will take about 1.5 seconds to send the SMS from your phone.
For now, the number to send the SMS to is hardcoded, but I will make it a variable so that it will be possible to type in the number on your web control panel and send the SMS to the number from your browser.
The "LOCK your phone" function immediately lock your phone remotely, even when your screen is turned off. You can unlock it with the code that has been set up in the Tasker Event.
Clicking on the Wifi, Bluetooth & GPS icon will toggle them( on / off )
Clicking on the Phone (screen) Icon, Will toggle the phone screen ( turns it on and off )
Clicking on the Clipboard icon will copy all the content to your own clipboard.
Not only the text but the icons also change dynamically.
Grey icons represent a false variable (turned off / dark / not in call & etc ) and the blue icons represent the true variables.
For example, in the screenshot above, Bluetooth is turned off and wifi is turned on.
When the battery gets at 15% or less, the icon will turn red and green when it's fully charged (100%) and the user will get an alert box warning with a notification sound straight from the browser about the low battery / full charge . ( Sound and notification can be turned off if you wish).
I have wrote a script with AJAX (Asynchronous JavasScript and XML) to do all of this in Real-time and without page-reloads. AJAX refreshes the page information every second (or whatever the user wants) without reloading the page.
The controls in this control panel are in many cases and in my experience a lot faster than Android Device Manager or other apps like Cerberus and Airdroid.
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
- On Tasker, I have used Taskers own variables but also created my own variables to be created/changed on certain triggers.
For example, when the lx level ( light sensor ) gets low, it will set a variable to "false" as boolean, meaning there is not enough light == it is dark.
- Next I use this variable in my HTTP POST Request URL to a very simple PHP script on my website I wrote..
The HTTP POST Request URL will post to my PHP Script.
My PHP script grabs the URL, strips certain parts of it, turns it into PHP variables and then sends it to my MySQL database ( all on my own hosting).
- I again use the wonderful Tasker to do all of this this every 2 seconds.
You can get (almost) real-time information about your phone if it's set to be updated every 1 second.
This will not be very heavy on the database so it's possible.
- I then made another webpage containing another simple PHP script that grabs all the variables ( those we saved in previous steps) from my Database and echo's (shows) it on the screen.
This is the very same page you see on the screenshot, This is the Control Panel.
In the last step, all we have to do is visit the webpage on my website.
It will show the control panel as seen in the screenshot. You will also be able to control your phone from here.
I am making a simple login function where users can login.
this means a single database can hold more than 1 user if you wish to.
This will also protect others to see/control your phone from the web as they will need login credentials.
My script will then grab the corresponding variables of your phone when you login, using your ID and checking it on my database.
I know this may sound complicated for a lot of you who think that this is too much work, but I am planning to finish this and make it a some kind of a Open-Source thing available to every android and (rooted) tasker user.
All you need is:
- My Tasker project files ( all you need to do is import it to your own Android )
- Your own webhosting with MySQL database and PHP.
There are TONS of FREE online webhosting that will offer exact this. I'd love to post all the links here, but i'm not sure if it will be seen as advertising, so let me know.
- My PHP script(s), all you need to is simply upload it to your own website.
- My MySQL database configuration file - After importing this single file, the whole database will be created automatically on your website. ( using MySQL on your hosting )
After that, and when my Login function is complete, you could create an account for your self and/or others where they can login from anywhere in the world, on any browser or device and check their phone status and control their phone in Real-Time.
Sicariux said:
Greetings everyone,
i63.tinypic.com/20jsimh.png
What you see above is a "Control Panel" for my own Galaxy S7 Edge. I host this on my own website.
This means it can be seen and accessed from anywhere in the world, on any browser and/or device.
For privacy and security, I will implement a login system in the near future.
It has a couple of neat features, but since they are written in Dutch I will translate them to English:
Information:
Check battery level/percentage and check if your phone is being charged or not
Warns the user from the control panel if the battery is low.
Warns the user from the control panel to pull out the plug out of charging when it is fully charged
Check if your phone is in a light or dark place. I have optimized the light sensor as best as I could, The results are pretty accurate
Clipboard of your current copied content on your phone
Shows the phone model and the date and time of the last update sent from your phone
Check if Bluetooth is enabled or not
Check if Wifi is enabled or not
Show the current WiFi name, Wifi Speed, Wifi Channel & Wifi Signal Strength
Show the current Data Carrier / Mobile Signal strength (Weak, Normal, Strong)
Shows the current Call Volume percentage
Shows the current Media Volume percentage
Check if the screen of the phone is turned on or off
Check if GPS is enabled or not ( There is also a Live Google Maps on the right side, showing where the phone is right now )
Checks if the phone in call / calling / or getting called. ( in other words, it shows the user is busy with a phone conversation )
if the user is browsing on the internet on the phone or not. ( It will check if a browser is open, needs more adjustments for more accurate readings )
I am surprised at the speed of the operations.
It takes a total of 3 to 4 seconds after clicking on "take a picture" button to take a picture from the front-camera and Upload it to my google drive.
It also removes the picture from my phone after it has been uploaded. WIth combination of SMS control this can be a great anti-theft option.
The "Record Audio" function works great too. after clicking on it on the control panel, it starts recording audio, waits 10 seconds ( records for 10 seconds ), stops recording audio and then uploads it to a special folder in my Google Drive.
The "Send SMS" function is very fast. after clicking on it, it will take about 1.5 seconds to send the SMS from your phone.
For now, the number to send the SMS to is hardcoded, but I will make it a variable so that it will be possible to type in the number on your web control panel and send the SMS to the number from your browser.
The "LOCK your phone" function immediately lock your phone remotely, even when your screen is turned off. You can unlock it with the code that has been set up in the Tasker Event.
Clicking on the Wifi, Bluetooth & GPS icon will toggle them( on / off )
Clicking on the Phone (screen) Icon, Will toggle the phone screen ( turns it on and off )
Clicking on the Clipboard icon will copy all the content to your own clipboard.
Not only the text but the icons also change dynamically.
Grey icons represent a false variable (turned off / dark / not in call & etc ) and the blue icons represent the true variables.
For example, in the screenshot above, Bluetooth is turned off and wifi is turned on.
When the battery gets at 15% or less, the icon will turn red and green when it's fully charged (100%) and the user will get an alert box warning with a notification sound straight from the browser about the low battery / full charge . ( Sound and notification can be turned off if you wish).
I have wrote a script with AJAX (Asynchronous JavasScript and XML) to do all of this in Real-time and without page-reloads. AJAX refreshes the page information every second (or whatever the user wants) without reloading the page.
The controls in this control panel are in many cases and in my experience a lot faster than Android Device Manager or other apps like Cerberus and Airdroid.
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
- On Tasker, I have used Taskers own variables but also created my own variables to be created/changed on certain triggers.
For example, when the lx level ( light sensor ) gets low, it will set a variable to "false" as boolean, meaning there is not enough light == it is dark.
- Next I use this variable in my HTTP POST Request URL to a very simple PHP script on my website I wrote..
The HTTP POST Request URL will post to my PHP Script.
My PHP script grabs the URL, strips certain parts of it, turns it into PHP variables and then sends it to my MySQL database ( all on my own hosting).
- I again use the wonderful Tasker to do all of this this every 2 seconds.
You can get (almost) real-time information about your phone if it's set to be updated every 1 second.
This will not be very heavy on the database so it's possible.
- I then made another webpage containing another simple PHP script that grabs all the variables ( those we saved in previous steps) from my Database and echo's (shows) it on the screen.
This is the very same page you see on the screenshot, This is the Control Panel.
In the last step, all we have to do is visit the webpage on my website.
It will show the control panel as seen in the screenshot. You will also be able to control your phone from here.
I am making a simple login function where users can login.
this means a single database can hold more than 1 user if you wish to.
This will also protect others to see/control your phone from the web as they will need login credentials.
My script will then grab the corresponding variables of your phone when you login, using your ID and checking it on my database.
I know this may sound complicated for a lot of you who think that this is too much work, but I am planning to finish this and make it a some kind of a Open-Source thing available to every android and (rooted) tasker user.
All you need is:
- My Tasker project files ( all you need to do is import it to your own Android )
- Your own webhosting with MySQL database and PHP.
There are TONS of FREE online webhosting that will offer exact this. I'd love to post all the links here, but i'm not sure if it will be seen as advertising, so let me know.
- My PHP script(s), all you need to is simply upload it to your own website.
- My MySQL database configuration file - After importing this single file, the whole database will be created automatically on your website. ( using MySQL on your hosting )
After that, and when my Login function is complete, you could create an account for your self and/or others where they can login from anywhere in the world, on any browser or device and check their phone status and control their phone in Real-Time.
Click to expand...
Click to collapse
It looks like a great project.
Checks if the user is browsing on the internet on the phone or not. ( It will check if a browser is open, needs more adjustments for more accurate readings )
Click to expand...
Click to collapse
What about checking the network traffic to know whether the user is browsing or not?
I know this may sound complicated for a lot of you who think that this is too much work, but I am planning to finish this and make it a some kind of a Open-Source thing available to every android and (rooted) tasker user.
Click to expand...
Click to collapse
Even Open Source? That rocks.
XDA's Tasker subforum isn't that popular. You might wanna post your project on reddit too, where the Tasker community is way bigger and more popular:
https://www.reddit.com/r/tasker/. Let us know if you'll post it there too.
I'm looking forward for this project. Personally, I don't think I would use this as I don't think I really need it (although it doesn't hurt to have an anti-theft), but I'd like to see how it is done, if you're gonna make it Open Source.
Good luck!
Hi and thanks for your reply!
What about checking the network traffic to know whether the user is browsing or not?
Click to expand...
Click to collapse
Do you mean any random network traffic? in that case, a simple incoming whatsapp message could trigger the browser variable and set it to "true".
I will try reddit ... I have tried posting it in the official Tasker forums, but the my post is still awaiting moderator approval after a long time.
Since i've posted this thread, I've created new functions already like video recording (microphone audio included) the phone screen for 10 seconds and upload it to google drive.
I haven't seen this option on any other anti-theft yet. In a case of emergency, you could literally watch the thief do things on your phone and also hear him talking.
Since it's going be to open-source, it's highly customizable. You could change the icons, add new functions, remove functions , change the styling to your own wishes and improve the "web app" overall.
For those interested, Since the first post, I've added more options and starts looking good
https://youtu.be/T9aKmLTujik
For rooted users, you could make an add-on app that the user puts in the /system partition and, in case of factory reset, installs Tasker and restores it's data.
That way, the user has a chance of finding their phone even if the thief performs a factory/hard reset.
EDIT: Are your files available? I can't seem to find them.
Vagelis1608 said:
For rooted users, you could make an add-on app that the user puts in the /system partition and, in case of factory reset, installs Tasker and restores it's data.
That way, the user has a chance of finding their phone even if the thief performs a factory/hard reset.
EDIT: Are your files available? I can't seem to find them.
Click to expand...
Click to collapse
With the new Android versions, this is not a reliable thing anymore. This is the same reason Cerberus App stopped offering a special APK that could be installed in the /system by flashing it.
Also, it would be very difficult to have an add-on app install Tasker, AutoRemote, FolderSync and other plugins it needs automatically and configure them too.
I haven't made my files available yet. I am still perfecting it and awaiting community tips and input to expand the app more before releasing the source-files.

Chnange audio profiles based on location

Hi
I have installed on my phone the app audio profiles with a tasker plugin
I've created a tasker profile that turn my phone on vibration mode when I'm in a particular location, but now how can I disable vibration when I leave this particular location? Which kind of profile I must create?
If you profile is GPS or cell location then surely you just need to create an exit task. So once the profile isn't true it'll run the exit task, which you can determine what is in there.
Thanks.
So, if I understand, I have to simply long press on my profile (vibration mode) and choose "Add exit activity".
Then after choosen the exit activity my phone will run this activity when I will be not anymore in the profile's location?
copeppe said:
Thanks.
So, if I understand, I have to simply long press on my profile (vibration mode) and choose "Add exit activity".
Then after choosen the exit activity my phone will run this activity when I will be not anymore in the profile's location?
Click to expand...
Click to collapse
Hold on the current entry task and this will give you an option to add in the exit task, so either create new or choose an existing one. Hope you get it sorted out [emoji106]
mgdorbit said:
Hold on the current entry task and this will give you an option to add in the exit task, so either create new or choose an existing one. Hope you get it sorted out [emoji106]
Click to expand...
Click to collapse
hello, i am trying to make a tasker profile that opens a specific application (apk) when the speed drops below 4 kmh only with the GPS because i do not have any sensors. Unfortunately I am still not able to set the variables in the Speed well and if I need a secure setting plugin for the GPS. Can you lead me towards success or advise me how to get started? Thank you
bettuccio said:
hello, i am trying to make a tasker profile that opens a specific application (apk) when the speed drops below 4 kmh only with the GPS because i do not have any sensors. Unfortunately I am still not able to set the variables in the Speed well and if I need a secure setting plugin for the GPS. Can you lead me towards success or advise me how to get started? Thank you
Click to expand...
Click to collapse
I'm afraid I've not looked at any of the GPS settings or functionality. Try a search on the internet, you might find something.
Sent from my SM-G950F using Tapatalk
mgdorbit said:
I'm afraid I've not looked at any of the GPS settings or functionality. Try a search on the internet, you might find something.
Sent from my SM-G950F using Tapatalk
Click to expand...
Click to collapse
something I found but it does not work in practice.

Categories

Resources