SlashJ
SlashJ

Reputation: 807

Xamarin Android loading .so dynamically

In a project, i have a .NET wrapper that use a .so build as a AndroidNativeLibrary.

Since the .so add a lot of weight to the APK(several MB), and that the features found in the .so library will not be used in all installations of the application, i was wondering if it is possible to dynamically load the .so from the sdcard for example?

What would be my other options, beside maintaining two versions of my application?

Thanks in advance!

Upvotes: 0

Views: 230

Answers (1)

SushiHangover
SushiHangover

Reputation: 74174

The short answer is No.

Starting with Android N Google is changing the way shared library are accessed due to security (and app versioning). Consult the NDK link below for full details.

Your app references a library that is not included in its APK. For example, this could happen if you tried to use your own copy of OpenSSL but forgot to bundle it with your app's APK

Ref https://developer.android.com/preview/behavior-changes.html#ndk

Ref: https://releases.xamarin.com/beta-release-cycle-7-service-release-1/

Upvotes: 2

Related Questions