- 09-02-2010, 02:54 PM #1
Developer
- Join Date
- Apr 2010
- Posts
- 407
- Thanks
- 20
- Thanked 236 Times in 59 Posts
- Downloads
- 7
- Uploads
- 0
REQUEST - small app to send toast message to active window
I am in need for a very small app i can use to send a "toast"(thats the name in android java SDK) messages from example a shell script using the "am" .. ive tried this using Ash but its simply to complex to utilize for this purpose..
so if anyone got more java experience and can call the few lines needed in an app and make it possible to be called from a command line (like Ash works) its greatly appreciated..
the toast lines are just 1 line, but getting the info from a command line with am, i simply dont know how to make. but thats as much i know about this for now..
- 09-03-2010, 07:05 AM #2
Of Mice and Modders
- Join Date
- Mar 2010
- Posts
- 54
- Thanks
- 7
- Thanked 1 Time in 1 Post
- Downloads
- 1
- Uploads
- 0
i'm a experienced java programmer, made some small and bigger apk's yet with android sdk ... as you said: bringing a toast is not THAT difficult. but i don't know, what AM means?! you want to start the activity (apk) from commandline, that just popups the toast?
i think, i know what you mean and what you want to achieve with it. but wtf is am?
AH. now i know, what am is. so, the following site should help out: Android: Run Android Application from Command Line
And this should be your point of entry:
I may test it out during the day, perhaps i get an apk for you in the meantime ...Code:Context context = getApplicationContext(); CharSequence text = "Hello dexter, move your output here ;)"; int duration = Toast.LENGTH_SHORT; Toast toast = Toast.makeText(context, text, duration); toast.show();
Last edited by kniffo80; 09-03-2010 at 07:05 AM. Reason: Automerged Doublepost
- 09-03-2010, 08:23 AM #3
Of Mice and Modders
- Join Date
- Mar 2010
- Posts
- 54
- Thanks
- 7
- Thanked 1 Time in 1 Post
- Downloads
- 1
- Uploads
- 0
here we go dexter.
extract the attached .zip (containing the apk), install it on your device. if installed correctly, just popup the toast with the following code from shell:
I just tried it with my milestone and better terminal emulator. It works as intendedCode:am start -a android.intent.action.MAIN -n org.dexter/org.dexter.DexterToast
- 09-05-2010, 09:10 AM #4
Developer
- Join Date
- Apr 2010
- Posts
- 407
- Thanks
- 20
- Thanked 236 Times in 59 Posts
- Downloads
- 7
- Uploads
- 0
thanks for help!.. seemed to be a straight forward app to make, so thanks..
btw, i got something similar on xda forum, but not tested anything yet, as ive been busy with other stuff..
ill try it out and see how it goes..
- 09-05-2010, 02:36 PM #5
Of Mice and Modders
- Join Date
- Mar 2010
- Posts
- 54
- Thanks
- 7
- Thanked 1 Time in 1 Post
- Downloads
- 1
- Uploads
- 0
I know the other app on xda.this was just a 5 minute work
so if its helpful ok.if not,also ok.


LinkBack URL
About LinkBacks
Reply With Quote
