Here's what I have currently.
Created a gscript using:
Code:
am start -a android.intent.action.MAIN -n com.android.settings/.wifi.WifiSettings
sleep 1
#toggle wifi
input keyevent 20
input keyevent 23
input keyevent 4
input keyevent 4
input keyevent 4
[CODE]
Mapped the script to the quick key.
Now this is what I figured out from a quick search and it works for me temporarily.
There has to be a quicker, easier way. If someone knows how and could please chime in, I would appreciate it and u would be saving me some time searching :)
Thanks and Goodluck.
Sent from my T-Mobile G2 using XDA App
Inb4 "power strip widget"
On topic, that's a very nifty work-around for mapping it to the quick keys. Hell, mine aren't even configured yet.
Sent from my T-Mobile G2 using XDA App
Thanks...I'm feeling a lil lazy right now. Ill search more later, then after this I'm attacking the flight light LED whatever it is, for my other quickkey.
Unless I can figure out an ez way to add the widget to the lock screen for quick access...wasn't there an app or something for that? Owell that's for later.
Sent from my T-Mobile G2 using XDA App
Related
This may be a stupid question but how do i enable Swype. I've tried all ways but i can't get it to work.
I've done the tutorial but i still can't get it to work!!!
Sent from my GT-I9000 using XDA App
Press and hold down on the area where you want to enter the text. Select input method -> Swype.
Thanks for that, I wouldn't have found that in a month of Sundays!
Why isn't Swipe in the normal input selection.
I use Anycut to create shortcuts but am unable to figure out how to create a shortcut that puts the phone in vibrate mode. I currently use the # key on the dial pad.
Also, I know this may be simple but please take it easy on me as this is my first post to any board of this type even though I study them frequently.
Have a updated to J5 (through Kies) galaxy s vibrant.
Thanks
There are several apps in the market that that enable this via widget. Just tried ' silent toggle widget' and it works fine.
Sent from my SGH-T959 using XDA App
I recently updated to DJ05 with both Super Clean .9 and Stupid Fast (Whatever the newest is.) A day later,everything is working fine except when I try to longpress to move a shortcut or widget. I receive a small vibration but no ability to move. I'm using Adwlauncher, as well.
Does anyone know what could cause this?
Sent from my SCH-I500 using XDA App
I have noticed the new adw launcher has an option to lock the desk top. If u press the menu soft key it may say unlock desk top. Just something to try sounds like it may be the cause
Sent from my SCH-I500 using XDA App
The latest ADW version kills long press. No idea why, it just does. Switch to LP or Touchwiz and you get the button back. Shortcut apps from the market have no effect. It caused me to buy LP+ and I regret not doing it sooner.
Lastly, this should be in general, not development.
ya if u mean voice search via long press of the search key it is messed up. However there is a work around for this as well. Double press the search key first to open the search then long press it to get to voice search. However in your original post it sounds more like the desktop is locked to me just unlock it and should be good
Sent from my SCH-I500 using XDA App
The desktop was indeed locked. Thank you guys.
Sent from my SCH-I500 using XDA App
Hi,
I recently got fed up with forgetting to power off my nook. So I figured out I could use Tasker to shut it down at night when it is idle, etc., but I while I was testing it I realized that when my Nook is shut down, it shows the last state of the screen before having been shut down. It is quite annoying, especially that I cannot find a workaround, since Tasker cannot unlock the locked screen.
So, my question is, that does somebody know whether there is a shell command to power off the Nook like when you press the power off button?
Or any other suggestions would also be great.
In my experience letting the nook go into standby for 8-12 hours before using it again uses less battery than shutting down completely and rebooting it.
OB
Sent from my SPH-D710VMUB using Tapatalk 2
I use Quick Boot v4.2, Plus version which has an additional command useful for phones: Hot Boot. Free version is good enough for NST:
http://play.google.com/store/apps/details?id=com.siriusapplications.quickboot
I use a WiFi shutdown timer on my phone though, as sleep function on shoutcast radio.
P.S. As mentioned before in my apps listings thread for standby & screen blanking I use Screen Off FX:
http://play.google.com/store/apps/details?id=jp.co.kixx.tool.offwidget
Well, maybe I wasn't making myself clear enough. The most important part here is automation. So while screen off fx is awesome, I can't really use it in this situation since my screen is already locked when I want to turn my Nook off.
The thing I am searching for is a command or an app that could shut down my Nook (even when my screen is locked) in a way that it shows the usual "Your Nook has turned off completely" picture. (Every app that I tried has made the Nook show the screen that is has shown before having been shut down.) And I would like to do all of that automated, probably with Tasker.
Sagittarius0 said:
Well, maybe I wasn't making myself clear enough. The most important part here is automation. So while screen off fx is awesome, I can't really use it in this situation since my screen is already locked when I want to turn my Nook off.
Click to expand...
Click to collapse
The way I would do it is unlock the screen, overlay an image of whatever you want to be shown using a scene, and then shutdown.
To unlock the screen, try Simulating the "n" button command with tasker to unlock the screen before shutting down. (assuming slide to unlock is disabled):
Procedure for simulating button:
In your Tasker task, Create a new Run Shell Action. (Found in the "Script" category)
In the command section, put the following:
Code:
sendevent /dev/input/event1 1 102 1
sendevent /dev/input/event1 0 0 0
sendevent /dev/input/event1 1 102 0
sendevent /dev/input/event1 0 0 0
This will send a press and a release event of the n button.
Check the Use Root Option.
NOTE: If this is the first time you've used root with tasker, the root confirmation dialog will appear. Make sure to check the always allow option so that it doesn't pop up again.
Just For Reference:
If you would want to use other buttons do the following:
Replace 102 with:
Power Button: 116
Replace event1 with event0 AND 102 with:
Top Left Page Button: 412
Bottom Left Page Button: 139
Top Right Page Button: 407
Bottom Right Page Button: 158
Good Luck!
Absolutely woderful!
This is exactly how I wanted to do it. :victory:
It works perfectly, thank you very much.
Pushing stuff into /dev/input is lower level than it need be.
You'll be working with scan codes there.
In a shell this sends a press of the power button (using a KEYCODE)
Code:
input keyevent 26
Shutdown is easy enough (with one small hitch).
Simply send a android.intent.action.ACTION_REQUEST_SHUTDOWN
The problem is that this is a privileged intent and can only be sent by system apps.
System apps are those that have the system signature.
You can do that by re-signing your system.
You need to have android.permission.SHUTDOWN in the manifest.
You can do that by re-signing your system.
Click to expand...
Click to collapse
Well, how can I do that?
And does this command you mentioned have the same efect as reboot -p?
Sagittarius0 said:
Absolutely woderful!
This is exactly how I wanted to do it. :victory:
It works perfectly, thank you very much.
Click to expand...
Click to collapse
Glad I could help! :good:
Renate NST said:
Pushing stuff into /dev/input is lower level than it need be.
You'll be working with scan codes there.
In a shell this sends a press of the power button (using a KEYCODE)
Code:
input keyevent 26
Click to expand...
Click to collapse
Ok, good to know. I just went for the scan codes because I knew how to quickly get them from shell getevents.
Sagittarius0 said:
Well, how can I do that?
And does this command you mentioned have the same efect as reboot -p?
Click to expand...
Click to collapse
If all your looking for is to do a shutdown or reboot, and are already using a Tasker task, the action Misc > Reboot has the ability to shutdown or do a reboot. My guess is that it does exactly what Renate NST is telling you to do - send a shutdown intent - behind the scenes. Granted, I don't know, and I don't have Tasker installed on my nook so I can't confirm that it will actually work, I have just used Tasker on other devices and it seems to work fine.
Just seems like the easiest, cleanest way would be to keep all the actions under one roof.
cuff21 said:
I don't have Tasker installed on my nook so I can't confirm that it will actually work
Click to expand...
Click to collapse
It does work seamlessly.
cuff21 said:
My guess is that it does exactly what Renate NST is telling you to do - send a shutdown intent - behind the scenes.
Click to expand...
Click to collapse
Hmm, I don't know. A regular root and su won't work.
You'd either have to have a system-signed app or hack the permission system.
There is no clear info on the difference between an Android shutdown and a Linux shutdown.
Given the choice, I'd go for the Android shutdown.
Renate NST said:
Hmm, I don't know. A regular root and su won't work.
You'd either have to have a system-signed app or hack the permission system.
Click to expand...
Click to collapse
Well I had a stack overflow link that shows a way to do it, but I can't post links yet. Either way, apparently there is a way with only root. The code from the link was:
Code:
try {
Process proc = Runtime.getRuntime()
.exec(new String[]{ "su", "-c", "reboot -p" });
proc.waitFor();
} catch (Exception ex) {
ex.printStackTrace();
}
On my Pixel XL, the screen turns on as soon as I lift the phone and I can just swipe to unlock. On the OP5, it requires you to double tap the screen before you can unlock. The lift-to-wake part works fine and I get that they did it this way to prevent accidental unlocks in your pocket, but the proximity sensor can do that anyway.
I prefer the way it used to work, the way the Pixel works. I have never had a problem with my phone waking in my pocket. Is there any way to get it back to where it will unlock with a swipe after you lift it up? It would be nice if it was at least an option you could toggle. I can see why some people would prefer it this way to prevent accidental pocket unlocks.
Use Tasker. Make a Gesture event context. Your task only needs one action, Run Shell:
input keyevent 6
Make sure Use Root is checked and an the following condition:
If %SCREEN ~ off
Sent from my SM-G955F using Tapatalk
RuggedHunter said:
Use Tasker. Make a Gesture event context. Your task only needs one action, Run Shell:
input keyevent 6
Make sure Use Root is checked and an the following condition:
If %SCREEN ~ off
Sent from my SM-G955F using Tapatalk
Click to expand...
Click to collapse
I'm trying this out now. Thanks for the tips here. How are you getting Tasker to recognize root? Mine is not prompting me. I'm using Magisk.
xgerryx said:
I'm trying this out now. Thanks for the tips here. How are you getting Tasker to recognize root? Mine is not prompting me. I'm using Magisk.
Click to expand...
Click to collapse
Uncheck Use Root and change the Run Shell like this:
su
input keyevent 6
Or you can install the supersu apk.... even though you don't use it tasker will see that you're rooted.
Sent from my SM-G955F using Tapatalk
RuggedHunter said:
Uncheck Use Root and change the Run Shell like this:
su
input keyevent 6
Or you can install the supersu apk.... even though you don't use it tasker will see that you're rooted.
Sent from my SM-G955F using Tapatalk
Click to expand...
Click to collapse
Something still isn't working it seems. Do I need to create a gesture event and record the lifting of the phone? The screen off IF function is red also. I dunno, maybe a little over my head. Tasker always kinda confused me.
xgerryx said:
Something still isn't working it seems. Do I need to create a gesture event and record the lifting of the phone? The screen off IF function is red also. I dunno, maybe a little over my head. Tasker always kinda confused me.
Click to expand...
Click to collapse
Yes, exactly. When creating the gesture, lay your phone on a flat surface. Longpress a volume key to start recording and immediately pick your phone up, then longpress volume again to stop recording. Make the gesture. Then link it to a task containing a Run Shell action with this code:
su
input keyevent 6
You should also go to Tasker Preferences > Monitor tab > Accelerometer > Yes
Edit: Also, your If condition is checking if the screen is off.... so it should be red any time you look at it in tasker, since obviously the screen is on while you're looking at it.
Sent from my SM-G955F using Tapatalk
RuggedHunter said:
Yes, exactly. When creating the gesture, lay your phone on a flat surface. Longpress a volume key to start recording and immediately pick your phone up, then longpress volume again to stop recording. Make the gesture. Then link it to a task containing a Run Shell action with this code:
su
input keyevent 6
You should also go to Tasker Preferences > Monitor tab > Accelerometer > Yes
Edit: Also, your If condition is checking if the screen is off.... so it should be red any time you look at it in tasker, since obviously the screen is on while you're looking at it.
Sent from my SM-G955F using Tapatalk
Click to expand...
Click to collapse
I think I have it all correct now but this red bar next to the linked task seems to be causing no profile to be active. Or root still is not working.
Looks perfect. Check the Run long and see of the profile is firing.
Sent from my SM-G955F using Tapatalk