开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜