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

x/mobile: support for aab format #50371

Closed
Lallassu opened this issue Dec 28, 2021 · 5 comments
Closed

x/mobile: support for aab format #50371

Lallassu opened this issue Dec 28, 2021 · 5 comments
Labels
FrozenDueToAge mobile Android, iOS, and x/mobile pkgsite
Milestone

Comments

@Lallassu
Copy link

To build and publish to Playstore for Android it is now required to have aab format instead of the current apk format. Gomobile currently outputs in the apk format.

Is this in the pipeline or anyone knows of a workaround for generating aab package from a gomobile build?

@gopherbot gopherbot added the mobile Android, iOS, and x/mobile label Dec 28, 2021
@gopherbot gopherbot added this to the Unreleased milestone Dec 28, 2021
@ericlagergren
Copy link
Contributor

At work, we have a small "wrapper" Android application that simply uses the contents of the APK. Our build step extracts the JNI libraries, etc. We then build AABs like normal.

It's a little more work, but we don't have to depend on gomobile for anything except code generation.

@Lallassu
Copy link
Author

@ericlagergren thanks for the input. Can you explain a bit more in detail how that is done?

My gomobile build produces the apk that contains both my shared object (.so) and my openal.so file (and assets of course). Then a dex file. Do I understand you correctly that you have written a wrapper in java that acts as an "entry-point" that then uses the so files? Are you implementing your own event handler that then calls different functions in the shared library, for draw, touchetc?

Any pointers/links would be much appreciated. Meanwhile, I will try out some google-fu.

@Lallassu
Copy link
Author

I managed to make it work by building .so files of my project and OpenAL (requires some mod of cmake files and gomobile cmd). Then use these with a new Android Studio project where I copied the GoNativeActivity.java as the entry point. Then I manage to build the AAB bundle from Android Studio.

@Splizard
Copy link

I think this issue should be reopened, gomobile is still going to need support for .aab to support android.

@Lallassu
Copy link
Author

I've released my android game open sourced where I also describe how to build aab packages and OpenAL.

Http://github.com/lallassu/bintris

@golang golang locked and limited conversation to collaborators Jan 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge mobile Android, iOS, and x/mobile pkgsite
Projects
None yet
Development

No branches or pull requests

4 participants