-
-
Notifications
You must be signed in to change notification settings - Fork 442
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using custom sentry-native library with Android SDK #1626
Comments
@triplef I might be wrong here and @Swatinem can call em out but assuming all there is to it is compiling with the Qt flags, it's probably fine to just replace the sentry-java/sentry-android-ndk/CMakeLists.txt Lines 1 to 17 in 82dbee6
You could possibly fork this repo, change the |
Thank you for the quick input on this @bruno-garcia! This sounds like it should work fine, but I'd like to see if there's a way we can keep using the official builds of the Android SDK to keep things simple. I'm not entirely clear on how linking works with AABs, but would it work to keep using the Android SDK from Maven Central and just link our Qt project against a self-built sentry-native.so with Qt support? We already extracted the native library from the AAB in order to call functions from sentry-native from our native code, so it would be easy to just replace that with a custom build, but I'm unsure which library the linker would end up using. |
I believe this will require linking against Qt libraries, so that wouldn’t work for the default case, unless there was a way to resolve these symbols at runtime if available. It would definitely be nice if the Android SDK were to support Qt out of the box. |
last case a pre-compiled package would work too, like |
As @triplef mentioned, building for Qt by default would mean that the Qt libraries are required at runtime so that is not the way to go. If you want to continue using the pre-build/packaged version of sentry-native, you can do so, and just vendor/copy-paste the integration into your own code. It is super tiny, and does not depend on any sentry-native internals. All the integration does right now is capture Qt logs as sentry breadcrumbs. |
Ah nice, that seems like the most straightforward solution. Thank you @Swatinem! |
Our Android app uses both Java and native C/C++ code with Qt, and we’d like to take advantage of the optional Qt integration in sentry-native, which is not enabled for the sentry-native library bundled with the Sentry Android SDK from Maven Central.
Is it possible to use a self-compiled sentry-native library in combination with the sentry-android SDK?
The text was updated successfully, but these errors were encountered: