Is there a way to create a service to track my activity class and restart it after a crash? Please note that I CAN NOT use the uncaughthandlers thread method to restart my application. My application should crash, do not worry about this part. My application is something simple like this
private class AudioRenderer extends Activity { private MediaPlayer AudioRenderer(String filePath) { File location = new File(filePath); Uri path = Uri.fromFile(location); mp= MediaPlayer.create(this, path); } return mp }
As soon as this happens, the service listening in the background will automatically restart my application. Does anyone know how this is possible? Thanks!
source share