How to get main applicationId inside code in the library module?

前端 未结 1 1490
忘了有多久
忘了有多久 2021-01-19 08:07

I have library module where I\'d like to starService through Intent(String). When I set:

Intent intent1 = new Intent(BuildConfig.APPLICATION_ID + \".REFRESH_         


        
相关标签:
1条回答
  • 2021-01-19 08:49

    Just use context.getPackageName().

    https://developer.android.com/studio/build/application-id#change_the_package_name

    0 讨论(0)
提交回复
热议问题