You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When trying to install both a beta and debug version of FlorisBoard, the package manager of Android will reject the install because the authority is equal.
adb: failed to install /data/florisboard/$releases/florisboard-0.3.10-beta04.apk:
Failure [INSTALL_FAILED_CONFLICTING_PROVIDER: Scanning Failed.:
Can't install because provider name dev.patrickgold.florisboard.provider.clip
(in package dev.patrickgold.florisboard.beta) is already used by dev.patrickgold.florisboard.debug]
@X-yl As you've implemented the clipboard manager and its content provider, do you know if the authority can be dynamic based on the package name (each track has a different package name, which could be used to prevent this conflict)?
Environment information
FlorisBoard Version: 0.3.10-beta04 / 0.3.10-debug
Install Source: ADB
Device: OnePlus 7T
Android version, ROM: 10
The text was updated successfully, but these errors were encountered:
Yes, it's possible (and fairly straightforward, thankfully). Just change the manifest so that dev.patrickgold.florisboard is replaced with ${applicationId}. Gradle will change it to the correct package name based on the build configuration. In fact I think you should probably be doing that for every mention of the package in the manifest.
Ah I see thanks for the tip with the gradle variable! What I find funny is that Android has a system for uniquely identifying multiple equally named IME services but can't do this for content providers... (Edit: it does this because the syntax for full IME service names is packageName/imeName, which thus allows for multiple equally named imeNames.)
Anyways, I think I will make this change and also experiment where it makes sense to also use ${applicationId} instead of the hardcoded package name. Thanks for pointing me in the right direction!
Glad I could help :) What I find strange about Android development (or maybe it's just Java's fault) is that somehow the standard library is both massive and incomplete. There's always some convenient function to achieve some silly niche functionality, but it's impossible to copy from an OutputStream to an InputStream lol.
Above commit fixes the authority clash with the content provider. I also made sure to edit the AUTHORITY constant in the Kotlin source code and tried it out by copying images, and I experienced no issues whatsoever.
As for other usages of ${applicationId}: There's not really another good use case for this in the manifest, as the class names are always the package name without suffixes (because that's what they get compiled with), so I left the other package names untouched.
When trying to install both a beta and debug version of FlorisBoard, the package manager of Android will reject the install because the authority is equal.
@X-yl As you've implemented the clipboard manager and its content provider, do you know if the authority can be dynamic based on the package name (each track has a different package name, which could be used to prevent this conflict)?
Environment information
The text was updated successfully, but these errors were encountered: