How to start and stop a service? [duplicate]

1

Questions:

I need to write a shell script to start and stop an android service .

Answers:

I’m a beginner in Android, but got it working like this:

in AndroidManifest.xml, make sure you, inside , have something like this:

where YourServiceSubClassName extend android.app.Service is your java class that is the service. Where com.some.package is the package name, for me both in AndroidManifest.xml and in Java.
Used a javabeat.net article as help, look for

Note also, supposedly between the package name and the class name there should be .service. in the text, I guess this is some convention, but for me this caused ClassNotFoundException that I’m yet to solve.

Then, install your apk. I did from eclipse but also adb install -r yourApkHere.apk should work. Uninstall is adb uninstall com.some.package.name, btw.

You can start it from host system like this, thanks Just a Tim and MrRoy:

adb shell am startservice...
0 0
2

Find the Photos app on your Mac contains duplicate photos? Read on this tutorial to learn how to clean up and stop creating duplicated photos on your Mac for free.

PrimoPhoto – #1 iPhone Photo Transfer Software

Don't have PrimoPhoto? Download it now prior to reading this guide and it will save you quite a lot of time. Click Here to Free Download

iOS 11 comes with many new features, but updating may cause unexpected problems, that’s why we collect the Top 25 + issues You May Meet in iOS 11 Update. If you lost data during the update, you can check the Complete Guide to Recover Lost Data after iOS 11 Update.

Starting with OS X Yosemite 10.10.3, every Mac now comes with the new Photos app. If you were using iPhoto or Aperture, as the updating happens automatically, you'll have no choice but turn to use Photos to manage your photo collections on your Mac.

In the most cases, thanks to an intuitive and briliant design, in-built iCloud Photo Library, and...

0 0
3

Is it possible to start an Activity from a Service? If yes, how can we achieve this?

How to start a android service from one activity and stop service in another activity?

I need to start an android service from activity and stop the activity and stop service from other activity. any help will be appreciated

Start a Service from activity

In my app i have an activity from which i want to start an Service Can any body help me?

Android, start activity from service?

Trying to start activity from service started at BOOT, but log shows how application dies (don’t know why exactly) and restarts and tries again and again.. I’ve tried differents ways of starting activ

Start service from activity, 2 apps

I have two applications. One app has the Activity and another one is a background service. how do i start the service from the activity? i tried: Intent intent = new Intent () ; intent.setClassName(c

How to start a service...

0 0
4

If your email software suddenly starts downloading duplicate copies of the same emails, there are four common causes to consider.

1. Your email software has more than one “Account” or “Profile” or “Personality” configured to download messages from the same email POP account. As a result, your software downloads one copy for each Account/Profile/Personality.

Symptom: All email from all senders are downloaded two or more times; but only up to a certain number of copies, which remains the same… ie: two copies of every email or three copies of each. Solution: Manually review each Account/Profile/Personality within your email software to make sure that the same POP account isn’t listed more than once.


2. The sender actually is mailing multiple copies, possibly due to a software problem on their system or server.

Symptom: You receive two or more copies of messages from some senders, but not others. The “Message ID” for each email (contained in the Internet...
0 0
5

This question already has an answer here:

I've tried the top comment here Disable a Windows service from the command line but when I restart the computer the service is back up and running again.

If I manually go into services.msc and change the Startup type to "Disabled", change the Service Status to "Stop" and then Click "Apply" and then "OK", after rebooting the computer it is still disabled.

This is the commands I am issuing

sc stop "igfxCUIService1.0.0.0" sc config "igfxCUIService1.0.0.0" start= disabled

And the following is the logging

SERVICE_NAME: igfxCUIService1.0.0.0 TYPE : 10 WIN32_OWN_PROCESS STATE : 3 STOP_PENDING (STOPPABLE, NOT_PAUSABLE, IGNORES_SHUTDOWN) WIN32_EXIT_CODE : 0 (0x0) SERVICE_EXIT_CODE : 0 (0x0) CHECKPOINT : 0x0 WAIT_HINT : 0x0 [SC] ChangeServiceConfig...
0 0
6

Possible Duplicate:
What’s the recommended way to enable / disable services?

Are there any other command to start stop restart service in ubuntu other than the below following.

service --status-all service stop sudosysv-rc-conf

It depends largely on the service. The new and preferred way to stop start and restart services is through /etc/init.d. So, for example, to stop or start the Apache Webserver, you can run

/etc/init.d/apache2 stop

/etc/init.d/apache2 start

The same is true of many other services, but probably not all. You can use the utility sysv-rc-conf to see which services you have that use an init.d script and manage them that way as well. Run it with sudo sysv-rc-conf.

If you're looking for a GUI application, try Boot up Manager. Install with

apt-get install bum

and run from the UI or from a terminal with

sudo bum

Usage and documentation can be found here.

You can use the following...

0 0
7

All, anyone know anything about OSX/IOS "Photos" app ability to detect and remove duplicate photo9? My "Photos" library has 63,299 photos & 2135 videos as of May 2016 and at least 10,000 + of these photos are duplicates (based on a scan by Photosweeper). I have checked the result of the Photosweeper scan by doing a manual visual comparison and check of original image files in iphoto library (using show location function) and confirmed these 10,000+ photos are identical duplicate images with different file names located in different parts of photo library database.

So what is going on and how do I stop 10-15% of my image library being duplicate files!!! I will raise this directly with apple support as paying for the 1TB icloud service to cover my very large "Photos" library which should probably just be a Large Photo Library!!!!

Some other comments for those who have a duplicate problem:

- The old iPhoto application used to "detect duplicates" when importing...

0 0
8

Today, we will see how to manage services in Windows 10. We will see in detail how to start, stop or restart a service. It can be any service installed in the OS which runs in the background. Here are the steps.

RECOMMENDED: Click here to fix Windows errors and optimize system performance

Windows services are a special apps which run in the background. Most of them have no interaction with the user session and have no user interface. Services are one of most important parts of the Windows NT operating system family, which was started with Windows NT 3.1 and includes all modern Windows versions like Windows 7, Windows 8 and Windows 10.

Windows 10 has a huge number of services which exist out-of-the-box. Many third-party apps and even device drivers can add various services to Windows 10. You might be interested in learning how to manage services to check if a service affects the OS behavior in some bad way. Before we continue, I would like to remind you that we...

0 0
9

Let me first say: Do not use task killers. You are only making the problem worse. Why? Let me explain how the Android OS works.

Unlike normal OSes, Android does not actually let you "close" an application. You can leave the application, but that doesn't mean it has "closed" or "killed" it. This is because of multi-tasking: when you leave an application, you can come back to it as you were previously.

Instead, the Android OS handles the "killing" or "closing" of applications for you. It keeps track of a) how much free memory there is and b) how long it has been since you've opened that app. When memory is running low, Android will garbage collect and kill any unused applications. Android's OS task killer is very smart and can handle these situations far better than an Android Task Killer app that just kills apps left and right without any "logic" behind it.

Now, when you leave an application via back button or home, this doesn't mean the app is necessarily still...

0 0
10

This question already has an answer here:

I have a JAR file and I would like to register and run it as a Windows service. With a well-configured JAR and already registered JVM shutdown hooks it should not be a big work to do this.

I already have a JAR with externallibdir, I can start it withjava -jar My.jarand stop withCtrl+C.

I also checked JSL, JSmooth, and procrun from Apache with no working solution.

I would need a working solution with a good tutorial.

Update:I succeeded with both procrun (at last), and the manual .net service wrapper too... Here is the code for the procrun version of my install.bat:

set PR_PATH=%CD% SET PR_SERVICE_NAME=MyService SET PR_JAR=MyService.jar SET START_CLASS=org.my.Main SET START_METHOD=main SET STOP_CLASS=java.lang.System SET STOP_METHOD=exit rem ; separated values SET STOP_PARAMS=0 rem ; separated values SET JVM_OPTIONS=-Dapp.home=%PR_PATH% prunsrv.exe //IS//%PR_SERVICE_NAME%...
0 0
11

Notifications are crucial for keeping you informed about events that are happening across your Mac, but also across the World Wide Web. Notifications can give you a head’s up about everything from breaking news on your favourite media websites, to a new ‘like’ on your latest Facebook post. Even better, notifications provide all this information without you having to navigate away from whatever you’re currently doing.

Notifications are great – until they go wrong. Since notifications are designed to grab your attention, once notifications start to misbehave they can become seriously annoying, seriously quickly.

One problem you may encounter, is when an app, website or service starts issuing duplicate notifications. Duplicate notifications are something that can crop up on your Mac at any time, however recently many Sierra users have been reporting problems with Facebook notifications – with some users reporting hundreds of duplicate notifications for every Facebook...

0 0
12

On occasion, Windows may direct you to disable or end a service in the course of trying to troubleshoot a problem with a Windows application. During those times, refer to these steps for the proper procedure:

Open the Control Panel.

Open the Administrative Tools window.

In Windows 7, choose System and Security and then choose Administrative Tools.

In Windows Vista, choose System and Maintenance and then choose Administrative tools.

In Windows XP, open the Administrative Tools icon.

Open the Services icon.

Double-click the service you want to stop or disable.

The service’s dialog box appears.

Ensure that the General tab is selected.

To stop the service, click the Stop button.

If the Stop button isn’t available (it’s dimmed), the service hasn’t started. Good.

To prevent the service from starting when Windows starts, choose Disable from the drop-down menu next to Startup Type.

...
0 0
13

Should that not be...

If oNamesDict.Exists(UCASE(oFolder.Name))Then
WScript.Echo "Renaming " & oFolder.Path & " to " & ofolder.ParentFolder.Path & "\" & oNamesDict.Item(UCase(oFolder.Name))
oFolder.Name = oNamesDict.Item(UCase(oFolder.Name))
End If
RenameSubFolders oFolder.Path, oNamesDict

where 'oNames' should be 'oNamesDict'?

Also, note the use of the CODE tag in my post. You should use this tag when posting code or any other lengthy text here on AppDeploy. It makes post much easier to read and follow.

EDIT:
Look what I found...'// =========================================================================================================
'// Name: ControlServiceWMI
'// Purpose: Controls services using WMI
'// Input: strComputer - String - the computer on which we want to control the service. Null means local machine
'// strService - String - the name of the service. If blank, the function will...

0 0
14
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277...
0 0
15

© 2018 Time Inc. All Rights Reserved. Use of this site constitutes acceptance of our

Terms of Use

and

Privacy Policy

(

Your California Privacy Rights

).

Fortune may receive compensation for some links to products and services on this website. Offers may be subject to change without notice.

Quotes delayed at least 15 minutes. Market data provided by

Interactive Data

. ETF and Mutual Fund data provided by

Morningstar

, Inc. Dow Jones Terms & Conditions:

http://www.djindexes.com/mdsidx/html/tandc/indexestandcs.html

.

S&P Index data is the property of Chicago Mercantile Exchange Inc. and its licensors. All rights reserved.

Terms & Conditions

. Powered and implemented by

Interactive Data Managed...
0 0