Running menu selection from command line - Android Q&A, Help & Troubleshooting

I've been searching for a while now to a solution to my question without any progress...so here goes.
I have an application I use at work for 'paging' but I only receive said pages if I'm 'on duty'. Changing duty status requires an internet connection because that's the way the developers want it... That's fine.. so manipulating the database is out of the question. I can run a macro to do keypresses to change shift status but it's only if I'm not actively using my phone and is sometimes quirky. I want to be able to do that from a command line if possible.. So is this possible? What would I need to execute? I've looked at logs but I'm not an android programmer so I have no clue. I can pin down the log entry that shows me pressing menu selections but I want to do that without any interaction..
so guess what I 'm asking is,
Is this possible?
What do I need to look for?
Thanks, in advance

Related

[Q] Save a number while on call

Hy everyone,
I've tried searching the forums for a solution but no luck..
Is there any way to save a number while having a conversation?
if i select the "keypad" during a call, and write down a number, there isn't a "save to contacts" option or anything similar to that..
i've fiddled around a bit and the only thing remotely similar to what i need is only an option to save a note during the call, but that is absolutely ridiculous, why would i want to save a note and then go and retrieve it.. i just want to save a contact while talking...
I take it that the phone number you want to save to contacts is different to the telephone call you are currently connected to.
Why not, while on a call, press the Home button, then select the Contacts tab, then select New Contact. You can then write the number in the new contact, along with other details.
hey fred_up thanks for the reply!
actually i did thought of that right after i posted the question, but i just think it's sad that we need to perfotm so many actions in order to do such a simple task... one i used to do once without even taking the phone away from my ear... (and no - i'm not complaining about my hd2, i love it despite its little flaws).
A very handy bit of software is called AutoLoudspeaker - if you do a search, you'll find it on this site. As soon as you take the phone away from your ear (ie the screen lights up via the proximity sensors) the phone goes automatically into loudspeaker mode. That'll take one step out of the process.
No doubt some clever clogs will develop some registry edit that means a long press of the Windows button will open up a new contact page.
Yeh i'm aware of that option, and i use it sometimes when at home, doing the coocking or dishes when the GF is out or while playing pc games but it doesnt really meet my needs when i need to remember a nuber for just a second after i hang up..
fred_up said:
No doubt some clever clogs will develop some registry edit that means a long press of the Windows button will open up a new contact page.
Click to expand...
Click to collapse
Now THAT WOULD BE GENIOUSLY AWESOME!
or maybe even a little app, that is called "numbers" for that matter, which can be located on the home tab and when opening it you'll get a numpad and a screen, and would be able to save numbers in a big font, only numbers, nothing else, the numbers will stay on the screen untill you decide to delete them.
unlike the notepad which saves the notes in a file you need to open, and which is not so finger friendly when coming to fast numbering..
food for thought
maybe i'll just forward the idea to a new app request
omricn said:
or maybe even a little app, that is called "numbers" for that matter, which can be located on the home tab and when opening it you'll get a numpad and a screen, and would be able to save numbers in a big font, only numbers, nothing else, the numbers will stay on the screen untill you decide to delete them.
unlike the notepad which saves the notes in a file you need to open, and which is not so finger friendly when coming to fast numbering..
food for thought
maybe i'll just forward the idea to a new app request
Click to expand...
Click to collapse
may be you can put in a quicklink for 'calculator' on home screen..
I have one, but for that matter - you cannot save numbers you type in the calc, they just vanish once the app is closed, and also - i don't like using things for a purpose they were not meant for, it feels a little stupid..
use panaromic calculator, pressing the x only minimises the program

NFC Task Launcher Question

Well, I emailed the developer about this question a couple days ago...still waiting...but just in case some of you high IQ guys know how to do this...
I have a tag that I set up to open up the Navigation app. In Task Launcher, when I select the Navigation app...there is a command below it: CUSTOM...open a specific activity within an app. There are no option in the app itself to change it...but it looks like I need to type what I want launched once the Navigation app is opened.
I want the Map activity to launch...what code do I need to put in there? Looks like there already is a code there...and it looked like it was going to do what I wanted...but it doesn't do anything. (com.google.android.maps.driveabout.app.DestinationActivity)
SiNJiN76 said:
Well, I emailed the developer about this question a couple days ago...still waiting...but just in case some of you high IQ guys know how to do this...
I have a tag that I set up to open up the Navigation app. In Task Launcher, when I select the Navigation app...there is a command below it: CUSTOM...open a specific activity within an app. There are no option in the app itself to change it...but it looks like I need to type what I want launched once the Navigation app is opened.
I want the Map activity to launch...what code do I need to put in there? Looks like there already is a code there...and it looked like it was going to do what I wanted...but it doesn't do anything. (com.google.android.maps.driveabout.app.DestinationActivity)
Click to expand...
Click to collapse
Hey, I'm on vacation but have been answering emails - mostly from my phone. I don't see any that didn't get responses, when did you email?
That custom activity field is for specifying a full package and activity within that package, like you cite at the end of your post. Right now you have to type it out (mainly because this was never intended to be widely used) going forward there are plans to make this more user friendly.
Can you grab the logcat output when you try to launch that activity (enable debugging in the app) and send that? I should be back tomorrow or Wednesday and can get back to proper work.

[Q]Get hardware-key-event while in background

Ever since I got my Droid 3 I wanted to be able to control games using the keypad, but sadly most games won't support it, so I figured, it would be cool if I could make an app that catches all the keyboard events and triggers fake MotionEvents for preset regions of the touchscreen (kindof how it's done on the iControlPad).
I believe I've found a way to fake the touches, but when searching for a way to read keyboard events when my app doesn't have the focus all lead to dead ends.
Does anybody have a clue how I could do that?
If anyone cares: I not only managed to find a way to read out all the touches and keystrokes that should go to other apps (though some android-coworker said it was impossible), but I can also filter which one of those I let through. I can even block the back- and home-buttons. And it's runnable without any running service or activity, so invisible and unkillable. I don't need most of that for my app, so I won't use what I don't need, I just stumbled across it by accident.
Every threat on this topic ended with "It's impossible to read out keystrokes destined to another app, because it would be too much of a security issue." Well, it is possible.
Sent from my XT860 using xda app-developers app
Dakkaron said:
If anyone cares: I not only managed to find a way to read out all the touches and keystrokes that should go to other apps (though some android-coworker said it was impossible), but I can also filter which one of those I let through. I can even block the back- and home-buttons. And it's runnable without any running service or activity, so invisible and unkillable. I don't need most of that for my app, so I won't use what I don't need, I just stumbled across it by accident.
Every threat on this topic ended with "It's impossible to read out keystrokes destined to another app, because it would be too much of a security issue." Well, it is possible.
Sent from my XT860 using xda app-developers app
Click to expand...
Click to collapse
I do care! I would appriciate to hear how this works, because I would need it for my ongoing development.
Besides Camara button, which is of cause easy due to the broadcast event, and the volume keys (which are more tricky, since you have to inject an own BroadcastReceiver to the AudioManager), how do you handle other keys?
Ok, it's been a while since I did this, and I had a lot of work on other projects in between so, I hope I get everything right.
To do the whole trick you need root access.
1) Get the android.permission.SYSTEM_ALERT_WINDOW permission
2) Open up a system alert window with no content. There is a setting somewhere that lets you catch all keystrokes and touches. This blocks them all from going through
3) This one is tricky. I had to analyse nonsense for days to get it right, and I fear it's still not very good. Go to /dev/input on your phone. There are files named event1, event2, ...
Each of those correspond to one input device, so one is your touchscreen, one is the keyboard and so on. What you do now is you perform the action you want to recreate on the phone (e.g. press a key) and monitor the event files through adb (there is a linux command, that I forgot, that lets you view a file in real time. Also you can copy that real time view to your harddrive by typing "adb shell [command] > record.txt").
Once you know every event that you want to recreate, you can go to the next step.
4) This is what your app has to do to let a keystroke through: The user presses a key, your app catches it. Then it changes it's mode (see 2) ) to not catch any keystrokes at all, posts the corresponding event for that key in the fitting /dev/input/eventX-file, and sets itself to catch keystrokes again.
Before the whole thing make sure, your /dev/input/eventX-file has a chmod of 666 or therelike, since you can't write into it from your app. You only need root for that, after that you don't need root. The OS resets the chmod on each reboot.
It is a hell of a lot of work. Calculate about a week or more for just that (at least that was what it took me to figure it all out). Good luck
PS: If you get your app system privileges, there is also the android.permission.INJECT_EVENTS, which allows you to inject key- and touch-events to another app using a simple function (can't remember it, but Google does). For your app to be able to get system privileges you need to copy it to /system/app, which requires root and a mounted /system. Catching the keystrokes still works the same way as above.
Dakkaron said:
Ok, it's been a while since I did this, and I had a lot of work on other projects in between so, I hope I get everything right.
To do the whole trick you need root access.
1) Get the android.permission.SYSTEM_ALERT_WINDOW permission
2) Open up a system alert window with no content. There is a setting somewhere that lets you catch all keystrokes and touches. This blocks them all from going through
3) This one is tricky. I had to analyse nonsense for days to get it right, and I fear it's still not very good. Go to /dev/input on your phone. There are files named event1, event2, ...
Each of those correspond to one input device, so one is your touchscreen, one is the keyboard and so on. What you do now is you perform the action you want to recreate on the phone (e.g. press a key) and monitor the event files through adb (there is a linux command, that I forgot, that lets you view a file in real time. Also you can copy that real time view to your harddrive by typing "adb shell [command] > record.txt").
Once you know every event that you want to recreate, you can go to the next step.
4) This is what your app has to do to let a keystroke through: The user presses a key, your app catches it. Then it changes it's mode (see 2) ) to not catch any keystrokes at all, posts the corresponding event for that key in the fitting /dev/input/eventX-file, and sets itself to catch keystrokes again.
Before the whole thing make sure, your /dev/input/eventX-file has a chmod of 666 or therelike, since you can't write into it from your app. You only need root for that, after that you don't need root. The OS resets the chmod on each reboot.
It is a hell of a lot of work. Calculate about a week or more for just that (at least that was what it took me to figure it all out). Good luck
PS: If you get your app system privileges, there is also the android.permission.INJECT_EVENTS, which allows you to inject key- and touch-events to another app using a simple function (can't remember it, but Google does). For your app to be able to get system privileges you need to copy it to /system/app, which requires root and a mounted /system. Catching the keystrokes still works the same way as above.
Click to expand...
Click to collapse
Thank you for your innovative solution
I do not understand two points:
1. How does your app will stay on top and its windows receives events, when the user opens another app, a game for example.
2. How does the background app, the game, keep running? Isn't the game onPause() when you are running your app in front?
Thanks you.
Dakkaron said:
2) Open up a system alert window with no content. There is a setting somewhere that lets you catch all keystrokes and touches. This blocks them all from going through
Click to expand...
Click to collapse
Can you please try to remember and elaborate " a setting somewhere" part?

[Q] Customizing the drop down bar.

First off, I apologize if this has been covered before in a thread. I spent about a half hour searching for my answer and was not able to either find it or understand which answer I was looking for.
I have in Taiwan a:
S3 GT-I9300
4.1.2
I9300XXELLA
3.0.31-899179
Rooted
No custom rom
(not sure what else you guys need to know)
I was simply curious if someone would point me in the right direction for the following problems. I use reverse tethering quite often with my smart phone as my office does not have WIFI and I enjoy watching sports games on my phone or listening to the radio broadcasts. I have a plan with a 5GB data limit and the video will eat that up pretty fast. So, whenever I use reverse tether, want to check for available wifi, or do any USB/Blue tooth tethering I have to go two or three menues deep into my settings and it's a tad annoying.
Is there a way I can customize the top drop down menu to replace some of the UI icons with ones that I actually want to use such as, "enable usb tether" or "see available wifi signals" or "turn on wifi hotspot?" I could remove Blocking Mode, or AllShare Cast as I never use them.
While I'm able to root phones (easy enough) I'm pretty clueless about custom Roms, how to use them, which ones are good, how to keep my phone protected when using them etc. There is such a huge amount of information about customizing the S3 on these forums, I just didn't know how to wade through it all to get the one customization that I want.
Again, sorry if I couldn't find the threat where this was discussed, and if there is a thread that answers this question well, I would appreciate someone pointing me in the right direction.
Cheers!
Not 100% sure, but maybe have a look into JKay Delux (you have to find the version for your firmware though). Otherwise another option could be to create a shortcut for your home screen via tasker that brings you directly into that menu.
chrismast said:
Not 100% sure, but maybe have a look into JKay Delux (you have to find the version for your firmware though). Otherwise another option could be to create a shortcut for your home screen via tasker that brings you directly into that menu.
Click to expand...
Click to collapse
Does tasker allow you to create shortcuts for any phone command? If so, that might be what I need.
Drschplatt said:
Does tasker allow you to create shortcuts for any phone command? If so, that might be what I need.
Click to expand...
Click to collapse
if I am not wrong, most of them yes. At least it lets you control most of the functions (if you add Secure Settings PlugIn even more.)

Navigation voice command

Hello everyone,
I hope someone can help me with this.
I am trying to automate my phone by using voice commands,state executions etc.
Tasker is one of the app I really like and hope to get some good understanding of it in order to make my phone more efficient.
Right now I'd like to know if there's a way to use the navigation system through the voice command and also set it to either use or not use motorways.
According to google, to use the navigation system I have to use the word "navigate to... location".
By doing this, a page, showing time and distance, comes up but then I have to click on it in order to proceed
However I tried "navigate to 'location' avoid motorway" and this doesn't work.
How can I achieve this?
Are there ways to go through apps functions using voice commands?
Is it there a better voice command alternative than google now?(i heard of autovoice and utter, what's your opinion?)
Thank you in advance

Categories

Resources