Questions tagged [bindservice]

44 questions
0
votes
0 answers

java.lang.SecurityException: Not allowed to bind to service Intent in one plus device

I wrote a speech recognition app using android's built-in speech recognition classes. Once in a while the following Exception shows up in my developer console when the startListening() function is called on the speech recognizer object obtained…
Vijay Patle
  • 29
  • 1
  • 5
0
votes
0 answers

Failed to control LED using android Service

I'm developing an app to control LED. I want to send String value from multiple Activity so I'm using Android Service to run Bluetooth connection in background. I don't no how to send value from multiple activity to control LED. Here's the…
user9
  • 1
  • 4
0
votes
1 answer

Make Bluetooth connection alive for multiple activity

In my application i want to send value from multiple activity to connected Thread,i don't know to solve this problem please help me Example: I want to send String string ="#FFFFFF000*";from First-activity to service class, String…
user9
  • 1
  • 4
0
votes
1 answer

Can we bind binder service through broadcast receiver?

I want to start binder service once application receive broadcast, So can i bind service from receiver like startService or do i need to send callback to activity to bind service? As per my knowledge broadcast receiver has time limit of 10 sec, so…
Reena
  • 1,368
  • 1
  • 11
  • 25
0
votes
2 answers

send data to server in background on every x sec or minutes

I need to send data to server continuously (say after every x seconds or min) even if app is in background.i know service is the best option for this.as i have never tried such scenario is there any handy example on how to make web-service call from…
Hardik Mehta
  • 867
  • 1
  • 12
  • 20
0
votes
0 answers

Running aidl service in background?

I have a aidl process through which i make connection to my server and perform login, But the problem is when i close the application i am unbinding the service in onDestroy() callback of activity, so here my server connection gets disconnected and…
0
votes
1 answer

Execute long running task using handler

I am using handler in activity to run task on every second. when app goes in background.I started service as a foreground which takes duration from local storage. after long time (When app is in background) this task that i started in activity seems…
Hardik Mehta
  • 867
  • 1
  • 12
  • 20
0
votes
1 answer

Check if service is available

I need to know if a specific service is available (running or can be created) before calling Context.bindService. Is there a way to check that ?
ThomasV
  • 779
  • 1
  • 5
  • 20
0
votes
1 answer

OnServiceConnected is not called

This is my ServiceConnection: private ServiceConnection mConnection = new ServiceConnection() { public void onServiceConnected(ComponentName className, IBinder service) { Log.i("","onServiceConnected TRUE"); locationService =…
rosu alin
  • 5,674
  • 11
  • 69
  • 150
0
votes
0 answers

(Android) Getting a GPS Location via Service / App Stopped Working

I'm writing an app in which the main activity should bind to a service when clicking on a button. The service should get the GPS location. I keep getting the message "Unfortunately, the app has stopped" whenever debugging... Here's…
Bartek
  • 11
  • 6
0
votes
0 answers

Android app crashing with permissions issues when binding to service

I'm trying to extend the binder class to call a method in my service but can't get the intents to match the intent filters. There are two scenarios. If I setup my intent as below, bindService returns true, startService returns Component Info and…
holly_whitney
  • 121
  • 1
  • 7
0
votes
1 answer

Android: onServiceConnected not called after bindService

None of the many similar questions I have found have helped to solve my issue. Here are some questions I've looked at: ServiceConnection.onServiceConnected() never called after binding to started service onServiceConnected never called after…
DerStrom8
  • 1,311
  • 2
  • 23
  • 45
-1
votes
1 answer

Stop bound sensor listener service

I have a Service [a] that is logging sensor data. This service is bound to the calling service [b]. However, i need to start the logger-service manually with startService(intent) bevor binding because i need th onCreate()-Method to run. Is there a…
Jan
  • 343
  • 2
  • 16
-3
votes
1 answer

onServiceConnected is not called after bindService after 3 or 4 launch of application

I am facing a weird issue .On launch of my app I am connecting Activity to service.Service connection is getting established successfully and works fine in Samsung galaxy S5 and other devices too.But in other devices like Moto E , Moto G etc it…
Shakeeb Ayaz
  • 6,200
  • 6
  • 45
  • 64
1 2
3