tag:blogger.com,1999:blog-8214401912480503366.post2374824735847096056..comments2023-08-10T13:35:15.093+02:00Comments on My life with Android :-): Generating keypresses programmaticallyGabor Pallerhttp://www.blogger.com/profile/14307475522972458932noreply@blogger.comBlogger22125tag:blogger.com,1999:blog-8214401912480503366.post-6502982775911763252014-06-16T08:52:27.684+02:002014-06-16T08:52:27.684+02:00Hi,
I need help in keying "video call"....Hi,<br /><br />I need help in keying "video call"..Divakar Papershttps://www.blogger.com/profile/04469090517406799563noreply@blogger.comtag:blogger.com,1999:blog-8214401912480503366.post-73985158754460567702014-05-14T13:39:51.581+02:002014-05-14T13:39:51.581+02:00import android.os.ServiceManager;
The library can...import android.os.ServiceManager;<br /><br />The library cannot be found.This is showing error. Please tell me to solve this errorAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-8214401912480503366.post-50827572700197105032011-08-08T12:08:26.853+02:002011-08-08T12:08:26.853+02:00Hi. SOme comments here stte that it is possible to...Hi. SOme comments here stte that it is possible to inject events to another application's window. I that true?<br />I used the example provided here to build my version that sends the event after a while to give me the time to switch to another applicatio.<br />By using both methods (with and without Inst) I get an error at runtime.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8214401912480503366.post-64813840322276068402011-05-30T22:52:27.622+02:002011-05-30T22:52:27.622+02:00Hi,
Do you know why adding back key at the end is...Hi,<br /><br />Do you know why adding back key at the end is causing an exception ? <br /><br /> keyUpDown( wm,KeyEvent.KEYCODE_T );<br /> keyUpDown( wm,KeyEvent.KEYCODE_BACK ); <br /><br />Thanks in advance for any tip.<br />kind Regards,<br />Michalmisio puszystyhttps://www.blogger.com/profile/07014712590373242445noreply@blogger.comtag:blogger.com,1999:blog-8214401912480503366.post-57535599046297710842011-05-30T12:47:39.639+02:002011-05-30T12:47:39.639+02:00Lukasz, try to build with the build.xml script fir...Lukasz, try to build with the build.xml script first in the package. There is a tricky classpath trick here (also mentioned in the post), stubs are provided for classes missing from android.jar. android.os.ServiceManager is such a class.<br /><br />I don't think that you can redefine the "long press home button" but I may be wrong.Gabor Pallerhttps://www.blogger.com/profile/14307475522972458932noreply@blogger.comtag:blogger.com,1999:blog-8214401912480503366.post-54130437614272942922011-05-30T12:11:48.487+02:002011-05-30T12:11:48.487+02:00Hi Gabor.
I have a problem with line:
import andr...Hi Gabor.<br />I have a problem with line:<br /><br />import android.os.ServiceManager;<br /><br />The library cannot be found. Please tell me what to do:) <br /><br />What I intend to do is: create an application that wouldn't be disturbed by "Log press Home Button" which shows "Recent Apps" I thought about maybe redefining the "Long press Home Button" or sending hardware "Back" button click when RecentApps shows.Łukaszhttps://www.blogger.com/profile/02127964080548554324noreply@blogger.comtag:blogger.com,1999:blog-8214401912480503366.post-51077329533732887622011-03-04T20:14:30.103+01:002011-03-04T20:14:30.103+01:00Which link is broken? I tried all of them and they...Which link is broken? I tried all of them and they all work for me.Gabor Pallerhttps://www.blogger.com/profile/14307475522972458932noreply@blogger.comtag:blogger.com,1999:blog-8214401912480503366.post-58667642875367320132011-03-04T08:37:24.070+01:002011-03-04T08:37:24.070+01:00Great article :-)
sadly the link is broken :-/
C...Great article :-) <br />sadly the link is broken :-/<br /><br />Can anyone send me the file (or a non broken link) ?<br /><br />taiko3615 aaarobse gmail comAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-8214401912480503366.post-89674832146706188592011-02-24T16:41:41.462+01:002011-02-24T16:41:41.462+01:00Thanks Dude. The instrumentation method works grea...Thanks Dude. The instrumentation method works great.<br /><br />Instrumentation inst = new Instrumentation();<br />inst.sendKeyDownUpSync( KeyEvent.KEYCODE_VOLUME_DOWN );<br /><br />I used it to show the android volume popup (VolumePanel).<br /><br />Thanks,<br />Leo.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8214401912480503366.post-58541846728994572312010-12-03T02:39:07.298+01:002010-12-03T02:39:07.298+01:00Dude, you are amazing. Not just this blog post. I&...Dude, you are amazing. Not just this blog post. I've found a lot of useful information on your page that just isn't available elsewhere!Unknownhttps://www.blogger.com/profile/18319013249376945595noreply@blogger.comtag:blogger.com,1999:blog-8214401912480503366.post-69853984372111693772010-11-19T12:14:24.886+01:002010-11-19T12:14:24.886+01:00Would it be possible to inject events into other p...Would it be possible to inject events into other processes if you had root access?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8214401912480503366.post-25991675232044791792010-03-02T21:57:43.148+01:002010-03-02T21:57:43.148+01:00rbd, did you build it with the Ant script provided...rbd, did you build it with the Ant script provided, from the command line? The package includes some stub classes (under the stubs directory), they have to be on the classpath during compilation time but should not be packaged into the apk file. The modified build.xml does this. Look for the compile-stub task.Gabor Pallerhttps://www.blogger.com/profile/14307475522972458932noreply@blogger.comtag:blogger.com,1999:blog-8214401912480503366.post-70611343704117969982010-03-01T13:41:58.708+01:002010-03-01T13:41:58.708+01:00Hi,
I've tried to compile the code on OS 2.1 ...Hi,<br /><br />I've tried to compile the code on OS 2.1 but i keep getting error messages. Did someone managed to compile it?rbdnoreply@blogger.comtag:blogger.com,1999:blog-8214401912480503366.post-51941867744925119072010-02-15T20:48:46.982+01:002010-02-15T20:48:46.982+01:00There might be a possibility. There is a open sour...There might be a possibility. There is a open source project called AndroidScreencast wich allows you to controll your phone via pc while connected to ADB. Maybe we could use its functionality. I opend a threat at alldroid.org http://alldroid.org/viewtopic.php?f=268&t=2010Unknownhttps://www.blogger.com/profile/05097420405789623132noreply@blogger.comtag:blogger.com,1999:blog-8214401912480503366.post-87320782679595939842010-02-15T19:44:21.667+01:002010-02-15T19:44:21.667+01:00Hi!
Has anybody found solution how to simulate a ...Hi!<br /><br />Has anybody found solution how to simulate a key event to any active window?<br /><br />ThanksSteshnoreply@blogger.comtag:blogger.com,1999:blog-8214401912480503366.post-11888750371431007602010-02-09T21:19:17.711+01:002010-02-09T21:19:17.711+01:00is there any possibility to inject key events to a...is there any possibility to inject key events to an other application? with root? can I change the permission of iwindowmanager?<br />can I create a testcase and use instrumentation on a ready made apk?<br />Anything?Unknownhttps://www.blogger.com/profile/05097420405789623132noreply@blogger.comtag:blogger.com,1999:blog-8214401912480503366.post-63398681399899716622010-02-01T23:55:49.518+01:002010-02-01T23:55:49.518+01:00here is a howto buld an apk from the repo: http://...here is a howto buld an apk from the repo: http://asantoso.wordpress.com/2009/09/15/how-to-build-android-application-package-apk-from-the-command-line-using-the-sdk-tools-continuously-integrated-using-cruisecontrol/Unknownhttps://www.blogger.com/profile/05097420405789623132noreply@blogger.comtag:blogger.com,1999:blog-8214401912480503366.post-32945553580011172052009-12-02T07:32:11.298+01:002009-12-02T07:32:11.298+01:00hi All,
Can you please tell me how to build the a...hi All,<br /><br />Can you please tell me how to build the applicaiton through repo. I need to end the call through program. Can you please check this. <br /><br />Thanks<br />rajAnonymoushttps://www.blogger.com/profile/16619109642581720887noreply@blogger.comtag:blogger.com,1999:blog-8214401912480503366.post-17192821368145613412009-11-30T22:57:08.781+01:002009-11-30T22:57:08.781+01:00If I build this application in the repo and add th...If I build this application in the repo and add the permission android.permission.INJECT_EVENTS, it does send key event to other application.<br /><br />In the application, I let the thread sleep several seconds then sends out the key. After press the generate keyevent button, I quit the application immediately. Then I saw these keys were typed in Quick Search box.<br /><br />If I build it in SDK environment, It will get an error 'no permission' when the application is running.Unknownhttps://www.blogger.com/profile/13077098995489386384noreply@blogger.comtag:blogger.com,1999:blog-8214401912480503366.post-74037815368477350032009-04-16T16:20:00.000+02:002009-04-16T16:20:00.000+02:00Hi,
Thanks for this great post. I am interesting ...Hi,<br /><br />Thanks for this great post. I am interesting in injecting keypress event as a way to automatically accept an incoming call from a background service. <br /><br />2 questions:<br />- If my service sends an intent to accept a call to the dialer (via ACTION_ANSWER), can it issue a keypress event programmatically from that same service for the dialer to accept the call<br />?<br />- If the above is not possible because of permission issue, is there a way to automatically accept incoming calls <br /><br />Thanks,Unknownhttps://www.blogger.com/profile/09206541870202144736noreply@blogger.comtag:blogger.com,1999:blog-8214401912480503366.post-72380486985737880602009-04-03T15:12:00.000+02:002009-04-03T15:12:00.000+02:00Hi, I tried installing the apk file in the emulato...Hi, <BR/><BR/>I tried installing the apk file in the emulator and it works fine. But I wanted to know the way how the program is compiled. Because this is not possible in Eclipse and I guess some other tools are used for this. <BR/>Thanks in advance.<BR/><BR/>Regards,<BR/>Sushsus4androidhttps://www.blogger.com/profile/04502422241271360539noreply@blogger.comtag:blogger.com,1999:blog-8214401912480503366.post-54980560983235499392009-01-22T08:03:00.000+01:002009-01-22T08:03:00.000+01:00Hi,I need help in END CALL Key gen event..Ans also...Hi,<BR/><BR/>I need help in END CALL Key gen event..<BR/><BR/>Ans also that two OS pack you have mentaitond is not avail in the And.jar file...<BR/><BR/>Then how to use it...Unknownhttps://www.blogger.com/profile/11556508942976051121noreply@blogger.com