Questions tagged [bindservice]
44 questions
11
votes
1 answer
Binding PlayerView with SimpleExoPlayer from a service
I have implemented a Service to run the audio in background which runs perfectly but I am unable to get the instance of the SimpleExoPlayer from the service to the activity to update the UI and also the Audio plays twice in the background if I exit…

Akram Hussain
- 472
- 8
- 23
8
votes
0 answers
Android Architecture Components: ViewModel/Repository vs bind to Service/IntentService
I want to implement/refactor an app to the Android Architecture Components concept, see https://developer.android.com/jetpack/docs/guide
In this topic Android Architecture Components ViewModel - communication with Service/IntentService, I found a…

rico_s
- 221
- 2
- 6
5
votes
1 answer
What happen when the activity crash?
I have a service created like this :
Then I implement the onBind…
user7898586
5
votes
2 answers
What is bindServiceAsUser() method in Android?
I cannot understand what is the bindServiceAsUser() method used for. Can anyone please kindly explain about it ? Googling seems doesn't help much.
public boolean bindService(Intent intent, ServiceConnection connection, int flags) {
return…

zoro
- 333
- 3
- 13
4
votes
4 answers
SpeechRecognizer, bind to recognition service failed
I used SpeechRecognizer on android to recognize the User's voice.
It worked well until uninstall the Google App.
(https://play.google.com/store/apps/details?id=com.google.android.googlequicksearchbox&hl=en)
I updated the Google App, but I got…

hobbydev
- 1,513
- 19
- 31
3
votes
1 answer
return false BindService in api 30
when i run my code with compileSdkVersion 30 doesn't work but in 29 code working
Intent intent = new Intent();
intent.setPackage("com.androidlearn.securityman");
ServiceConnection serviceConnection = new ServiceConnection() {
@Override
…

android developer
- 31
- 2
3
votes
0 answers
Start Activity from Bound Service to get DrawOverlays permission but keep the service running
I need to get DrawOverlays permission from my bound service. I am starting the activity - Settings.ACTION_MANAGE_OVERLAY_PERMISSION provided by Android, to open the settings activity for the user, to give permission.
The problem is as soon as the…

AKSHIT
- 68
- 8
2
votes
3 answers
Pivotal Cloud Foundry - Why is restart required after bind-service
The entry in VCAP_SERVICES seems to be getting added as soon as as cf bind-service command is called. If that is the case why is Restart required

Chandralekha R Menon
- 21
- 2
1
vote
0 answers
On Android 11 Remote Bound Service binding fails when invoked from Client app after adding query
I have exactly same issue.
On Android 11 Remote Bound Service binding fails when invoked from Client app
I have added query as well as suggested by @CommonsWare. Even after adding query in client side, bindservice still returns false.
In Android 10,…

RKVM
- 67
- 6
1
vote
0 answers
Can't bind service to fragment
I have an app which plays music. When the app starts loading, music starts playing. The choice of the song is random. In the fragment shows song's name. Music is playing, but song name cannot be displayed. What am I doing wrong? (It is not…

Julia
- 369
- 2
- 12
1
vote
0 answers
How to call method immediately after i bound my service from fragment?
Code in fragment
In my fragment i check if my service was bound already or not, but how can i immediately call my second method when Main.bindMusicService(); is finished (after onServiceConnected gets called)?
Now i have to tap my song 2 times…

Vince VD
- 1,506
- 17
- 38
1
vote
0 answers
Does bindService also call the onCreate method?
Can i call bindService without calling startService? If so, does it also call my onCreate method in my Service?
public static void bindMusicService(Context c){
/*mediaPlayerServiceIntent binds our connection to the MediaPlayerService. */
…

Vince VD
- 1,506
- 17
- 38
1
vote
1 answer
bindservice wont start the service and onserviceconnect wont call
I`m trying to build and run a service for react native app, and after the service is running i need to call to some of the service methods what means that i need to get an instance of the running service so im trying to use bindservice().
the…

Daniel231
- 13
- 3
1
vote
1 answer
Android service still resides in RAM after onDestroy() is called
I'd like to perform the memory test of my android package.
In my package, there is only one very simple service.
The service is started only by bindService from another package. (not startService)
After, another package (package 1) calls bindService…

Logan
- 31
- 1
- 4
1
vote
1 answer
sending string to service app from another app
I want to send a string from an app to a service, I used bind service and I have implemented this code:
package pref.com.app1;
public class MainActivity extends AppCompatActivity {
Messenger mService = null;
/** Flag indicating whether we…

Bahar Azartoos
- 69
- 1
- 9