I have a project in Android Studio with two modules, say Module1 and Module2 with the dynamic generation of many products using configuration files. Module2 is a library associated with Module1 . I also compiled a third-party library (AltBeacons). The third-party lib declares permissions for BLUETOOTH and BLUETOOTH_ADMIN , but I donβt want to use functions that need these permissions in every taste (just for one for sure) and cannot exit lib due to dependencies due to the fact that my Application is a descendant uses it and is displayed as the parent for another class, which is used in all cases. This way, I can get permissions from the configuration files and declare them in the Module2 manifest for merging later, but a third-party library provides its permissions in all cases. I tried merging attributes, but no luck. Here is my main part of the manifest where I tried to solve the problem:
<uses-permission android:name="android.permission.BLUETOOTH" tools:node="remove" tools:selector="org.altbeacon.beacon" /> <uses-permission android:name="android.permission.BLUETOOTH_ADMIN" tools:node="remove" tools:selector="org.altbeacon.beacon" />
where "org.altbeacon.beacon" is the 3rd member . The resulting manifest includes permissions in all cases. If you delete the declaration "tools: selector", then the specified permissions do not come from all libraries, but I need them if they are obtained from my Module2 . Please help me!
source share