I am writing an application in which i have two Activities and one service. Now i want to get some values from service through main activity and send that values to second activity. Basically i want to get a string array back from service and send that array in to next activity. I know i c开发者_JAVA技巧an send that sring array to next activity by the help of Intent.putextra(). But i don't how to get string array from service which is running in background. Please help me.. Thankx..
public class ResponseReceiver extends BroadcastReceiver {
public static final String ACTION_RESP = "com.mamlambo.intent.action.MESSAGE_PROCESSED";
@Override
public void onReceive(Context context, Intent intent) {
// Update UI, new "message" processed by SimpleIntentService
String text = (String)intent.getStringExtra(Login.PARAM_OUT_MSG);
}
}
精彩评论