On Mon, Aug 1, 2011 at 2:35 PM, kypriakos <demet...@ece.neu.edu> wrote: > Can calls to methods > of the launched Activity be made from the servlet?
Assuming the servlet runs in a separate thread, no. Not directly at least. > In other words, how can one app communicate with an activity > that it launches? I think this is a matter of communicating threads so I am wondering if there's an alternative way to approach > this problem. You could launch the activity using the FLAG_ACTIVITY_SINGLE_TOP flag. Then when you call startActivity() again, a new instance won't be created, the intent will be delivered to onNewIntent(). Alternatively, you could use a Handler to send messages to the GUI thread. The hard part may be how to get a GUI-thread Handler to your servlet container though. Assuming the whole app server is started from the GUI thread, you have to create a Handler (on the GUI thread) and find a way to stuff it in a globally accessible place (Application static field, etc.) -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en