1
public class MainService extends Service {

@Nullable
@Override
public IBinder onBind(Intent intent) {
    return null;
}
public int onStartCommand(Intent intent, int flags, int startId){
   // handleCommand(intent);
return START_STICKY;
}

public void onCreate() {
    super.onCreate();

    new CaptureLocation(MainService.this);
    new GenerateStamp(MainService.this);
    new DistanceCompute(MainService.this);
    new GenerateStamps2(MainService.this);
    new GenerateACDC(MainService.this);
}

} 

This is java code i have written for android , as we know android service runs in background for long time and it works well on all android phones i.e Lenovo, Samsung, Redmi, LYF water Jio etc except Oppo.I have enabled it for autostart up, still it is not working.

1 Answers1

0

battery->othersApp->Application-> Disa Freez when in background