android : How to know about a new process start in device?
I am writing a program which respond when a new process got start.
private final BroadcastReceiver mBatInfoReceiver = new BroadcastReceiver() {
@Override
public void onReceive(Context arg0开发者_Go百科, Intent intent) {
// what to write here
}
};
I do not know that what to write instead of comments to get processes info.
thanks.
You can't monitor process starts using a BroadcastReceiver. You should look at this: you would have to run it in a loop, but that's probably your best bet.
精彩评论