1. You can declare permissions on the activity to ensure that you only have certain permissions when entering an activity
<manifest> <activity android:name="...." android:permission=”com.google.socialapp.permission.SHARE_POST” />
2. Life cycle flowchart
The possibility of the system terminating the process | Process status | Activity status |
---|---|---|
small | Front desk (own or have focus) | Created, started, restored |
in | Backstage (lost focus) | Paused |
Big | Background (not visible) | stopped |
air | Destroyed |