Skip to content
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

Correct method to stop offline pack download #1156

Closed
stephenheron opened this issue Apr 4, 2018 · 1 comment
Closed

Correct method to stop offline pack download #1156

stephenheron opened this issue Apr 4, 2018 · 1 comment

Comments

@stephenheron
Copy link

Hi,

What is the correct way to stop an in progress offline pack download?

I am currently calling MapboxGL.offlineManager.deletePack and that seems to do the trick however I am getting a error that crops up on Android: void abort_message(const char *, ...): assertion "terminating with uncaught exception of type std::runtime_error: Malformed offline region definition" failed

Strangely if I wrap the MapboxGL.offlineManager.deletePack call in a setTimeout it seems happier however that seems a bit odd.

The only other reference to this error was one that I found in this issue. mapbox/mapbox-gl-native#9858. That issue however looks to be fixed.

I noticed in the Android RCTMGLOfflineModule.java class there is a pausePackDownload so I tried to use that and then delete the pack but still go that strange C++ error.

Thanks,
Stephen

@nitaliano
Copy link
Owner

@stephenheron check out this example https://github.com/mapbox/react-native-mapbox-gl/blob/master/example/src/components/CreateOfflineRegion.js#L111 there is an actual pack object that contains methods resume and pause

mfazekas pushed a commit to mfazekas/maps that referenced this issue Mar 12, 2022
…no#1156)

Bumps [@types/react-native](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react-native) from 0.62.18 to 0.63.45.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react-native)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants