We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
public class MainActivity extends Activity implements View.OnClickListener {
private TextView mKillService, mStartService; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); mKillService = (TextView) findViewById(R.id.kill_service); mStartService = (TextView) findViewById(R.id.start_service); mKillService.setOnClickListener(this); mStartService.setOnClickListener(this); WorkService.startService(this); } @Override public void onClick(View view) { switch (view.getId()) { case R.id.kill_service: KeepAliveManager.INSTANCE.stopKeepAliveSerice(MainActivity.this); break; case R.id.start_service: KeepAliveManager.INSTANCE.startKeepAliveService(MainActivity.this); break; } }
}
The text was updated successfully, but these errors were encountered:
already fixed.
Sorry, something went wrong.
大神,我运行你的demo还是能被杀死,我直接杀死进程的,魅族6.0
直接杀死什么进程,保活的是WorkService,不是demo,你把demo干死了是不可以的,Android的底层机制。
No branches or pull requests
public class MainActivity extends Activity implements View.OnClickListener {
}
The text was updated successfully, but these errors were encountered: