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
51
votes
7 answers

stopSelf() vs stopSelf(int) vs stopService(Intent)

What's the difference in calling stopSelf() , stopSelf(int) or stopService(new Intent(this,MyServiceClass.class)) inside onStartCommand() ? for example if I start the same services twice this way: ... Intent myIntent1 = new…
GionJh
  • 2,742
  • 2
  • 29
  • 68
51
votes
3 answers

Linux: process into a service

I am trying to make a linux executable as a service I execute my program like this below java -jar mytestprogram.jar creates a process that runs continuously and serves REST requests. But I want to run it as a service where I can do service…
yalkris
  • 2,596
  • 5
  • 31
  • 51
50
votes
3 answers

How can I keep my Android service running when the screen is turned off?

When the screen turns off, my application service is paused. I start my service with the following code: if (mSharedPrefs.getBoolean("prefAutoUpdatesMain", false)) { Intent svc = new Intent(this, MyService.class); startService(svc); } How…
kristby
  • 521
  • 1
  • 4
  • 5
50
votes
3 answers

Why we should use RxJs of() function?

in service section of angular.io tutorial for angular2 I hit a method named of.for example : getHeroes(): Observable { return of(HEROES); } or in below sample: getHero(id: number): Observable { // Todo: send the message _after_…
Aref Zamani
  • 2,023
  • 2
  • 20
  • 40
50
votes
9 answers

How to run "Oracle VirtualBox (VBOX)" like a service after boot in fully background "Microsoft Windows (WIN)"

I want to run autostart "Virtual Machine (VM)" without "Oracle VirtualBox (VBOX)" "Graphical User Interface (GUI)" on a local development machine with "Microsoft Windows (WIN)". How can I do that in fully running background process?
Bruno
  • 6,623
  • 5
  • 41
  • 47
49
votes
10 answers

Python windows service "Error starting service: The service did not respond to the start or control request in a timely fashion"

I am running the code below by python win_service.py install from the normal command prompt, where I get access denied error. Installing service TestService Error installing service: Access is denied. (5) which I was able to resolve when I started…
Annamalai Nagappan
  • 509
  • 1
  • 4
  • 8
49
votes
3 answers

Android Service to show toast

This code is supposed to use a service to show a toast message. There are no errors, but it doesn't show the toast. main activity public class MainActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { …
codenamejupiterx
  • 1,589
  • 9
  • 23
  • 34
48
votes
2 answers

how to set windows service username and password through commandline

Using sc command we can query, start , stop windows services. For ex: sc query "windows service name" The sc config command changes the configuration of the service, but I don't know how to use it. Could someone tell me how we can set the…
sundar venugopal
  • 3,080
  • 6
  • 39
  • 45
48
votes
8 answers

Android how do I wait until a service is actually connected?

I have an Activity calling a Service defined in IDownloaderService.aidl: public class Downloader extends Activity { IDownloaderService downloader = null; // ... In Downloader.onCreate(Bundle) I tried to bindService Intent serviceIntent = new…
Ryan
  • 870
  • 1
  • 7
  • 18
48
votes
12 answers

The VMware Authorization Service is not running

windows could not start vmware authorise service on local computer. Error 1075 : the dependency service does not exist or has been marked as deletion I have installed windows7 home basic so i am not geeting any - local user and group option…
utkal patel
  • 1,321
  • 1
  • 15
  • 24
47
votes
2 answers

Should I use PendingIntent.getService() or getBroadcast with AlarmManager?

My app needs to grab some data from the web at a specific time each day. So I use an AlarmManager to schedule the task and that works ok. But when looking at various examples there seems to be two ways to deal with the AlarmManager when it comes to…
marlar
  • 3,858
  • 6
  • 37
  • 60
47
votes
4 answers

Android - How to decide whether to run a Service in a separate Process?

I am working on an Android application that collects sensor data over the course of multiple hours. For that, we have a Service that collects the Sensor Data (e.g. Acceleration, GPS, ..), does some processing and stores them remotely on a server.…
pableu
  • 3,200
  • 4
  • 23
  • 21
47
votes
11 answers

mysql service fails to start/hangs up - timeout (Ubuntu, MariaDB)

I set up my first Ubuntu Server with Ubuntu 16.04, nginx, php7.0, MariaDB, nextcloud and external DynDNS using this tutorial here: Install Nextcloud 9 on Ubuntu 16.04 Everything worked fine but since I restarted the server the next day, nextcloud…
Lw Bi
  • 549
  • 1
  • 4
  • 8
47
votes
5 answers

run nginx as windows service

I am trying to run nginx (reverse proxy) as a windows service so that it's possible to proxy a request even when a user is not connected. I searched a lot around and found winsw that should create a service from an .exe file (such as nginx). i found…
John Doe
  • 1,613
  • 1
  • 17
  • 35
46
votes
2 answers

Logging Events in a Windows Service Program

I have created a Windows service program and I want my error to strictly be written to the Windows eventLog. So I followed these steps from code project article: http://www.codeproject.com/KB/dotnet/simplewindowsservice.aspx But I don't see any of…
ArmenB
  • 2,125
  • 3
  • 23
  • 47