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

OfflineManager.ListOfflineRegionsCallback doesn't work #10470

Closed
rakuishi opened this issue Nov 15, 2017 · 3 comments · Fixed by #10531
Closed

OfflineManager.ListOfflineRegionsCallback doesn't work #10470

rakuishi opened this issue Nov 15, 2017 · 3 comments · Fixed by #10531
Labels
Android Mapbox Maps SDK for Android

Comments

@rakuishi
Copy link

rakuishi commented Nov 15, 2017

Platform: Android
Mapbox SDK version: 5.2.0-beta.3

I made a sample project which can reproduce a below bug.
https://github.com/rakuishi/mapbox-gl-native-issue

I think OfflineManager depends on MapView's lifecycle.
Because, after removing mapView.onStop(), callback works fine.

Steps to trigger behavior

  1. Launch MainActivity which it has a MapView.
  2. Launch Main2Activity from MainActivity.
  3. Then, call OfflineManager.getInstance(context).listOfflineRegions() by a touch event, but it's callback(OfflineManager.ListOfflineRegionsCallback) doesn't work.

Expected behavior

  • OfflineManager.getInstance(context).listOfflineRegions() works correctly.

Actual behavior

  • OfflineManager.getInstance(context).listOfflineRegions() doesn't work.
@fabian-guerra fabian-guerra added the Android Mapbox Maps SDK for Android label Nov 15, 2017
@rakuishi
Copy link
Author

Additional Information.

Callback works fine, when I put FileSource.getInstance().activate() and FileSource.getInstance().deactivate()on MainActivity2's onStart() and onStop.

@tobrun tobrun added this to the android-v5.2.1 milestone Nov 20, 2017
@tobrun
Copy link
Member

tobrun commented Nov 22, 2017

@rakuishi thank you for the write up, we were indeed missing a activate/deactivate call as part of OfflineManager#listOfflineRegions().

@rakuishi
Copy link
Author

@tobrun thank you, too!

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 a pull request may close this issue.

3 participants