Android – how do I send applications to the background?
•
Android
How do I send my application to the background code? How do I capture events when I press the home key?
Thank you.
resolvent:
Intent i = new Intent();
i.setAction(Intent.ACTION_MAIN);
i.addCategory(Intent.CATEGORY_HOME);
this.startActivity(i);
Home key events cannot be captured as Android security features
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码