Questions tagged [service]

A Service is a long-running executable that performs specific functions and which is designed not to require user intervention.

A Service is a long-running executable that performs specific functions and which is designed not to require user intervention.

Services usually provide an interface to Start, Stop, Pause and Restart the executable that is running in the computer's background.

23127 questions
5
votes
2 answers

Communicating between SERVICE and web/desktop application

Whats the recommended way to communicate between a service and a desktop app or webpage ? I want the service to do all the work, but admin/management/reporting to be possible via web or desktop. (It will be written in C# with .Net 4.0) Is it named…
user296191
  • 405
  • 5
  • 19
5
votes
5 answers

Java Service Wrapper for Linux cannot find environment variables

I'm using Java Service Wrapper (tanukisoftware) to run my java server on a centos linux machine. My java code accesses few environment variables using System.getenv When I run the program without the wrapper (like ant run) i can access my…
FatherFigure
  • 1,135
  • 1
  • 16
  • 39
5
votes
2 answers

unable to start MongoDB server

I installed MongoDB in wsl using the official windows document here. I have created a path and can start the a DB instance using sudo mongod --dbpath ~/data/db but after following the docs further and adding the init script from here to start…
5
votes
2 answers

C# Windows Service - Started and then Stopped Automatically

I am creating this windows service by following the instructions at MSDN Walkthrough: Creating a Windows Service and after successful installation, I go to Services.msc to Start the Windows service and before it finishes starting up I get the…
Invaderleige
  • 65
  • 1
  • 1
  • 5
5
votes
1 answer

Download multiple files using a Service in android

My application has a lot of optional data that can be downloaded so I decided to use a Service to handle all the downloads in the background, So I started learning it and here is where i got: public class DownloadService extends IntentService{ …
Omar
  • 7,835
  • 14
  • 62
  • 108
5
votes
4 answers

singleton / static classes for services

I have an application which has some classes that handle some specific functions, have a lifetime equal to the application itself, and are meant to be used in many parts of the program. For this last reason i call them Services. For example, the…
Zmaster
  • 1,095
  • 9
  • 23
5
votes
2 answers

Collect Flows in Service

So, I'm trying to collect data from flows in my Foreground service (LifecycleService) in onCreate(), but after the first callback, it is not giving new data. The code is : override fun onCreate() { super.onCreate() …
5
votes
1 answer

Android RemoteServiceExeption: Context.startForegroundService() did not then call Service.startForeground()

I know, there are already many questions about this error. But I tried many solutions and nothing worked for me. I have a Notification Service in my application with a timer in it and crashlytics reports hundreds of crashes (android 8 - 12) like…
Malmatth
  • 197
  • 2
  • 12
5
votes
1 answer

Keeping a foreground service alive with binding

I've built a service that uses startForeground() to stay alive, but I need to use binding to connect it to my activities. It turns out that even if the service is running in the foreground, it's still killed when all activities unbind from it. …
derekerdmann
  • 17,696
  • 11
  • 76
  • 110
5
votes
2 answers

Detecting screen orientation change from service

A pretty simple and straightforward question... is it possible for a service to detect screen orientation changes? If so, how?
Brian
  • 7,955
  • 16
  • 66
  • 107
5
votes
1 answer

Android services: life cycle considerations

I am making an android app which will have two services that will keep sending data about the usage of the phone by the user every 24 hours. The user should execute the app, toggle the buttons to enable the logging of the usage of the phone and then…
noloman
  • 11,411
  • 20
  • 82
  • 129
5
votes
2 answers

How to check if the location service is "on" in Xamarin Forms?

My app works with location. So I it is required to be location service on. I have seen questions about checking location service's status on the iOS platform, but is there a way to check this in the shared project? I'm looking for an event type…
5
votes
3 answers

android - use camera from within background service

I'm trying to figure out if it is possible to use a camera video stream from within a background service rather than from a normal intent. What I had in mind is this: start the service from my app this service accesses the video stream and…
Nicola Montecchio
  • 477
  • 1
  • 7
  • 18
5
votes
3 answers

IntentService : How to enqueue correctly?

In my code i'm using an IntentService to listen to location updates (either GPS or network updates) and this IntentService is triggered when an event is received, so it is started with startService() from any activity. public class…
Pom12
  • 7,622
  • 5
  • 50
  • 69
5
votes
4 answers

Delete windows service folder with files throws error

I know this question was already asked, but I couldn't find the solution so far. What I'm trying to do is uninstall a windows service and delete the folder with the windows service using C#. Windows service uninstall public static void…
Gerald Hughes
  • 5,771
  • 20
  • 73
  • 131