maplibre-rs icon indicating copy to clipboard operation
maplibre-rs copied to clipboard

Postponed: Experimentally render to an Android surface

Open maxammann opened this issue 3 years ago • 7 comments

Thanks @MarijnS95 for making this possible! This PR experimentally renders to a surface on android: https://github.com/rust-windowing/android-ndk-rs/pull/272

💻 Examples

🚨 Test instructions

✔️ PR Todo

  • [ ] Included links to related issues/PRs

maxammann avatar May 13 '22 09:05 maxammann

Whoops!

Updating git repository `[https://github.com/rust-windowing/android-ndk-rs.git`](https://github.com/rust-windowing/android-ndk-rs.git%60)
error: failed to get `ndk` as a dependency of package `maplibre-android v0.1.0 (/home/runner/work/maplibre-rs/maplibre-rs/android)`

Caused by:
  failed to load source for dependency `ndk`

Caused by:
  Unable to update https://github.com/rust-windowing/android-ndk-rs.git?branch=native-window-jni-surface

Caused by:
  failed to find branch `native-window-jni-surface`

Caused by:
  cannot locate remote-tracking branch 'origin/native-window-jni-surface'; class=Reference (4); code=NotFound (-3)

The branch disappeared because the PR - and the one adding HasRawWindowHandle - have both been merged :tada:! You should be able to use a rev from master now which won't disappear.

MarijnS95 avatar May 23 '22 19:05 MarijnS95

Whoops!

Updating git repository `[https://github.com/rust-windowing/android-ndk-rs.git`](https://github.com/rust-windowing/android-ndk-rs.git%60)
error: failed to get `ndk` as a dependency of package `maplibre-android v0.1.0 (/home/runner/work/maplibre-rs/maplibre-rs/android)`

Caused by:
  failed to load source for dependency `ndk`

Caused by:
  Unable to update https://github.com/rust-windowing/android-ndk-rs.git?branch=native-window-jni-surface

Caused by:
  failed to find branch `native-window-jni-surface`

Caused by:
  cannot locate remote-tracking branch 'origin/native-window-jni-surface'; class=Reference (4); code=NotFound (-3)

The branch disappeared because the PR - and the one adding HasRawWindowHandle - have both been merged tada! You should be able to use a rev from master now which won't disappear.

Thank you! I think I'll actually wait with this until a new release is deployed :) else we can not publish to crates.io :)

maxammann avatar May 25 '22 17:05 maxammann

That'll take a while... :(

MarijnS95 avatar May 25 '22 17:05 MarijnS95

Pinging back to #53, I couldn't find this PR from there :)

MarijnS95 avatar May 27 '22 09:05 MarijnS95

That'll take a while... :(

Everything below 1-2 months is fine I think :) this poc is enough for now. It wont be usable until input is working for android

maxammann avatar May 27 '22 17:05 maxammann

I don't know what the cadence for winit is going to be, which I want to synchronize the next breaking release with. We could also have a breaking release earlier if folks are actively blocking on it, but I've previously received complaints about doing lots of breaking releases in short succession (for usually minor breaking changes in isolated parts of a crate). In this specific case I'm planning ahead some breaking changes that affect both winit and ndk so I'd like to prevent doing a release before that is over (pending exactly another breaking release in short succession). In addition people like to keep their stuff up to date, and it's annoying if they see a new ndk update but then can't upgrade because that breaks or results in duplicate dependencies with winit.

But again, let me know if/when you start depending on a release and we'll see what we can do!

MarijnS95 avatar May 27 '22 22:05 MarijnS95

Alright! So I think right now its no problem to depend on main as we have not even an unstable release. I'll continue to work on this with very low priority though as the changes are quite isolated.

maxammann avatar May 29 '22 12:05 maxammann