MAkS MAkS - 1 year ago 89
Android Question

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?

Answer Source

The application can start the service with the help of the Context.startService method. The method will call the onCreate method of the service if service is not already created; else onStart method will be called. Here is the code:

Intent serviceIntent = new Intent();
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download