Click here to Skip to main content
15,885,366 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi I want Start Service when first time application start and activity class load first time at that time call service.How it possible?
Posted
Comments
Rajesh Anuhya 21-Jun-13 5:42am    
No effort

you want to start Windows Services?

1. You revoke services in your code (in the first time)<br />
<br />
2. Run next time (check status of the service.)<br />
   2.1. If service have "started" status ==> ignore<br />
   2.2. if stopped ==> start service


In .Net we can work with windows services easy.

Hope that is useful for you

Trong Anh
 
Share this answer
 
v2
System.ServiceProcess May helps you, go through the below CP link
Using the ServiceController in C# to stop and start a service[^]

Thanks
--RA
 
Share this answer
 
Comments
Patel Rajesh 21-Jun-13 7:07am    
sorry but Above task is perform into Android Application ,not into .Net
Anh Nguyen Trong 22-Jun-13 14:55pm    
Sory, i dont see the category of question that you post .

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900