[tasker] clear recent apps command - Galaxy Note GT-N7000 Q&A, Help & Troubleshooting

Hi all,
I would like to add a button on my home screen in order to clear all recent apps without having to long press on the home button and so on.
Is there any command or variable on tasker to make this possible?
Thx for helping
Envoyé avec ma brique Galaxy Note.

Advanced Task Killer (in playstore).
And then place the widget on home screen.
One-click-kill.

I just want to clear recent apps not kill all tasks! I already have greenify.
Envoyé avec ma brique Galaxy Note.

bump. i need that too...

A little help from someone?
Envoyé avec ma brique Galaxy Note.

pakman023 said:
I would like to add a button on my home screen in order to clear all recent apps without having to long press on the home button and so on.
Is there any command or variable on tasker to make this possible?
Click to expand...
Click to collapse
I would like to have something like that as well to call it from Llama, so it should be either a simple application that clears all recent apps on start without asking or an intent that can be called by LLama.

Thx!
Envoyé avec ma brique Galaxy Note.

newest lbe ha a toggle for that, 360 launcher as well. when using both ram is quickly cleared.
Given androids ram optimalization its also quickly filled again lol.
Sent from my GT-N7000 using Tapatalk 2

Looking for a similar solution I ended up just using sendevent commands to simulate long pressing the home button & input tap
sendevent /dev/input/event16 1 172 1
sendevent /dev/input/event16 0 0 0
sleep 1
sendevent /dev/input/event16 1 172 0
sendevent /dev/input/event16 0 0 0
input tap 900 1850
Works great on my S4 but you may need to enable pointer in developer options & modify the tap x y. Similarly I also wanted to clear my ram & app cache & ended up putting it all together in 2 tasks that perform either with shake events(etcha sketch?)

okninja said:
(etcha sketch?)
Click to expand...
Click to collapse
oooh yeah!!!! nice touch

Install xposed framework and then Gravity Box will give you the option on a nexus 5. Couldn't find the option on Tasker either.

Is this configured under "Shell Script"?
okninja said:
Looking for a similar solution I ended up just using sendevent commands to simulate long pressing the home button & input tap
sendevent /dev/input/event16 1 172 1
sendevent /dev/input/event16 0 0 0
sleep 1
sendevent /dev/input/event16 1 172 0
sendevent /dev/input/event16 0 0 0
input tap 900 1850
Works great on my S4 but you may need to enable pointer in developer options & modify the tap x y. Similarly I also wanted to clear my ram & app cache & ended up putting it all together in 2 tasks that perform either with shake events(etcha sketch?)
Click to expand...
Click to collapse

okninja said:
Looking for a similar solution I ended up just using sendevent commands to simulate long pressing the home button & input tap
sendevent /dev/input/event16 1 172 1
sendevent /dev/input/event16 0 0 0
sleep 1
sendevent /dev/input/event16 1 172 0
sendevent /dev/input/event16 0 0 0
input tap 900 1850
Works great on my S4 but you may need to enable pointer in developer options & modify the tap x y. Similarly I also wanted to clear my ram & app cache & ended up putting it all together in 2 tasks that perform either with shake events(etcha sketch?)
Click to expand...
Click to collapse
Could you explain how you did this?
I've spent the last hour trying to get it done on my AT&T Galaxy S4 running GPE 4.4 ROM and can't get it to work.
Thanks!

Extra help
Hi, I'm new to forums and Tasker. Could you please explain step-by-step how you created this please? Your method seems to be the only one on the internet.... and its beyond my knowledge of Tasker.
Thanks
okninja said:
Looking for a similar solution I ended up just using sendevent commands to simulate long pressing the home button & input tap
sendevent /dev/input/event16 1 172 1
sendevent /dev/input/event16 0 0 0
sleep 1
sendevent /dev/input/event16 1 172 0
sendevent /dev/input/event16 0 0 0
input tap 900 1850
Works great on my S4 but you may need to enable pointer in developer options & modify the tap x y. Similarly I also wanted to clear my ram & app cache & ended up putting it all together in 2 tasks that perform either with shake events(etcha sketch?)
Click to expand...
Click to collapse

Storm85 said:
Hi, I'm new to forums and Tasker. Could you please explain step-by-step how you created this please? Your method seems to be the only one on the internet.... and its beyond my knowledge of Tasker.
Thanks
Click to expand...
Click to collapse
Hi guys landed here because I searched for this problem ....
I came up with a solution myself since the method described here is different for every device I think this should work for most
Open tasker -->new task--> script ---> run shell --> and paste this in the command line :
input keyevent APP_SWITCH
input tap 2150 1540
these numbers "2150 1540 " are for my note 10.1 2014 edition ... these are coordinates which set the location for the simulated touch tap ...
you can get your x y coordinates by enabling show cursor position in develepor options
this command does open the recent apps menu
and presses the close all all apps button
greetings
Medy89

Medy89 said:
Hi guys landed here because I searched for this problem ....
I came up with a solution myself since the method described here is different for every device I think this should work for most
Open tasker -->new task--> script ---> run shell --> and paste this in the command line :
input keyevent APP_SWITCH
input tap 2150 1540
these numbers "2150 1540 " are for my note 10.1 2014 edition ... these are coordinates which set the location for the simulated touch tap ...
you can get your x y coordinates by enabling show cursor position in develepor options
this command does open the recent apps menu
and presses the close all all apps button
greetings
Medy89
Click to expand...
Click to collapse
Thanks for this. However it isn’t working. I have a Galaxy Note 3 and assuming it’s the Xv: and Yv co ordinates I have 0.073 and 0.263.
But when I enter
input keyevent APP_SWITCH
input tap 0.073 0.263
It doesn’t work and the task seems to take a while to stop running.
What am I doing wrong?
If I do
new task--> script ---> run shell --> input keyevent APP_SWITCH
and click run should it open up the recent apps list? Because it doesn’t.
Thanks,

Storm85 said:
Thanks for this. However it isn’t working. I have a Galaxy Note 3 and assuming it’s the Xv: and Yv co ordinates I have 0.073 and 0.263.
But when I enter
input keyevent APP_SWITCH
input tap 0.073 0.263
It doesn’t work and the task seems to take a while to stop running.
What am I doing wrong?
If I do
new task--> script ---> run shell --> input keyevent APP_SWITCH
and click run should it open up the recent apps list? Because it doesn’t.
Thanks,
Click to expand...
Click to collapse
From what I understand, note 10.1 2014 still running on Android 4.3 but Note 3 already in 4.4.2, I guess Kitkat might have change this.

Storm85 said:
Thanks for this. However it isn’t working. I have a Galaxy Note 3 and assuming it’s the Xv: and Yv co ordinates I have 0.073 and 0.263.
But when I enter
input keyevent APP_SWITCH
input tap 0.073 0.263
It doesn’t work and the task seems to take a while to stop running.
What am I doing wrong?
If I do
new task--> script ---> run shell --> input keyevent APP_SWITCH
and click run should it open up the recent apps list? Because it doesn’t.
Thanks,
Click to expand...
Click to collapse
just take the X and Y not Xv Yv
there schouldnt be points and commas
ill check if input keyevent APP_SWITCH works on kitkat
meanwhile try
input keyevent KEYCODE_APP_SWITCH
look again
btw im doing a tasker series on youtube ill probably do a vid about this some time
check out my channel^^
First vid :
https://www.youtube.com/watch?v=KYADIOL_LPE&feature=youtu.be

Medy89 said:
just take the X and Y not Xv Yv
there schouldnt be points and commas
ill check if input keyevent APP_SWITCH works on kitkat
meanwhile try
input keyevent KEYCODE_APP_SWITCH
look again
btw im doing a tasker series on youtube ill probably do a vid about this some time
check out my channel^^
First vid :
https://www.youtube.com/watch?v=KYADIOL_LPE&feature=youtu.be
Click to expand...
Click to collapse
i have android kitkat..
i couldnt call input keyevent KEYCODE_APP_SWITCH
nothing happen..somebody help

bdkbaik said:
i have android kitkat..
i couldnt call input keyevent KEYCODE_APP_SWITCH
nothing happen..somebody help
Click to expand...
Click to collapse
it works on kitkat ... just tried it ... u need ROOT

Related

Is Copy / Paste available with hardware keyboard buttons ?

Someone tried to use some of the special hardware keyboardbuttons in the lower left corner of the keyboard to copy / paste ?
Can one of the keys used as a STRG key in combination with C and V when entering text ?
Greets !
bump
Im interested in this as well, anyone have any ideas?
this is windows, use ctrl+c and ctrl+v
you can set the key to open a context menu, then choose cut/copy/paste
this is windows, use ctrl+c and ctrl+v
Click to expand...
Click to collapse
That is the point, how do we get a "ctrl"-key assigned? The "strg"-key fotoingo mentioned is the German "ctrl"-key. Any suggestions?
i dont think CTRL + C works?
Nocturnal310 said:
i dont think CTRL + C works?
Click to expand...
Click to collapse
on the onscreen qwerty works perfect.
Yes, CTRL+C/V/X works with hardware keyboard. All you need is a software to map some of the key on your HW keyboard to CTRL function. I would recommend X1BC (use search on this forum)
Is it possible to set the Fn key + C / V / X to copy / paste / cut?
with AE Button plus you can set it up. eg you can map that weird au button so that single click = cut, double click = copy, and triple click = paste. Lots of other ways you can do it too, using other keys on the hard keyboard.
ring-bearer said:
with AE Button plus you can set it up. eg you can map that weird au button so that single click = cut, double click = copy, and triple click = paste. Lots of other ways you can do it too, using other keys on the hard keyboard.
Click to expand...
Click to collapse
That's exactly how I use it, works great!
Also would the original poster care to take this solution and edit his first post with it. It's harder for others to scroll than to edit your first post.
Thanks
X1BC will help you, i tested it and worked fine!
Software url:
http://forum.xda-developers.com/showthread.php?t=468007&highlight=X1BC
Step:
1. Install X1BC
2. Change the registry:
"LongKeyTimeout" = 2000
"TabCtrlMode" = 2
3. Put X1BC.lnk into the startup folder, restart your X1
Tab + A (Select All)
Tab + Z (Undo)
Tab + X (Cut)
Tab + C (Copy)
Tab + V (Paste)
-------------------------
HKCU\SOFTWARE\JKing\X1BC\TabCtrlMode
Here are the possible choices:
0 - Do not use as ctrl
1 - Short press mode (short press to enable ctrl then press a letter; long press sends tab chr)
2 - Long press mode (press letter while holding ctrl; short press sends tab chr)
Is'nt it easier to use the natural keyboard and use <shift> & the cursor keys to select your text that you want to cut/copy, then use the on-screen keyboard to select <ctrl> & c (copy), x (cut) or p (paste)?

Atrix 4g Screen Shot With Adjustable Self-Timer! [11 May 2013]

JB/ICS ROMs allow you to take a screenshot by long-pressing the Power and Volume Down simultaneously. But you may get unwanted screen artifacts or other strange behavior if you don’t press them exactly at the same time.
But my new Atrix4g Screen Shot (A4G SS) tool overcomes by invoking virtual key presses for Power and Volume Down using the “sendevent” command. Basically it’s remote control.
And it has a self-timer with adjustable delay. So among other things, you can run it with your built-in camera to take family/group portraits --- though the camera buttons will show .
Flashable zip (0.2 MB): http://www.mediafire.com/?18h1bzqcca3g15u
A4GG SS is tested working on CM10 SuperLite. I was going to try it on other JB/ICS ROMs but I ran out of time.
There are many ways to launch A4G SS. Examples:
Root Explorer (very simple once you set home directory to /system/bin)
Script Manager (not as simple at first, but easily configurable and settings are retained)
Terminal Emulator (not as simple but geeky)
ADB (remote operation)
Instructions on how to configure A4GG with Script Manager are given further below.
Key legends reside in the /system/usr/keylayout directory. Those of interest here are documented in my A4GG SS launch code:
Code:
#!/system/bin/sh
echo
echo "Atrix4g Screen Shot With Self-Timer!"
echo "Usage: sh a4g-screencap.sh [timer delay (sec)]"
echo "Default delay: 10 sec"
echo
echo "Initial Release: 11 May 2013"
echo "sendust7 @ xda developers"
#Atrix4g key map legends (decimal):
#/dev/input/event0
#key 107 POWER WAKE
#key 26 POWER WAKE
#key 226 HEADSETHOOK WAKE
#/dev/input/event1
#key 102 HOME WAKE
#key 139 MENU WAKE_DROPPED
#key 158 BACK WAKE_DROPPED
#key 211 FOCUS
#key 212 CAMERA
#key 115 VOLUME_UP WAKE
#key 114 VOLUME_DOWN WAKE
#key 217 SEARCH WAKE_DROPPED
echo
if grep -qs $EXTERNAL_STORAGE /proc/mounts; then
echo "$EXTERNAL_STORAGE mounted"
elif grep -qs $SECONDARY_STORAGE /proc/mounts; then
echo "$SECONDARY_STORAGE mounted"
else
echo "Phone storage not mounted. Exiting..."
exit 1
fi
echo
if [ $# -eq 0 ]; then
echo "Taking screen shot in 10 seconds..."
sleep 10
else
echo "Taking screen shot in $1 seconds..."
sleep $1
fi
#Long press POWER and VOL Down simultaneously
/system/bin/sendevent /dev/input/event0 1 107 1
/system/bin/sendevent /dev/input/event1 1 114 1
sleep 2
#Release POWER and VOL Down simultaneously
/system/bin/sendevent /dev/input/event0 1 107 0
/system/bin/sendevent /dev/input/event1 1 114 0
echo
echo "Done! Can exit now..."
exit 0
Instructions
Simply flash zip, reboot and optionally install/configure Script Manager (SManager): Go to Settings > Advanced > Configuration > Home directory. Navigate to /system/bin and “Select this directory” at bottom.
SManager: https://play.google.com/store/apps/details?id=os.tools.scriptmanager&hl=en
Make sure USB storage is turned off to save your screenshot. A4G SS includes logic to exit unless internal storage, external storage or both are mounted.
Then re-launch SManager, navigate to “/system/bin/atrix4g-ss-v1.0.sh” and tap:
Code:
“Su” (run as root --- setting is retained for later)
“Run”
“Home” (navigate to screen of interest)
Wait for the timeout. A message: “Saving screenshot” will appear at top. To view your screenshot, simply drag the pull down menu, tap the “Screenshot captured” bar and complete the action.
After screenshot, A4G SS exits gracefully. To re-launch from SManager, tap HOME > “Run Again”. To exit, tap the Back button on your Atrix.
If you want to change the default 10-second timeout, simply enter a different (positive) number in SManager’s argument box and re-launch. This setting is also retained.
Things go pretty fast after initial setup.
I understand many screenshot apps are available, and Screenshot UX is my favorite. But the trial version expires after 14 rounds  --- not because I don’t like to pay for a good app. I just don’t like Google having my credit card number.
My A4G SS tool is free, and the maximum allowable number of screenshots is limited only by available storage
You can also run A4G SS from ADB-enabled remote device:
adb shell /system/bin/atrix4g-ss-v1.0.sh [N]
where N = delay time (sec).
This is how I took demo shots of A4G SS in action I just set N=0 for an instant shot.
And you can spin your Atrix beauty into an efficient "still-moving" security cam using a delayed while loop and camera ON/shoot/OFF commands at fixed intervals. Something like this…
Code:
#Wait two hours
sleep 7200
#Start monitoring
while :
do
/system/bin/sendevent /dev/input/event1 1 212 1
sleep 2
#Long press POWER and VOL Down simultaneously
/system/bin/sendevent /dev/input/event0 1 107 1
/system/bin/sendevent /dev/input/event1 1 114 1
sleep 2
#Release POWER and VOL Down simultaneously
/system/bin/sendevent /dev/input/event0 1 107 0
/system/bin/sendevent /dev/input/event1 1 114 0
sleep 2
/system/bin/sendevent /dev/input/event1 1 158 0
#Wait 5 minutes until next picture
sleep 300
done
The companion “getevent” command is also very useful. For example it helps you learn the various key legends or to capture a time stamped history of sendevent commands.
Code:
Usage: getevent [-t] [-n] [-s switchmask] [-S] [-v [mask]] [-d] [-p] [-i] [-l] [-q] [-c count] [-r] [device]
-t: show time stamps
-n: don't print newlines
-s: print switch states for given bits
-S: print all switch states
-v: verbosity mask (errs=1, dev=2, name=4, info=8, vers=16, pos. events=32, props=64)
-d: show HID descriptor, if available
-p: show possible events (errs, dev, name, pos. events)
-i: show all device info and possible events
-l: label event types and names in plain text
-q: quiet (clear verbosity mask)
-c: print given number of events then exit
-r: print rate events are received
1|[email protected]:/ #
Screenshots
Blessings... Enjoy!
Disclaimer: Standard disclaimers apply.
References:
http://android.stackexchange.com/questions/26261/documentation-for-adb-shell-getevent-sendevent
http://source.android.com/tech/input/getevent.html
http://fangmobile.com/2012/11/06/an...lick-on-screen-for-ics-and-may-be-jelly-bean/
https://groups.google.com/forum/?fromgroups=#!topic/android-beginners/il2PqSKRFNI
1st
Thanks for this useful app
I will try it soon

How to use tasker to open up the power menu?

I'm installing a nexus 7 (2013) into the dash of my car. I'd like to have a widget on my home screen to pull up the original power menu. I've been told there is a way to do it with tasker and running a shell script. If anyone could help me it would be greatly appreciated.
You can use AutoInput plugin, it can do what you ask for. Just create an action, select the AutoInput plugin, and: Plugin > AutoInput > Global Action > Power Dialog.
Another way by you can do that and also will be more customizable (you could add or remove power actions by default) is taking first a screenshot of the powermenu pop-up, then edit it on any image editor like: Photoshop, GIMP. . . And at last take the edited image into the phone again, and use this modified screenshot as your powermenu pop-up with a scene.
This is what I did on one of my anti-theft tasks, and I'm happy with my custom power menu dialog
sendevent /dev/input/event5 1 116 1
sendevent /dev/input/event5 0 0 0
usleep 500000
sendevent /dev/input/event5 1 116 0
sendevent /dev/input/event5 0 0 0
to be run in a shell-task, root
'ks123', the code you provided us is generic. Will be necessary to adjust it to our device.
You're right
it should be .../event2 on the Nexus ...
More info:
http://stackoverflow.com/questions/26204766/simulating-combination-of-key-presses-from-adb-terminal

NFC, plugin auto input mistake...really easy question...

I'm trying to get auto input upon NFC event to click the start command on the wo mic app menu of (wo mic app). The options for what to click are just "start, settings, mute, drop down menu".
1. event: nfc tag
2. task edit:
1. launch app
(app wo mic)
2. wait
1 seconds
3. autoinput action
configuration type: text value: start action: click...x,y coordinates
text: "start"
I've done this via easy setup and it seems to have gotten everything correct, will launch app but not select "start"
its frustrating, shouldn't I have that "wait"command?
Well, the way I see it, either the coordinates are wrong (and the Start button doesn't get clicked) or you need a longer wait.
tried that, any other ideas?
also cant upload pictures yet so thats a big limit on this

volume Buttons

My phone is Android 9 and no root.
In my task I want to simulate the pression of volume buttons ( up or down is the same). I can't figure how to do.
The activity: input > buttons > volume up/down gives me error
Taaaak....
That is a root specific one. In order to do what you want you need to select input >keyboard >the key you want. & ignore the key modifier screen.
Screenshot below
Cheers
place name here- said:
That is a root specific one. In order to do what you want you need to select input >keyboard >the key you want. & ignore the key modifier screen.
Screenshot below
Cheers
Click to expand...
Click to collapse
That works... Good
Taaaak....

Categories

Resources