[Android] How to restart service?

This is two lines of codes, I use to restart my Service class. First line will stop my service. Second line will start the service again.

stopService(new Intent(this, YourService.class));
startService(new Intent(this, YourService.class));


Popular posts from this blog

Fatal: LoadModule: error loading module 'mod_sql_mysql.c'

How to hide Android Soft Keyboard