tags:

views:

28

answers:

0

i am writing an app with a feature like "press a hotkey or shake the phone and terminate current application".

for example,when i am using a web browser and then shake the phone, the web browser will be killed.

so i need to get the current application information(app name,package name,or something) from a service.

how can i do that.

i have looked the ActivityManager but cant find a way.