Rick Li Rick Li -4 years ago 174
Android Question

Is there a way to get current process name in Android

I set an Android:process=":XX" for my particular activity to make it run in a separate process.
However when the new activity/process init, it will call my Application:onCreate() which contains some application level initialization.

I'm thinking of avoiding duplication initialization by checking current process name.

So is there an API available?

Thanks.

Answer Source

If I've understood your question correctly, you should be able to use ActivityManager, as per this thread.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download