How can I get the application ID from the application using my library using gradle?
Or any way to put it inside a xml file.
How can I get the application ID from the application using my library using gradle?
Or any way to put it inside a xml file.
You want to get Your App id that defined in gradle then it is
BuildConfig.APPLICATION_ID
or You can get it
Context.getPackageName()
Only Android application project can contain the applicationId
property in app build.gradle
file.
Android Library project must not contain the applicationId
property in app build.gradle
file. so there is no way to retrieve the application id from the library.