Simulate low battery & low memory in Android

后端 未结 6 2067
佛祖请我去吃肉
佛祖请我去吃肉 2020-11-27 03:23

In order to generate the notifications i need to know about how to generate the low battery and low memory interrupts programmatically. Can any one please provide your sugge

6条回答
  •  北荒
    北荒 (楼主)
    2020-11-27 03:47

    Low memory can also be simulated using Background process limit under the device developer options.

    Go to Settings > Developer options. Under the app section change the Background process limit to No background processes

    Now your activity will be killed every time you switch to another app. Useful for testing state saving and state restoration.

提交回复
热议问题