Is there a way to get current process name in Android

后端 未结 11 1818
-上瘾入骨i
-上瘾入骨i 2020-12-03 00:59

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:onC

11条回答
  •  一个人的身影
    2020-12-03 01:32

    Since Android Pie (SDK v28), there is actually an official method for this in the Application class:

    public static String getProcessName ()

    See the docs

提交回复
热议问题