[android-beginners] Receiving text from a remote source and pasting into the current application
I know how to get text from a server with my Android phone. I want to write a utility that can grab text from a server that I'll be running and then paste that text into the current application running in the foreground on the user's phone. What is the general procedure for doing this on Android? Can a Service do this? My concern is that the user should be able to paste the text into any program he runs on Android. I want the user to be able to launch my my utility, keep it in the background, and at the click of a button, pop the text returned by my server into whatever foreground application is running, into the edit box that currently has input focus. Is this possible and if so, generally how? I'm not looking for extensive handholding here, just a feasibility judgement and the general keywords or topics I need to read up on within the Android framework to get the job done. I'm also looking for any caveats such as the possibility it may not be possible to universally allow the user to pop in text from applications foreign to each other, due to sandbox or permissions issues. Thanks, Robert --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Detect running in Android and access to Command Line parameters
Hello, Two questions 1) How can I tell if my Java code is running in the Android environment? I have some code that is shared by Android and non- Android applications and I want to be able to adjust to either environment dynamically. 2) Is there a way to get access to the Command Line arguments that were used to launch the application my Activity (or Service, etc.) is running under? Since our code does not appear to have a main(String args[]) function that gets called, I was wondering if it were possible to still get access to the command line parameters. Thanks, Robert --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Equivalent of MS Windows PostMessage?
What is the accepted/common practice for code to post messages between objects in the Android environment? In Windows I do a lot of inter- object communication via the operating system PostMessage() facility which can post messages to Windows and even non-Windowed objects (if they have allocated a windows message queue and procedure to themselves). Is there an equivalent mechanism in Android? If there is please post the keywords I can use for searching to read about it or URLs to explanatory web pages if you have them. If this is more of a Java language or Linux kernel question then just point me in the right direction to start my investigations. Thanks, Robert --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Equivalent of MS Windows PostMessage?
On Aug 26, 2:37 pm, Mark Murphy mmur...@commonsware.com wrote: Can we back up a step or two and discuss what your actual objective is? PostMessage() is a means to an end -- if you can describe the end, we may be better able to give you an Android-flavored means. Hello Mark, Lots of different uses but if I had to choose one I'd say notifications, especially event notifications with the ability to pass a reference to an object to be used by the receiver of the notification along with the notice (LParam stuffing for the Windows types out there). In Windows the two main paradigms I've seen for doing that are Windows PostMessage() message passing and function callbacks. I lean towards they PostMessage() paradigm because it gets you out of the call chain that a function callback can place you in when your callback is invoked and there can be some fair degree of nuisance that comes with that condition. For example, in many windows callbacks it's a known practice to avoid doing any time consuming work in the callback or you can crash/disrupt the mechanism that is driving the callback, so you delay the processing and move it out of the callback call context by posting a notifcation to some other code you've written with a reference to a data object you created that has all the necessary information to do what you need to do. Or you can post the a notification to another thread and let it handle the time consuming task. But mostly it's straightforward event notifications. I know you know all of this, I'm just using these examples as a way to indicate my area of focus. Another example. One of the areas I know I'm going to have to read deeply about, especially since I intend to be streaming audio from a server to the handset, is how to do asynchrounous socket processing which I assume Android has some standardized notification message mechanism for.. Thanks, Robert --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---