Tuesday, August 23, 2011

[android-developers] Communicating between servlet and activity

Hi all,

I am running a servlet on iJetty that uses startActivity(intent) to
start an activity.
I can send data to the activity through Bundles but not sure how to
send data
back from the activity. I cannot use the startActivityForResult since
the servet
extends the HttpServlet. It has however the app context:

android.content.Context androidContext =
(android.content.Context)config.getServletContext().getAttribute("org.mortbay.ijetty.context");

For now I am using my own implementation of shared mem on the SDCard
but
that's not a standard method I want to keep around. Any ideas on how
this
can be accomplished? A singleton class or extend the Application
class? The
two classes (servlet and activity) are in two separate projects.

Thanks

--
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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

No comments:

Post a Comment