[Q] Creating a timer app to check current app running time - Java for Android App Development

I am a new to android and I have been tasked to create a timer that the user for example can select any apps in the android phone and set a timer which can be for example 5 minutes and after the time has passed it will come out an alarm and notification that they have been using that specific app for 5 minutes . I have gone through activity manager however I am not sure how can I build a timer that can count how long an app is running .
Any response is helpful .

Related

can anyone get this program working?

I used this program all the time until win mobile 5. since then the app will not wake up when an alarm is triggered. once the phone is turned back on the alarm does go off. i have searched but have yet to find an app that does what this one can do. basically it is easier to recorded a quick msg and set it to a reminder than to type it.
http://www.applianmobile.com/pocketpc/remindme/index.php

Alarm problem

Sorry if this is the wrong forum but i posted in the question and answer section and got no responses....
I can't seem to get the alarm to work right on my phones. I had the mytouch 3g and now i have the nexus one. They never consistently work. I've tried searching but all the solutions i seem to find are to either download a different alarm and exclude it from whatever task killer app you have.
Is the alarm a different process than the clock app? because for the last 3 nights i have gone to bed with the phone plugged in and the clock app running and the alarm has only worked once. The clock app displays the next scheduled alarm, but this morning my alarm was supposed to go off at 7:50am but never did. I woke up at 8:30 and the clock app still said that an alarm was scheduled for wednesday(today) at 7:50am.
Mine buzzed fine this morning at 6:04 and I even had the phone on silent. I'm using the default ringtone (Ringing Alarm).
Do you have a program that's killing it? I don't use any of those Task Manager programs.
Abbsta said:
Mine buzzed fine this morning at 6:04 and I even had the phone on silent. I'm using the default ringtone (Ringing Alarm).
Do you have a program that's killing it? I don't use any of those Task Manager programs.
Click to expand...
Click to collapse
I have a task manager app but its not set to auto kill, and i put my phone on the clock app and use it as a clock when i go to bed
When you programmed the alarm, what ringtone did you set for the alarm? Or is it set to only vibrate? You may have selected a ringtone that doesnt work?
i use Fade In, its on my memory card but it has definitely worked before. but its not like the alarm goes off without any sound, it just doesn't come up at all
doalittledanse said:
I have a task manager app but its not set to auto kill, and i put my phone on the clock app and use it as a clock when i go to bed
Click to expand...
Click to collapse
Try it without that task manager just to make sure it's not it that's killing it. I don't know the ins and outs of the OS but this clock app is new I think with 2.1 so that task manager might not be 100 % compatible with it.
Ive used mine for a week now and its gone off every time. Its hard to figure out what youre doing wrong without seeing you do it. Try just using the default settings for everything.
Abbsta said:
Try it without that task manager just to make sure it's not it that's killing it. I don't know the ins and outs of the OS but this clock app is new I think with 2.1 so that task manager might not be 100 % compatible with it.
Click to expand...
Click to collapse
It's likely to be that.. Nothing should be killing apps except the OS, which knows about the application lifecycle. Having apps loaded that kill things when they feel like it is asking for trouble.
TonyHoyle said:
It's likely to be that.. Nothing should be killing apps except the OS, which knows about the application lifecycle. Having apps loaded that kill things when they feel like it is asking for trouble.
Click to expand...
Click to collapse
But I leave the clock app open when i go to sleep. the screen stays on, the app doesnt close
doalittledanse said:
But I leave the clock app open when i go to sleep. the screen stays on, the app doesnt close
Click to expand...
Click to collapse
The alarm is a process within the app. Try un-installing it at least that way you would know for sure.
I've had the same problem and been late for a test at uni :S (Using Sense UI) I go to the clock, turn the alarm off, then turn it back on, it says 'this alarm is set to go off in 6 hours blah blah" then I turn the screen off and go to sleep, but if I use taskiller it sometimes doesn't go off, even when the clock app's ignored
if you choose the vibrate option then the alarm does not sound. thats my experience
I've never had the vibrate option on.
And I've noticed too that if I go into the alarm setting and back out so that it displays the message, that it always goes off. Just kind of a pain to do that every night.
I don't know if its just my phone... but I miss the dedicated alarm clock function...
I rely on my n1's alarm every morning and haven't had any trouble with it. I don't run any task killers especially ones that kill "all but xxxxx" IMHO that is asking for trouble.
I stopped using task killer, in favor of 'quick system info'. Which has the ability to end applications but only does so on your explicit input. (I have an absolute disdain for MP3 store auto running itself, i'd rip it out of the OS, but I don't want to root my phone just yet.) I haven't had any issues with the alarm in either case however.
I thought I was on crazy pills! Ever since I got my N1, I've overslept every day! I just ran a test this morning and changed the alarm time from 4am to 8am and it went off perfectly. I have vibrate selected and run task killer as well. I never thought that task killer would be able to kill a clock event, so now Ill try running a different task manager as suggested.
Edit: I just noticed that Advanced Task Killer has an Ignore App option, I've now ignored the clock app and will test.
I've been using advanced task killer, but I unchecked the Clock and it seems to be working fine now, still using my iPhone alarm clock though... don't want to be late for work!
So people who use task killing apps are surprised tasks are being killed? lol awesome.
Have you guys having issues installed anything like locale or timerrific? timerrific has default profiles that will change your ringer/volume settings.
muncheese said:
So people who use task killing apps are surprised tasks are being killed? lol awesome.
Click to expand...
Click to collapse
lol indeed! Keep in mind, on Windows Mobile, the alarm is triggered by an OS notification service, not the alarm app itself. So who'd huv thunk it would work any different?

Tasker - automate your phone

One of the best apps in the Market for android is Tasker. Needless to say what transformation cand your phone get by using this app. You can see that here:
http://tasker.dinglisch.net/
and you can get it from here:
https://play.google.com/store/apps/details?id=net.dinglisch.android.taskerm
I was just trying to find a collection of profiles for O1 and it seems there isn`t one, so why not having it right here.
So let`s get the best from our O1 by sharing the profiles we can use for different tasks. Practically there is no limit to what we can do with the phone using that app.
I also recommend you should post your system configuration because some tasks may not work on some roms, kernels etc.
LET YOUR SMARTPHONE BE SMART!
For people using ICS Roms, go to sttings>language and input method>text transformation result and select Pico TTS so you enable voice on Tasker.
I`ll start with a simple profile to make you phone stop ringing by turning it face down:
For this Context, you would choose State, then pick Orientation. You'll get the options you see at left. For this example, "Face Down" is a pretty deliberate action you take with your phone.
For the tasks, you can add "Bluetooth" and "WiFi" from the Net menu, set to Off, "GPS" from Misc set to Off, and set the volumes for "Media Volume" and "System Volume" to 0 from the Audio menu. If you'd like, you can re-order the tasks in priority by pressing and dragging them up the chain. In this case, I moved the volume-to-0 tasks up higher, since silencing the phone was the most important thing to do. Hit Done, and you're all set.
And there you go! Just flip the phone on it`s face to make it silent.
All the profiles listed below can be found here
http://tasker.wikidot.com/profile-index
Simple
Use different ringtone for callers not in your contact list
Button to turn 3G Data Connection on / off
Wi-fi Button for home screen
Full silent mode button (turns off ALL sound including media and notifications)
Battery icon on home page that shows exact %
Birthday alert from google calendar.
Auto Respond to Received SMS while driving.
Speak Weather in the Morning
Add Calendar Entry Based on another entry (rename if necessary
Lock An Application
Start the Day with a Particular Application
Battery Full Alert
Launch Music App When Headset Inserted
Launch Menu of Music Apps When Headset Inserted
Keep screen awake when using the keyboard
Speaking Clock for Android 1.5
Control Keyguard (scroll to unlock) when Power is Connected/Disconnected
Keep Multiple Backups of Tasker Config
Change Ringtone on Every New Call
Mute in Meetings
Hold Ringer Volume Down
Auto-Respond To SMSs At Night
Change Volume Levels during Different Times of the Day
Check Data/SMS/Minute Usage With Carrier While Sleeping
Temporarily max brightness of screen during Incoming Call
Auto (Silent) Sleep Mode with Exceptions
Always ring loudly for call from important contact
Blocking Calls
Camera Gesture
Automatically turn off Bluetooth
Connect2Wifi: task with loops and feedback if connected or not
Intermediate
This will retrieve your location then post to xml file and send location via sms 1/9/2012
Find weather for next two time periods for your current location and speak it. (Using HTTPGet)
Keep volume low when using headphones
Repeat Caller Name
Power Plug In - Choose Car/Home/Night Mode
Generic Toggle Widget
Open the keyboard and start texting
Set volume then Launch menu of music apps
Alarmclock without Snooze
Alarms with Snooze and Vibrate
Geburtstagserinnerung (German)
Car Locator
Notification Reminder Pulse
Locate your phone using SMS and google maps
Lock your phone and locate it by SMS and sound
A full talking clock
Act like a docking station when plugged into USB
Auto answer calls when your bluetooth headset is connected
Extended phone profile changer with Notification and Widget
Turn your cell phone into a Voip phone
Create KML files for Google Earth
Enhancing battery life using Tasker
Missed Notification Reminder
LocateMe Log, Track And Emergency Button
Daily Reminder SMS e.g. for birth control
Total Wifi and Mobile Data Sync Control
The Ultimate Alarm Clock
Boost SD Card Read Cache
Automatically Send an "I'll be Home Soon" SMS
Nandroid Backup whilst you sleep with file management
Keyguard Delayed Enabler (with ready-made task for a Keyguard toggle widget)
Gmail/SMS/Call Notifications with "Minimalistic text"
The Deep-Sleep-Detective
Text me when you get home!
Juice Defender inspired Battery saving
Clock in and Clock out - create a calendar entry with event start and event end times
Disable keyguard when you are at work/home
Advanced
Record Phone Calls (legal)
Periodic Data Check (Juicedefender Replacement)
Periodic Data Check with Widgets (Juicedefender Replacement)
Creates profiles similar to S60 devices and changes them depending on variety of factors
U.S. Navy Ships Bells (Using Tasker's OR '/' feature) * Pattern Matching *
Changing background image depending on current weather (Using HTTPGet)
Find weather for your current location automatically (Using HTTPGet)
Set up an alarm clock that adapts to inclimate weather (Using HTTPGet)
Aumatically start / stop your WIFI when you are at home with limited battery use
Enable WIFI when within cell tower range for multiple access points, minimal battery use
Balance wifi usage and data check (Update)
CPU control profiles for governor and frequency
Tasker as an Automated Task Manager
Blackberry-like Sound Profiles
Automatically change display brightness while plugged in depending on time of day
Automatically respond to texts with street address
Expert
iTANCard
Am I the only one who thinks that an app doing something at absolutely anything you do with the phone, this is not draining, it just uses 100% of the CPU when you flip the phone...
And lets not mention that, to make phone silent when turned upside down means it has a permanent wakelock, and sensor constantly finding what is the position etc...
At the end, you will have a very smart phone, but you won't be able to answer a call, because when answering phone must change all the settings, and then reboot, and... whatever, this thing sucks! Just like juice defender, but it is oriented 100% on losing performance and battery and control over the phone...
Oh you can try to make it do a factory reset every day if it is so smart
.........
vlt96 said:
Am I the only one who thinks that an app doing something at absolutely anything you do with the phone, this is not draining, it just uses 100% of the CPU when you flip the phone...
And lets not mention that, to make phone silent when turned upside down means it has a permanent wakelock, and sensor constantly finding what is the position etc...
At the end, you will have a very smart phone, but you won't be able to answer a call, because when answering phone must change all the settings, and then reboot, and... whatever, this thing sucks! Just like juice defender, but it is oriented 100% on losing performance and battery and control over the phone...
Oh you can try to make it do a factory reset every day if it is so smart
.........
Click to expand...
Click to collapse
Read first, post after. Tasker app does not keep your phone awake as most tasks are set to trigger while it is awake and the display is on. Like the task to open automatically wifi when you open your browser or xda app and set it off after closing those apps. And when setting triggers based on power settings or time, the wakelocks are not constant, being activated just like alarm wakelocks. In fact you can set smart alarms too. Or actions based on calls/sms/mms received from specific ppl at specific times etc., or actions based on gestures set by you, proximity sensor ...
Tested wakelocks with BBStatus and no wakelocks, the phone goes to deep sleep. Tested cpu freq with Cool Tool and max freq is used only when starting the triggered app or doing the task set. In the rest of the time the freq oscillates normally.
And please do not make comments on any app based on how other apps behave. Try it then post.
If anyone is using this app, post your profiles or the ones you think are usefull.
nice thread! let me share my fav profiles
@vlt
Yea, you are the only one who thinks it because otherwise the app wont get 4-5 stars at always if it is battery consuming also, just because the developer had explained clearly how the tasker consume battery. its in the userguide inside and im vrry satisfied with it.
@voyager
tasker is just amazing to me ive been using it for long because it really makes my phone even smarter.
undoubtedly yes, using sensors as a context is the most battery comsuming but we can Limit the use of its detection by ourselves. not mentioning its pre-installed functionality that it wont detect when screen off, for your silent mode thing we can add another context - how about only when our launcher is in the foreground? that makes things even easier
now im glad to share my most frequently used profiles (not giving you guys my private ones XD) including
- vibrate 0.3 second with a little toast msg when power is plugged
- vibrate 0.3 sec and show how much battery left with toast when power is unplugged
- weekdays auto vibration mode in the morning
- auto rotation only on browser
- temporarily disable lockscreen when specified apps are opened (my default set for u is calculator)
- CM7 camera anti-flickering (good for those who OC with stock kernel )
- brightness 80% when camera activates and restore after exit
although gestures and proximity sensor contexts are SUPER COOL, other than the time i show off to my friends xD, ive always been avoiding the sensors to eliminate any chances of over using them and cause batteries.
so, i guarantee my profiles are super battery friendly....
hehehe you must be tempted to download immediately? do it! tell me what do you think of my favourite profiles which are always activated on my P500
to import, unzip my zip and u get xml files. go to tasker, long press "profiles" tab, import, choose the xml. done!
lol dont worry abt the little tip, Miasmic never gives malicious tasks
Happy tasking!
Sent from my LG-P500 using xda premium
I suppose camera anti-flickering profile uses the OC task and downclocks the phone when opening camera right?
Nice ideea!
voyager20021 said:
I suppose camera anti-flickering profile uses the OC task and downclocks the phone when opening camera right?
Nice ideea!
Click to expand...
Click to collapse
yup!! very handy, then the clock goes back up when leaving the cam
Sent from my LG-P500 using xda premium
Miasmic said:
yup!! very handy, then the clock goes back up when leaving the cam
Sent from my LG-P500 using xda premium
Click to expand...
Click to collapse
How do you change OC on it?
.........
Set a profile which is based on a context on which the task will trigger, for example when open camera, set task to set clock to 600 Mhz, then set exit app task to reset the clock back to your usual OC freq.
You can play like that with almost everything on you phone.
I use a profile to like turn in gps when i open maps and automatically close it later
Sent from my LG-P500 using xda premium
karthiknayak94 said:
I use a profile to like turn in gps when i open maps and automatically close it later
Sent from my LG-P500 using xda premium
Click to expand...
Click to collapse
Doesn't it have an option for network location too?
karthiknayak94 said:
I use a profile to like turn in gps when i open maps and automatically close it later
Sent from my LG-P500 using xda premium
Click to expand...
Click to collapse
Yap! Also can set to start wifi/data when opening browser and disconnect when closing it etc.
vlt96 said:
Doesn't it have an option for network location too?
Click to expand...
Click to collapse
Look under task>net. If not there then no.
I can't get it executes the task, the notification keep saying no active profiles. Imported missmic XML profiles (thanks to miasmic). please help, thanks....
Try setting some simpler tasks like start wifi when opening browser. Miassmic`s tasks can be set manually too.
Here`s another profile
Enable WiFi when at Home
Context: State –> Cell Near
Tap the “Start” button and move around your home as your area may be covered by several cells (the “<” sign represents the tower you’re currently connected to). You may stop it after few minutes.
Action: Net –> WiFi
Another profile which sets up a shortcut on home screen for taking instant photos, without opening camera app (point and shoot)
Long-press on the Home-screen > Shortcuts > Task
Action: Media –> Photo Series Time (So that new photos don’t overwrite the previous one and every new photo will have the time attached with its name.)
If discrete is checked, there will be no sign of the picture being taken.
Profiles i use
I attached some of my usual profiles.
What they do:
Missed call> after any missed call with display locked the phone vibrates 0.7 sec than waits one minute and says "you had one call x minutes ago" every minute for 30 minutes. Profile must be used with display unlocked profile
Display unlocked> if you had a missed call and unlock the phone the missed call profile stops
Charging>when connected to AC/usb (can be set to either or any) phone will vibrate 07 sec and say "charging"
Battery full>when connected to AC/usb (can be set to either or any) and battery reaches 100% the phone will say "battery full"
Profiles can be improved or modified easy to reach anyones expectations.
This application has a few problems like battery drain .
Another one is UI....it's a bit unfriendly by the way the cool thing is that you have that if :
if condition1 = or anything with condition 2 then execute .
Yap, a bit unfriendly, but once you now how...
Hi,
On cm 7.2, how do you set tasker to enable or disable pattern lock?
I'm on cm 7.2 since yesterday on my Desire. It's my first time on cm, actually. Before that, I used to be on HTC Desire specific roms. I'm rooted.
I've been using Tasker for quite a while, and by now I have a number of profiles that make me feel my phone is smart
Now, the big problem with Tasker is that it spoils you by doing all sorts of things automatically for you. And when a profile no longer works and you have to do things manually, you get really annoyed
And so, in that context, I have the following profile :
Profile : Home
Context : Cell Near
Variable Set %HOME to on
Wifi Set On
Secure Settings Configuration Pattern Lock disabled
Previously, before I switched to cm 7.2, this used to work perfectly, with GO Launcher and stock pattern lock. Now that I'm on cm 7.2 also with GO Launcher, Tasker can no longer act on pattern lock.
Any idea anyone?
Thanks,
Egg
SOLVED :
I solved my issue by complety removing Secure Settings and re-installing version 1.2.2 from Google Play.
So I am thinking about buying this app but.....
This app is incompatible with your device.
CTM Samsung GT-N7100
Is there a way that i could get it to work do you think before i possibly waste my money, or is it just a risk i am going to have to take?
JohnMather said:
Is there a way that i could get it to work do you think before i possibly waste my money, or is it just a risk i am going to have to take?
Click to expand...
Click to collapse
There's a 7 day trial version you can download here:
http://tasker.dinglisch.net/download.html

Your S3 Tasker Profiles

I thought it would be a good idea to share your Tasker profiles.
I recently discovered this app and after 3 years of using Android it feels like Android has a whole bunch of extra features.
My profiles are boring really but I'll share anyway.
My first profile puts my phone on silent between 2am and 10am.
My second profile turns off Bluetooth after 3 minutes of being unpaired.
My third and final profile waits until my screen goes off, waits 5 seconds,turns the screen on displays the time on an app called night screen lite (only between 9pm and 11am)
What are your Tasker profiles?
Sent from my Samsung Galaxy S3 using Tapatalk 2
I'm trying to work out this app at the moment, getting everything I want it to do is taking me time.. Getting it perfect
The main ones I want is
After gps is turned on I want it to launch copilot live and radardroid, then dim the screen and turn wifi off..
Also a few other things like bluetooth off after un paired from car, silent mode at night and getting locale hooked up correctly.
Sent from my GT-I9300 using xda premium
ATHOME
Set %ATHOME to 1 (Enter)
Set %ATHOME to 0 (Exit Task).
ATWORK
Set %ATWORK to 1 (Enter)
Set %ATWORK to 0 (Exit Task).
ATFRIENDS
Set %ATFRIENDS to 1 (Enter)
Set %ATFRIENDS to 0 (Exit Task).
ATCOLLEGE
Set %ATCOLLEGE to 1 (Enter).
Sends a HTTPS POST to my College WIFI Login Portal.
Set %ATCOLLEGE to 0 (Exit Task).
USBCHARGE
Set %USBCHARGE to 1 (Enter)
Set %USBCHARGE to 0 (Exit Task).
GOWORK (I have some problems with sleep in morning)
I turn wifi-on and verify if i stay in my home (ATHOME), and play some BAD song util i leave my home... the only way i found to get out of my bed in the morning. As my tasker are password protected, i can't disable it sleeping.
HOMEUSB
Disable pattern lock, put screen dim into max, things like this.
LowBattery
Shutdown all things that can speed my cellphone to get died far from a charger.
NightSleep
AirPlane mode in the night... from Mon to Thu... Fri-Sun i can be in some party...
NFCHOME (Activated by my xperia tag)
Turn on wifi and verify if i'm in the home... and wake up my computer...
Hey guys, there's a thread going with lots of profiles etc, check it out here: http://forum.xda-developers.com/showthread.php?t=1754500
I have one profile used for automatically transfering calls to my car.
Bluetooth will switch on when incoming call and outgoing call. Connect to car Bluetooth. Transfer audio to car. And Bluetooth will switch off after the call.
With this profile, I do not have to worry about switch on Bluetooth and connecting it manually eveytime I enter the car. Everything is done automatically !
Its indeed a great software.
Sent from my GT-I9300 using xda app-developers app
I have one for work that rejects all calls and sends a text, also responds to texts. Both say at work will call later, never sends the text to the same person twice in a row. Also prompts me to turn it off after normal work times. Our don't use location since I'm not always in the same place.
Also, while at work it sends my wife a random text once or twice a day. I can't have my phone at my desk and she used to complain that I never call or text during the day.
Also, face down full silent and the Bluetooth others have mentioned... Oh and low power disables everything but calls and sms.
Sent from my SHV-E210S using xda app-developers app
Ive got a few setup.
When on home wifi..deactivate pin code security, reactivate pin when disconnected (need secure settings plugin)
Same as above when paired with my bluetooth car stereo. Also set display timeout to one hour. Turn wifi off. Launch carhome app.
The usual sleep one. Turn off sync. Wifi. Bluetooth etc. Phone to silent.
Sent from my GT-I9300 using xda premium
I created another profile last night...
When I open maps, navigation or camera (geotag) GPS turns on automatically, then turns off when I exit the app.
Sent from my Samsung Galaxy S3 using Tapatalk 2
Can all of u please share ur profiles as xml files? It would be great to see them for us noobs
i use llama
https://play.google.com/store/apps/details?id=com.kebab.Llama
awesome app and free.
more info on dev homepage --> http://kebabapps.blogspot.ch/
shivark79 said:
Can all of u please share ur profiles as xml files? It would be great to see them for us noobs
Click to expand...
Click to collapse
Here are all mine:
http://db.tt/JtJi6wbB
The 'Night Stand' profile requires an app called 'Night Clock' or a similar app. After a set time, when the screen has been off for 5 minutes and the phone is on charge, it will show the time in big text and stay on for as long as you exit. Very useful for quickly checking the time during the night.
Sent from my sick ass Samsung Galaxy S3
How do you turn bluetooth off after 3 minutes?
CuBz90 said:
I thought it would be a good idea to share your Tasker profiles.
I recently discovered this app and after 3 years of using Android it feels like Android has a whole bunch of extra features.
My profiles are boring really but I'll share anyway.
My first profile puts my phone on silent between 2am and 10am.
My second profile turns off Bluetooth after 3 minutes of being unpaired.
My third and final profile waits until my screen goes off, waits 5 seconds,turns the screen on displays the time on an app called night screen lite (only between 9pm and 11am)
What are your Tasker profiles?
Sent from my Samsung Galaxy S3 using Tapatalk 2
Click to expand...
Click to collapse
If you could export the XML for your second profile to turn bluetooth off after 3 minutes of being unpaired, I'd be really really grateful, or just provide the steps in your reply.
Thanks
1). Pocket Lock - Detects when phone is upside down in my pocket and activates WidgetLocker.
2). Read Caller Aloud - Incoming caller name said aloud so I can decide whether I want to answer without looking at my phone.
3). Night Mode - From 00:00 to 06:00 Puts phone into silent mode, plus checks whether Wifi, Data, GPS, or Blutooth are on, and turns them off if they are.
4). Battery Low - When battery gets to 15%, and it's not connected to a charger, Says "Battery low, connect charger" and turns off Wifi, BT, Data, GPS.
5). Music Player - When headset is plugged in, loads music app.
6). Wake on Lan - Scan an NFC tag by my front door to send Wake on Lan packets to my pc to resume windows.
7). Home - Gets general location from cell tower, activates Wifi, disables Data & GPS. Exit Task disables Wifi, and enables Data.
8). Work - Gets general location from cell tower, disables Wifi, Data, GPS, BT, and Auto Replies to sms that im working and will reply when i can.
I'm pretty new to tasker, but have been pretty bored lately and have been working on an addition to my Work profile.
This profile will, use variables to save up to 5 peoples numbers and how many times each has txted me, and txt each of them back, using their names from my contact list in the body of each txt.
So lets say BOB txts me once, his number will be added as a variable, and it will begin counting the txts from him. On the first txt he is send a txt saying, something like. "Sorry BOB, im at work, will reply when i can".
Then DAVE txts, he will be assigned to Sender2, and have a txt sent to him like above, with the second Counter and Number (%CNTR2 and %SNDR2).
BOB, realizing it's an auto-reply, decides to be funny and spam txt me, thinking he will get a reply every time. However, tasker counts his incoming txts, (%CNTR1) and when it reaches a value of 10, send just one more txt saying something like (Thats 10 txts you've sent, seems Im still unavailable).
Profile: Auto Reply
Variables:
%SNDR1 <---- BOBs cell number
%SNDR2 <---- DAVEs cell number
%SNDR3
%SNDR4
%SNDR5
%CNTR1 <---- BOBs txt counter
%CNTR2
%CNTR3
%CNTR4
%CNTR5
%TXTVAR <---- Counter determining whether a txt received is from someone new or a number already saved.
Enter Task:
Code:
1). GoTo label Sender1 if %SMSRF ~ %SNDR1
2). GoTo label Sender2 if %SMSRF ~ %SNDR2
3). " " etc.
4).......
5).....
6). If (%SNDR1 ~ 0) then SetVariable %SNDR1 to %SMSRF
7). If (%SNDR2 ~ 0) and (%TXTVAR = 1) then SetVariable %SNDR2 to %SMSRF
8). If (%SNDR3 ~ 0) and (%TXTVAR = 2) then SetVariable %SNDR3 to %SMSRF
9)........etc.
10).
11). If (%SMSRF ~ %SNDR1) <-------- Label Sender1
Variable Add (%CNTR1 + 1)
If (%CNTR1 = 1)
Send SMS (Tells this person eg. BOB I'm at work)
Variable Add (%TXTVAR + 1)
Else If (%CNTR1 = 10)
Send SMS to %SNDR1 (Thats 10 txts you've sent me)
Endif x2
12). If (%SMSRF ~ %SNDR2) <-------- Label Sender2
Variable Add (%CNTR2 + 1)
If (%CNTR2 = 1)
Send SMS (Tells this person eg. DAVE I'm at work)
Variable Add (%TXTVAR + 1)
Else If (%CNTR2 = 10)
Send SMS to %SNDR2 (Thats 10 txts you've sent me)
Endif x2
13). If (%SMSRF ~ %SNDR3) <-------- Label Sender3
Variable Add (%CNTR3 + 1)
If (%CNTR3 = 1)
Send SMS (Tells this person eg. EMILY I'm at work)
Variable Add (%TXTVAR + 1)
Else If (%CNTR3 = 10)
Send SMS to %SNDR3 (Thats 10 txts you've sent me)
Endif x2
14). ......Etc.
15). ......
I'm still working on it, deciding whether to have the variables reset as they are all filled, 1 at a time, or to make them reset every hour or so. Also whether to make another profile purely for resetting those variables, or add them to this task. Bearing in mind that on my phone it gets rather annoying to manage/edit the task since its currently at 78 lines long.
As I said I was bored.
If anyone is interested in this I can post a backup xml of this somewhere.
Here are mine:
1. Kill a couple of apps on boot
2. Power Saver – mainly To turn off my WiFi profile
3. Call Brightness – while the phone's ringing, the brightness is maxed.
4. Keyboard Out – disables the display timeout for the time I've got the hardware keyboard out
5. Lost – checks for incoming SMS with one of two predefined phrases. On the first one it starts playing alarm sound (if I forgot where I placed it). On the second one it sends back the GPS coordinates and battery level and puts the same information in my google calendar, so I can see it from anywhere (source tasker wiki. Can't give the link, since I'm new here, sorry. PM me if you can't find it)
6. Sound Control – I hate the thousands chat sounds when I'm texting with someone, but I need them when the phone is not in my hand. So here's what this profile does:
Any time I turn the screen on, the sound volume will be set to 0, and phone will be set to Vibrate.
When I turn the screen off, the sound settings will be restored to their previous values, unless it's currently on MUTE. Then it'll keep it on Vibrate (!) until it's manually raised (in which case it will remember the new volume level). That's cause I never use my phone on "mute" (no sound and no vibration). If I want no sound, I keep the vibration on.
Sound Control Project:
Code:
[b]profile Display On[/b]
Contexts:
event: Display On
state: Not Call Incoming
apps: Not Alarms (or whatever alarm app you use)
Tasks:
Silent Mode: On (if %Mute ~ 1)
Silent Mode: Vibrate (if %Mute !~ 1)
[b]profile Display Off[/b]
event: Display Off
Tasks:
If %SILENT ~ On
Variable Set %Mute to 1
Silent Mode —> Vibrate
Else
Variable Set %Mute to 0
Variable Set %Volnprev to %VOLN (IF %VOLN>0)
Notification Volume —> to level %Volnprev (IF %VOLN~0)
7. WiFi Control – turns on and off WiFi when I'm at home/work.. wherever. The original source is from Tasker Wiki but it wasn't working properly so I did some changes)
Key points:
- It watches the Cell towers only when I'm not connected to wifi.
- It uses Wifi Near to check if I'm near the router ONLY when I'm within the Cell tower range and NOT connected to wifi.
- If I disconnect from wifi it waits a few seconds and checks if I'm connected before continuing.
WiFi Control Project:
Code:
[b]A: Cell Network Home[/b]
Contexts:
Cell Near {Cell towers at home}
Not Airplane Mode
Task:
Profile Status "Wifi Near Home" set to On
End Task:
Profile Status "Wifi Near Home" set to Off
[b]B: Wifi Near Home[/b]
Context:
Wifi Near {my router SSID and MAC}
Task:
Wifi On
End Task:
Wifi Off (IF WIFIC !~ 1)
... repeat A and B for each location, for ex. work
[b]C: Wifi Connected[/b]
Context:
Wifi Connected *,*,* (to any)
Task:
Variable Set %WIFIC to 1
Wait 15s
Stop (IF %WIFIC !~ 1)
Profile Status "Wifi Near Home" set Off
Profile Status "Cell Network Home" set Off
... set also profiles for other locations to Off
End Task:
Variable Set %WIFIC to 0
Wait 30s
Stop (IF %WIFIC ~ 1)
WiFi Off
Wait 3s
Profile Status "Cell Network Home" set On
... set also the cell profiles for other locations to On
I have one that sets usb debugging off at boot and displays permanent notification with usb debug status + theres an action attached to the notification that toggles debugging on/off.
This is to toggle debugging on when I need it and to make sure it's off when I'm not using it. I wouldn't want anyone to easily bypass the lockscreen should my phone fall in the wrong hands.
kaczus said:
I have one that sets usb debugging off at boot and displays permanent notification with usb debug status + theres an action attached to the notification that toggles debugging on/off.
This is to toggle debugging on when I need it and to make sure it's off when I'm not using it. I wouldn't want anyone to easily bypass the lockscreen should my phone fall in the wrong hands.
Click to expand...
Click to collapse
Can you share this tasker profile? Ether a detailed version or even better a copyed xml we can port to our tasker?
Thanks in advance :thumbup:
sent via Tapatalk 2 with my super modded SGS3 which is pimped out with Foxhnd rising v2.5
Set an alarm if my battery is fully charged.
Sent from my GT-I9300 using Tapatalk 2
deanr1977 said:
Can you share this tasker profile? Ether a detailed version or even better a copyed xml we can port to our tasker?
Thanks in advance :thumbup:
sent via Tapatalk 2 with my super modded SGS3 which is pimped out with Foxhnd rising v2.5
Click to expand...
Click to collapse
Sure, here it is.
You need secure settings with "helper" installed for it to work.
This profile uses %USB_DEBUGGING var to store current state of the setting as there is no way to read the actual state from within tasker (as far as I know).
The usb debugging will be turned off at boot, you can change this by changing the "variable set" action in "Start" task to 1.
kaczus said:
Sure, here it is.
You need secure settings with "helper" installed for it to work.
This profile uses %USB_DEBUGGING var to store current state of the setting as there is no way to read the actual state from within tasker (as far as I know).
The usb debugging will be turned off at boot, you can change this by changing the "variable set" action in "Start" task to 1.
Click to expand...
Click to collapse
Cheers mate, stupid question though how do I import this to my tasker? On the old version this was easy.... but struggling to figure this out with the new ui? Thanks mate
sent via Tapatalk 2 with my super modded SGS3 which is pimped out with Foxhnd rising v2.5
deanr1977 said:
Cheers mate, stupid question though how do I import this to my tasker? On the old version this was easy.... but struggling to figure this out with the new ui? Thanks mate
sent via Tapatalk 2 with my super modded SGS3 which is pimped out with Foxhnd rising v2.5
Click to expand...
Click to collapse
To be honest I never tried it before but after some reading I did it this way:
First put the xml file somewhere on your phone, go into your file manager, click on the xml file, a dialog should appear with apps available to open the file - there choose tasker. Do this for all files you want to import.
Now open tasker, open profiles tab and long click on it -> import, choose the imported profile name, "autostart" in this case. Then go to tasks and long click on it -> import, there should be the toggle usb task, exit tasker and restart it. The imported profile and two tasks should all be there. Now when you go to the "Start" task and click the triangle "play" icon (or reboot the phone) the notification should appear
Oh and I didn't notice that tasker did not export one of the tasks required for this to work, don't know why, so I'm attaching it here.
Sorry about the mess.

Problems with app power management and restart

Hi Folks
I have two annoying little problems with my device
first is with the app power management, I have a clock widget on my home screen and the power management
always comes up with the suggestion put the app to sleep, (see pic) but if I do the widget is not working anymore
is there somewhere an option where I can exclude this app from being monitored?
The second problem is with the restart when the phone restarts it doesn't do it completely, I have to put in the pin first
and then it completes the restart process, which is especially annoying when I have it set for auto restart somewhen in the night
and have set an alarm the following morning, which then doesn't go of...
Any Solutions there?
[/COLOR]
hingerl said:
Hi Folks
I have two annoying little problems with my device
first is with the app power management, I have a clock widget on my home screen and the power management
always comes up with the suggestion put the app to sleep, (see pic) but if I do the widget is not working anymore
is there somewhere an option where I can exclude this app from being monitored?
The second problem is with the restart when the phone restarts it doesn't do it completely, I have to put in the pin first
and then it completes the restart process, which is especially annoying when I have it set for auto restart somewhen in the night
and have set an alarm the following morning, which then doesn't go of...
Any Solutions there?
Click to expand...
Click to collapse
The clock app is being killed by android battery management. Go to settings> search: special acces> press optimize battery usage> from the left corner select apps optimized> search for your app and turn off the toggle. That should be it
For your second problem. I've read on another thread that a clock update might have broken the auto restart - alarm problem. I'm not very sure but try to uninstall from settings>apps the updates from the stock clock app. And try again the process
Gogolakis said:
[/COLOR]
The clock app is being killed by android battery management. Go to settings> search: special acces> press optimize battery usage> from the left corner select apps optimized> search for your app and turn off the toggle. That should be it
For your second problem. I've read on another thread that a clock update might have broken the auto restart - alarm problem. I'm not very sure but try to uninstall from settings>apps the updates from the stock clock app. And try again the process
Click to expand...
Click to collapse
Thanks for your help
The first solution does not help because this specific app is, for whatever reason, not on this list...
I might have been a bit confusing with my second problem, it has not directly to do with the auto reboot, but with the boot process itself
the boot process goes only as far as the lock screen, then I have to put in my pin, the fingerprint is not an option, and after that, it says "phone is starting" and finishes the boot,
the same procedure applies after the auto restart... so if I have set an alarm the system isn't ready yet to start the alarm app...

Categories

Resources