How to get Android application id?

后端 未结 13 608
失恋的感觉
失恋的感觉 2020-12-07 18:26

In Android, how do I get the application\'s id programatically (or by some other method), and how can I communicate with other applications using that id?

13条回答
  •  有刺的猬
    2020-12-07 18:49

    For getting AppId (or package name, how some says), just call this:

    But be sure that you importing BuildConfig with your app id packages path

    BuildConfig.APPLICATION_ID 
    

提交回复
热议问题