Questions tagged as 'android-service'

1
answer

How to make application running in the background all the time

I tried to use Service as they said but it is not working yet. I do not know if I understand correctly, will the onStartCommand() method run all the time? Because I've debugged and the application only goes into this method once, w...
asked by 25.06.2016 / 05:22
1
answer

How to execute a method in a certain time?

I need at certain scheduled times, to execute a method even if the user is outside the application.Why do I research I will have to use services? I did not quite understand how to program the time, I just left the class created here: public cl...
asked by 23.07.2014 / 07:23
2
answers

Service versus BroadcastReceiver

What's the difference, on Android, between Service and BroadcastReceiver? How long can a Service run (running)? How long can a BroadcastReceiver run (running)? Can I create notifications via BroadcastReceiver or just via Service? Is it...
asked by 07.04.2016 / 17:19
1
answer

Timed and cell-phone notifications

Hello. I'm making an android app that notifies me when I have to turn in a school assignment, and if it's the day of the assignment or a day before, I want to be notified at certain times. The home screen is where the service starts, where I...
asked by 12.04.2015 / 08:49
3
answers

How do I prevent an application running in the background from being stopped by the user?

For example, an application that requires the cordenings of the device every 30 seconds and runs in the background, and the user can not force the device to stop manually.     
asked by 01.10.2015 / 00:54
1
answer

How to automatically receive, 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 automatically update the data on my% s of% main, at the moment it does so with the click of a button and needs to be done automatically....
asked by 01.09.2015 / 02:09
2
answers

How to send calculation made in a Service to Activity?

I would like to do a simple calculation in a Service and return the value to the Activity that called it. To get the value of the Activity variables I call the getDoubleExtra(double) of intent , but to send the result I should d...
asked by 17.01.2015 / 13:52
1
answer

How do I restart a service to call oncreate again?

Hey guys, I have a service and I have all his logic in OnCreate. The problem is that I need it to go through the oncreate again when I perform an interaction in my activity. I've tried using stopService(new Intent(this, YourService.clas...
asked by 15.11.2016 / 15:38
2
answers

I can not start a service

I am trying to replace a code that I did using thead by services, but when I create the service it does not start (it does not start any service method) and searching the net I saw some solutions that said it could be in "manifest.xml "but the c...
asked by 17.06.2015 / 05:11
1
answer

What do you do to make sure the service is not terminated by Android?

I have a service that runs in the background to pick up the location and go recording in a text. The service starts along with android through BroadcastReceiver. It works perfectly, but after about 12 hours of service running, the android ends a...
asked by 04.03.2016 / 02:11