Most voted "android-service" questions
An Android service is a component for performing operations, usually long, without user interaction. It has a life cycle independent of the component that started it and by default (default) runs on the main thread of the host process.
Learn more…33 questions
Sort by count of
-
5
votes1
answer3992
viewsHow to perform a method in a given time?
I need that at certain programmed hours, a method is executed even if the user is outside the application.So I searched I will have to use services? I didn’t quite understand how to program time, I…
-
5
votes1
answer9780
viewsHow to make application running in the background all the time
I tried to use the Service as they said but it’s not working yet. I don’t know if I got it right, the method onStartCommand() will run all the time? Because I debug and the application only enters…
-
4
votes2
answers498
viewsService versus Broadcastreceiver
What’s the difference, on Android, between Service and Broadcastreceiver? How long a Service can run (running)? How long can a Broadcastreceiver run (running)? I can create notifications via…
-
3
votes2
answers665
viewsHow to send calculation performed in a Service for Activity?
I would like to perform a simple calculation on a Service and return the value to the Activity who called him. To take the value of the variables of Activity I call the getDoubleExtra(double) of…
-
3
votes1
answer2751
viewsNotifications in a given time and on mobile phone
Hello. I’m making an android app that notifies me when I have to deliver a school assignment and, if it’s the day of the task or the day before, I want to be notified at certain times. The home…
-
3
votes3
answers368
viewsHow to prevent an application that runs in the background from being stopped by the user?
For example an application that needs the strings of the apparatus every 30 seconds and that runs in the background and, the user can not force its stop manually.
-
3
votes1
answer161
viewsHow to receive automatically, in Activity, a value calculated in a Service?
I have an algorithm that generates prime numbers using a Service. Well, it works but I need it to update the data in my Activity automatically, at the moment it does this just by clicking on a…
-
2
votes2
answers668
viewsI can’t start a service
I’m trying to replace a code I made using thead by services ,but when I create the service it doesn’t start (doesn’t start any service method) and searching the net vi some solutions that said it…
-
2
votes1
answer134
viewsHow to restart a service to call the oncreate again?
Hey, guys, let’s go I have a service and I have all his logic on Oncreate. The problem is that I need it to go through the oncreate again when I perform an interaction on my Activity. I’ve tried…
-
2
votes0
answers202
viewsDoes an Android service lock the application even running in the background?
Does an Android service lock the application even running in the background? Or is there something wrong with my application? I have a database where the last table has 3,000 lines. With this I…
-
2
votes1
answer689
viewsWhat to do so the service is not finished by Android?
I have a service that runs in the background to pick up the location and go recording in a text. The service is started together with android through Broadcastreceiver. Works perfectly, but after…
-
1
votes1
answer969
viewsPrevent the service from being closed
Hello, I have an android app that tracks gps signal, works normal but every time it gets in the background it closes alone. I already researched on the subject and saw that the android controls the…
-
1
votes1
answer126
viewsError: Service Intent must be Explicit
Hello, I’m having the following error on android, someone can help me? Erro: Service Intent must be explicit: Intent { act=SERVICEPUSHNET } Code: SMART.JAVA package imm.pt.immsmart; import…
-
1
votes0
answers126
viewsHow to make POST in android studio?
I’m trying to do a POST for my local API but I’m finding some problems and I’m not getting it right what I’m doing wrong. POST that works on Postman is with a body more or less like this: [ {…
-
1
votes0
answers66
viewsUse Service to continue player operation when class changes
I want to use for when to change Fragment continue running the audio and when to class the ! isPlaying keep popping up the requested pause. How to do this with Service? import android.app.Fragment;…
-
1
votes0
answers270
viewsHandle and filter Notifications on Android
I’m creating an application for Android in which I use a NotificationListenerService to try to intercept the notifications. The intention is to intercept all notifications and let you pass only…
android push-notification android-notification android-serviceasked 7 years, 7 months ago Julio Machado 11 -
1
votes1
answer166
viewsBound Service using Intentservice
I am creating an Intentservice with Binder, so I can communicate with that service from an Activity public class MyService extends IntentService { private ChatManager chatManager; private final…
-
1
votes1
answer74
viewsIn android 8 Service stops and does not reboot when Activity ends
I am testing a service but when Activity is terminated the service to temporarily, then the service tries to restart, is called the onCreate method but onDestroy is called in sequence and the…
-
1
votes1
answer329
viewsError starting service on startup(ACTION_BOOT_COMPLETED)
I have a problem to start a service on android soon when the phone turns on I followed several tutorials but always causes this error 06-04 23:56:27.305…
-
1
votes1
answer115
viewsHow to stop a service?
I created a VPN connection in my app through a service, at the click of a button, the connection is made. But now I want to know how to do the reverse, IE, by clicking the button disable this…
-
0
votes1
answer59
viewsFinish another App service
The thing is, I’ll have two apps running on a client’s phone, one of them just starts a few services and the other does some operations, the problem is I can’t unify the two, it’s a long story, now…
-
0
votes1
answer357
viewsHow to call a Service through another app?
I have two apps, the app 1 has several CRUD, the app 2 has several services and notifications. When trying to start Service by App 1, this is happening: java.lang.Securityexception: Not allowed to…
-
0
votes1
answer598
viewsCapture events on volume button
I’m trying to record and capture events on the volume buttons of Android, so I can start and stop a service. Researching I found several solutions using Broadcastreceiver, but it seems that none is…
-
0
votes1
answer60
viewsApp stops responding when running onStartCommand
I call the service at onPause() And once I leave the app, it stops responding after a while. From what I’ve researched, it may be that the processes are too heavy to execute in the background. I…
-
0
votes0
answers57
viewsservice does not start after wiping memory
Hello guys I am developing an application that needs a service to warn the user according to events at large times times + 24h... then everything is working, I open the application, the service…
-
0
votes1
answer47
viewsFATAL EXCEPTION main when using service on android
Good night ! I’m trying to generate a service that can identify when the screen of the mobile phone is erased or access, so I followed some tips to get to this point that is a simple test code, but…
java android broadcastreceiver android-serviceasked 6 years, 8 months ago Eduardo Rafael Moraes 710 -
0
votes1
answer51
viewsSerivces on Android rebooting variables
Me developing a test application in which a Service is running in Background and is sending notifications to your phone every 10 seconds. To improve the test I created a counter that increases with…
-
0
votes1
answer56
viewsPause running on an Android Service
I am developing an Android app where there is a IntentService to read a file. Each line of the file represents a record that must have a specific format according to the requirements of the…
-
0
votes1
answer81
viewsstopService() not for service
I’m studying Services on Android, I can perform the same in a simple test just for understanding, but I can’t stop it in main Activity at all. I believe I’ve tried everything. I tried to put…
-
0
votes1
answer40
viewsHow to destroy a jobSchedule via Activity?
I’m studying the services in Android Background and managed to create a service in Background that already works well in the background even after restarting the android or close the App. The…
-
0
votes1
answer23
viewsService in workmanager runs only on usb cable by android studio
I have an android application where after the user enters his company ID he activates a switch and from there the application is posting in an API the position of it. This is done through the…
-
0
votes1
answer16
viewsstopService() works on only one device
I am developing a streaming application and whenever a new song is chosen the application for the service that is playing the current song and then starts it again with the new song chosen by the…
-
-2
votes1
answer251
viewsDoes anyone have any idea how to mount a multiple alarm system using the Workmanager library?
I am developing an application that works as "Alarm" to take the medicines at the right time. I am trying to use the "Alarmmanager" Repeating to run these alarms. However, some problems are…
java android android-studio android-service android-alarmmanagerasked 5 years, 4 months ago Andre Alas 54