Posts

Showing posts with the label service

Controlling service created with procrun from Java code [on hold]

Controlling service created with procrun from Java code [on hold] I need to start/stop/restart a service created with "prunsrv" command. I need to do this from java code. Should I just exec the "prunsrv" with appropriate arguments from Java or is there any other (ie. pure Java way)? Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

Service is NOT running always even after I have used START_STICKY

Service is NOT running always even after I have used START_STICKY Service is NOT running always even after I have used START_STICKY. Sometimes I dont get any Toast Action for Outgoing call, is that mean service stops after some time ? Application shows a Toast whenever user makes a outgoing call from the phone. For this I am using a BroadcastReceiver to tap the call action and a service (to run Receiver always). once I start this activity, it starts showing toast when a outgoing call get initiated ..but not Always. Below is the complete code - MainActivity.class public class MainActivity extends Activity { CallNotifierService m_service; boolean isBound = false; private ServiceConnection m_serviceConnection = new ServiceConnection() { @Override public void onServiceConnected(ComponentName className, IBinder service) { m_service = ((CallNotifierService.MyBinder)service).getService(); Toast.makeText(MainActivity.this, "...