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
65
votes
9 answers

Add nginx.exe as Windows system service (like Apache)?

I set up NGINX as a front end server for static content and I use Apache as a back-end server for other thing. The thing is I can't find a logical answer that allows me to make nginx.exe a Windows system service (like my Apache). Any come across an…
user1305810
  • 705
  • 1
  • 8
  • 10
64
votes
1 answer

How to restart a windows service using Task Scheduler

The easiest way to do this is to create a batch file with: NET stop NET start Once the batch file is created and tested, add it to Windows Task Scheduler and run it at a specific time interval. Problem here is, when…
Kurt Van den Branden
  • 11,995
  • 10
  • 76
  • 85
64
votes
2 answers

How to record video from background of application : Android

I am developing an application which will be able to record video from background of application by using Service. Problem description : In my application recording will be scheduled. If user want to record video from 1 PM to 3 PM, he will schedule…
Android Learner
  • 2,559
  • 6
  • 34
  • 43
63
votes
3 answers

bind/unbind service example (android)

can you give me a simple example of an application with background service which uses bind/unbind methods to start and stop it? I was googling for it for a half-hour, but those examples use startService/stopService methods or are very difficult for…
user1049280
  • 5,176
  • 8
  • 35
  • 52
62
votes
5 answers

How can a service listen for touch gestures/events?

I'm wondering how apps like SwipePad and Wave Launcher are able to detect touch gestures/events simply through a service. These apps are able to detect a touch gestures even though it is not in their own Activity. I've looked all over the Internet…
Brian
  • 7,955
  • 16
  • 66
  • 107
61
votes
3 answers

java.lang.RuntimeException: Handler (android.os.Handler) sending message to a Handler on a dead thread

in my app I'm using IntentService for sending SMS. @Override protected void onHandleIntent(Intent intent) { Bundle data = intent.getExtras(); String[] recipients = null; String message = getString(R.string.unknown_event); String…
eyal
  • 2,379
  • 7
  • 40
  • 54
59
votes
9 answers

How to inject the @request into a service?

When I try to inject the @request into any of my services, I get this exception: ScopeWideningInjectionException: Scope Widening Injection detected: The definition "service.navigation" references the service "request" which belongs to a…
Tony Bogdanov
  • 7,436
  • 10
  • 49
  • 80
59
votes
6 answers

startForeground() does not show my Notification

I am trying to make my Service running in foreground. I tried to use this example (please look for the section "Running a Service in the Foreground"), but startForeground() does not actually show my notification. And no exceptions is thrown. To make…
Dmitry Frank
  • 10,417
  • 10
  • 64
  • 114
59
votes
2 answers

Stopping postgresql from starting on ubuntu startup

Ubuntu 16.04.1 LTS I have tried: sudo update-rc.d -f postgresql remove and sudo vim /etc/postgresql/9.5/main/start.conf then i change the word "auto" to "disabled" Then i reboot the computer, and when it starts, i login and do: sudo service…
asdf
  • 899
  • 1
  • 6
  • 10
59
votes
6 answers

Cannot boot Windows guest in VirtualBox without kernel module error

I'm running Vagrant (1.8.1) + VirtualBox (5.0.12) on Windows 7 and trying to boot up a Windows 7 image (modernIE/w7-ie8). However, I get this error: --------------------------- VirtualBox - Error In…
Anthony Mastrean
  • 21,850
  • 21
  • 110
  • 188
59
votes
4 answers

PID exists in netstat but does not exist in task manager

I have discovered a running process with PID 26376 listening on port 9001 and 9002 as when I try to run my program(as a service) which binds to that port it fails. But when I try to kill it using taskkill /PID it says that the process 26376 is not…
shawn
  • 4,063
  • 7
  • 37
  • 54
59
votes
10 answers

MongoDB on Ubuntu won't start as a service, nothing in the log

Am running MongoDB 2.2 on Ubuntu and if I run: sudo mongod I get an error that it can't find /data/db, which is not where the database is. In mongod.conf the database path is specified as the Ubuntu 10gen default /var/lib/mongodb which is where the…
BishopZ
  • 6,269
  • 8
  • 45
  • 58
58
votes
5 answers

error C2275 : illegal use of this type as an expression

Since yesterday, I've been facing a compiling error for my C project. The project itself consists on creating a service that will make some tasks. I don't what has changed since yesterday, but this morning, my code can't compile anymore. Here are…
BMN
  • 8,253
  • 14
  • 48
  • 80
58
votes
4 answers

CXF JAXRS - How do I pass Date as QueryParam

I have a service defined as follows. public String getData(@QueryParam("date") Date date) I'm trying to pass a java.util.Date to it from my client (which is jaxrs:client of CXF, not a generic HTTP client or browser). My service receives the date as…
domino
  • 683
  • 2
  • 7
  • 10
58
votes
7 answers

Calling activity class method from Service class

I have seen many posts in SO regarding this but could not get the exact and most easy way to call an activity method from service class. Is broadcast receiver only the option? No easy way out ? I just need to call the following method in Activity…
Siju
  • 2,585
  • 4
  • 29
  • 53