How can I get package name in android?

后端 未结 9 1348
耶瑟儿~
耶瑟儿~ 2020-12-11 05:14

I need to write some util class by myself and I need the packagename of android app. While I found the packageManager which only can be used in Activity and so on that has c

9条回答
  •  长情又很酷
    2020-12-11 05:30

    The following constant is available without the need for a context.

    BuildConfig.APPLICATION_ID
    

提交回复
热议问题