Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Provide a fallback method to load the native library #10154

Merged
merged 2 commits into from
Oct 9, 2017

Conversation

zugaldia
Copy link
Member

@zugaldia zugaldia commented Oct 6, 2017

This PR enables LibraryLoader to provide an alternative location for the native library. This location, in the app's internal storage, is exposed via a new getLibraryLocation() method.

Note that this new codepath doesn't change the current behavior: System.loadLibrary() continues to be the default and preferred way to load libmapbox-gl.so.

@zugaldia zugaldia requested a review from tobrun October 6, 2017 20:57
*/
public static void load() {
System.loadLibrary("mapbox-gl");
public static void load(Context context) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we could keep the signature of this the same if we replace the context below with Mapbox.getApplicationContext()?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea. I did that with 1d4c675, I'll merge it once CI gives the blessing.

@tobrun tobrun added the Android Mapbox Maps SDK for Android label Oct 9, 2017
@tobrun tobrun added this to the android-v5.2.0 milestone Oct 9, 2017
@zugaldia zugaldia merged commit a1aed6f into release-agua Oct 9, 2017
@zugaldia zugaldia deleted the az-light-agua branch October 9, 2017 14:07
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Android Mapbox Maps SDK for Android
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants