[Solved] How can I share values between a Service and Fragment in Android? [duplicate]


You can use Bundle class and put_extra data to retrieve and put.

Example : put_extra

Intent i = new Intent();
i.putExtra("name_of_extra", myParcelableObject);

to read data

Bundle b = new Bundle();
b = getIntent().getExtras();
Object myParcelableObject = b.getString("name_of_extra");

solved How can I share values between a Service and Fragment in Android? [duplicate]