I have library module where I'd like to starService through Intent(String). When I set:
Intent intent1 = new Intent(BuildConfig.APPLICATION_ID + ".REFRESH_DATA");
My BuildConfig.APPLICATION_ID is a library package. I need a variable in my code which will be populated with the main app package.
Just use context.getPackageName().
https://developer.android.com/studio/build/application-id#change_the_package_name
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With