Simulate low battery & low memory in Android

后端 未结 6 2062
佛祖请我去吃肉
佛祖请我去吃肉 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:46

    On the Android Emulator you can set the power status by connecting to the Emulator console and using the power command.

    As far as low memory goes, you just need to make sure that your application can handle being killed without warning when it is in the background. Testing this is one of the very few cases that actually call for a Task Manager on Android, or if you're running Android 2.2 you can kill applications via Settings.

    There are ways of reducing the memory available to applications but I think they're unnecessary.

提交回复
热议问题