tags:

views:

121

answers:

1

Hi, 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 suggestions.I am aware of Intents.

A: 

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.

Dave Webb
Hi Dave Webb, I want to do it programmatically to show an low battery alert even though it is not.
Hi Dave Webb, In emulator its ok. But how can i do the same in real device..?
There isn't a way to make a phone show a low battery alert when the battery is not low.
Dave Webb