Linked Questions
77 questions linked to/from Example: Communication between Activity and Service using Messaging
0 votes
0 answers
134 views
How to communicate with a service from Activity launched by this service itself [duplicate]
I have a service 'MyService' running in background which launches an activity 'MyActivity' on certain event (code below). Intent i = new Intent(this, MyActivity.class); i.addFlags(Intent....
0 votes
0 answers
64 views
How to let Activity control service? [duplicate]
Possible Duplicate: Example: Communication between Activity and Service using Messaging I'm having a trouble with my service, I googled from yesterday to now and got nothing decent result. Now I ...
114 votes
5 answers
161k views
Sending a notification from a service in Android
I have a service running, and would like to send a notification. Too bad, the notification object requires a Context, like an Activity, and not a Service. Do you know any way to by pass that ? I ...
28 votes
2 answers
29k views
Persistent service icon in notification bar
I am trying to figure out how to show that my service is running with a persistent notification icon. Many examples I've found only send a dismissable message to the notification bar. I wanted a ...
20 votes
1 answer
45k views
send intent from service to activity
I'm trying to return the result from an IntentSerivce to the mainactivity using an intent, but I can't get it to work. The IntentService receives the intent from the activity without a problem, does ...
27 votes
4 answers
34k views
StartActivityForResult from a Service
Id like to enable bluetooth like in this example. However my class isnt a Activity but a Service and therefore I can't call startActivityForResult. How can i solve this problem?. I know there are ...
18 votes
2 answers
10k views
How to update UI from Android service using RxJava/RxAndroid
I have a Bound Service which responsible for downloading files and thus it knows the downloading status/progress. And the UI (Fragment or Activity) has to show/update download progress from the ...
13 votes
1 answer
26k views
Sending data from service to activity
I am having issue when sending data from Service to Activity through Notification , I click a Notification an Activity get invoked but when i try to add some parameters through bundle i am not able to ...
10 votes
4 answers
24k views
Making activity runs in background
I m new in android, I'm not much aware about services.i have an activity class with a UI, i want to make this activity class runs in background, when i click the back button. how to make my activity ...
5 votes
3 answers
30k views
Updating UI from a service (using a handler?)
I am trying to update my UI in FirstActivity when I receive a notification but is confused by runOnUiThread , Runnable and Handler. Here is what I have: I am running FirstActivity and ...
10 votes
1 answer
21k views
How to keep bluetooth connection in background?
i am writing a bluetooth app communicating with a bluetooth module. Actually it works very well. But i want the connection to stay established also while the app is in background and other apps are ...
9 votes
1 answer
13k views
Difference between a process and service?
I want to know what is the difference between a process and a service in an android app? I tried to study about this topic a lot, but did not clear my basics yet...please help?
5 votes
2 answers
16k views
Update service running on background
I need to implement such a procedure: Start a background service Update the service with parameters (from UI - user input) After activity ended the service should keep on running and preform requests ...
16 votes
2 answers
6k views
Android: How do I call startResolutionForResult from a Service?
I'm trying to add GPS tracking functionality to my app by writing a GPS tracking Service. I've been following the Android Developer materials on how to do this via Google Play Services, but I'm stuck ...
3 votes
2 answers
3k views
Persistent Service on Android
I am trying to write a service that comes with a MediaPlayer. I have different Activities accessing it, so I thought it would be best to peruse a Service. It works fine so far, I have also added a ...