Skip to content
This repository has been archived by the owner on Mar 31, 2021. It is now read-only.

Android_API_Support

Berkus Decker edited this page Apr 1, 2017 · 1 revision

If your apk is required to support Android devices with android:minSdkVersion>=14, and the chat SDK is set to require android:minSdkVersion=19 which generates conflicts in your integration.

The following shall help you with caveats (see below):

Chat SDK supports devices API 14 and above with small limitations. You will need to force-override API version in your manifest but you do it at your own risk, we do not provide support if things break in this case.

The way to override the SDK level is like this:

<uses-sdk
     android:minSdkVersion="14"
     android:targetSdkVersion="23"
     tools:overrideLibrary="com.twilio.chat"
     />

Add this in your AndroidManifest.xml inside manifest tag.

The reason for this is we use ReLinker, which is something that ensures native libs load correctly. We have not seen an issue if you go back to 14 but, it might cause some errors.

Quote from ReLinker docs about the issues it tries to solve:

The Android PackageManager's native library loading is unreliable. Occasionally when using native libraries, you will encounter a stack trace like this:

java.lang.UnsatisfiedLinkError: Couldn't load stlport_shared from loader dalvik.system.PathClassLoader: findLibrary returned null
at java.lang.Runtime.loadLibrary(Runtime.java:365)
at java.lang.System.loadLibrary(System.java:535)
at com.your.app.NativeClass.<clinit>(Native.java:16)
... 63 more

Caused by: java.lang.UnsatisfiedLinkError: Library stlport_shared not found
at java.lang.Runtime.loadLibrary(Runtime.java:461)
at java.lang.System.loadLibrary(System.java:557)
at com.your.app.NativeClass.<clinit>(Native.java:16)
... 5 more

ReLinker fixes these issues by replacing the standard System.loadLibrary call with a more reliable implementation.

Note that this library fixes intermittent link errors; if you get an error every time you use your app, you may have a configuration issue. See this StackOverflow question for more information.

Clone this wiki locally