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

Support Android #1481

Open
leaanthony opened this issue Jun 22, 2022 · 35 comments
Open

Support Android #1481

leaanthony opened this issue Jun 22, 2022 · 35 comments
Labels
Enhancement New feature or request

Comments

@leaanthony
Copy link
Member

leaanthony commented Jun 22, 2022

We'd like to support Android as a build target

@leaanthony leaanthony added the Enhancement New feature or request label Jun 22, 2022
@leaanthony leaanthony modified the milestones: v2.2, v2.5.0 Jun 22, 2022
@baxiry
Copy link

baxiry commented Jun 24, 2022

Awesome!

@AlbinoDrought
Copy link
Contributor

(I'm just a random dude / not associated with the Wails project)

We're hacking on a new project using Wails. Depending on success, we're aiming for an eventual Android release.

To know that it's feasible, I've hacked together enough code so the default Wails template can run on Android. I haven't integrated it into wails build, so it requires a manual build process: https://github.com/AlbinoDrought/wails-android-test (changes licensed CC-0, go wild)

Here's a screenshot:
image

Here's some Logcat logs:

2022-09-10 20:26:08.595 24016-24107/? I/Wailsdroid: Request: GET wails://wails/
2022-09-10 20:26:08.606 24016-24107/? I/Wailsdroid: Response: HTTP 200 OK, text/html utf-8
2022-09-10 20:26:08.752 24016-24107/? I/Wailsdroid: Request: GET wails://wails/wails/ipc.js
2022-09-10 20:26:08.753 24016-24107/? I/Wailsdroid: Response: HTTP 200 OK, application/javascript 
2022-09-10 20:26:08.758 24016-24107/? I/Wailsdroid: Request: GET wails://wails/wails/runtime.js
2022-09-10 20:26:08.758 24016-24106/? I/Wailsdroid: Request: GET wails://wails/assets/index.ad5867ac.js
2022-09-10 20:26:08.759 24016-24102/? I/Wailsdroid: Request: GET wails://wails/assets/index.dbe33b87.css
2022-09-10 20:26:08.759 24016-24106/? I/Wailsdroid: Response: HTTP 200 OK, application/javascript 
2022-09-10 20:26:08.759 24016-24102/? I/Wailsdroid: Response: HTTP 200 OK, text/css utf-8
2022-09-10 20:26:08.764 24016-24107/? I/Wailsdroid: Response: HTTP 200 OK, application/javascript 
2022-09-10 20:26:08.872 24016-24180/? I/Wailsdroid: Received message: runtime:ready
2022-09-10 20:26:08.886 24016-24107/? I/Wailsdroid: Request: GET wails://wails/assets/nunito-v16-latin-regular.06f3af3f.woff2
2022-09-10 20:26:08.887 24016-24107/? I/Wailsdroid: Response: HTTP 200 OK, font/woff2 
2022-09-10 20:26:08.894 24016-24106/? I/Wailsdroid: Request: GET wails://wails/assets/logo-universal.cb3119ea.png
2022-09-10 20:26:08.895 24016-24106/? I/Wailsdroid: Response: HTTP 200 OK, image/png 
2022-09-10 20:26:23.221 24016-24180/? I/Wailsdroid: Received message: C{"name":"main.App.Greet","args":["AlbinoDrought"],"callbackID":"main.App.Greet-977632637"}

Cheers!

@leaanthony
Copy link
Member Author

Holy moley! This is amazing! Thanks so much - we will build on this post v2 release 🙏

@laoshaw
Copy link

laoshaw commented Oct 11, 2022

what about ios target? fyne.io can do them all, let's have the main platforms(windows,linux,macos, android,ios) all with wails if feasible.

@leaanthony
Copy link
Member Author

#1482

@laoshaw
Copy link

laoshaw commented Oct 23, 2022

in that case, flutter could be the way to do? for android and ios that is

@ibonny
Copy link

ibonny commented Oct 24, 2022

Unfourtunately, in my experience, Dart gets complicated, and NativeScript has issues. For simplicity, there is nothing like the combination of a frontend web framework for UI, and Go for all backend work. This is why Wails is a really good winning combination. Dart is good, but it can get very complicated when trying to write stateful UIs. Bundling all this together in an APK for Android would be great.

@laoshaw
Copy link

laoshaw commented Oct 24, 2022

I like wails and will wait for its android and ios support. in the meantime it seems flutter is the one most promising that covers the smartphone apps space.
looked into fyne before but I think wails desktop solution is better.

@waffle-lord
Copy link

This would be absolutely amazing to have and would make wails my one-stop-shop for application development. Trying to use Flutter right now for android and boy howdy is it annoying.

Hoping this makes the cut for wails v2 at some point

@laoshaw
Copy link

laoshaw commented Nov 16, 2022

wading into ios|android will be a very different and challenging task, you will have to call java-api or swift-api in the end to get all the juicy stuff from their ecosystems, golang will have to provide some bindings there, don't know how feasible this path will be.

@laoshaw
Copy link

laoshaw commented Dec 11, 2022

https://github.com/socketsupply/socket uses some clever way(json marshalling) to work with android and ios webviews, maybe Wails can borrow some ideas there to get mobile supported. yes it will lack some native api features, but it might be good enough for 90% user cases.

@leaanthony leaanthony removed this from the v2.5.0 milestone Dec 29, 2022
@fairking
Copy link

fairking commented Feb 2, 2023

FYI looks like tauri is heavily working on android support

edwargix added a commit to edwargix/web-to-desktop-framework-comparison that referenced this issue Feb 23, 2023
notably: the main author of wails created these issues, so they may in a sense
be "Planned", but I don't believe any code exists yet (other than the Android
PoC [0]) nor do the issues currently live in a milestone

[0]: <wailsapp/wails#1481 (comment)>
edwargix added a commit to edwargix/web-to-desktop-framework-comparison that referenced this issue Feb 23, 2023
notably: the main author of wails created these issues, so they may in a sense
be "Planned", but I don't believe any code exists yet (other than the Android
PoC [0]) nor do the issues currently live in a milestone

[0]: <wailsapp/wails#1481 (comment)>
Elanis pushed a commit to Elanis/web-to-desktop-framework-comparison that referenced this issue Feb 24, 2023
notably: the main author of wails created these issues, so they may in a sense
be "Planned", but I don't believe any code exists yet (other than the Android
PoC [0]) nor do the issues currently live in a milestone

[0]: <wailsapp/wails#1481 (comment)>
Elanis pushed a commit to Elanis/web-to-desktop-framework-comparison that referenced this issue Feb 24, 2023
notably: the main author of wails created these issues, so they may in a sense
be "Planned", but I don't believe any code exists yet (other than the Android
PoC [0]) nor do the issues currently live in a milestone

[0]: <wailsapp/wails#1481 (comment)>

+ Update stars & Fork
@srackhall
Copy link

It would be better for Wails to focus on desktop development, right? It seems that there’s not much necessity to support mobile development. After all, traditional hybrid solutions for mobile are already mature, and they don’t interfere with the combined use of Go. Therefore, instead of diverting energy to venture into mobile development, it would be more beneficial to concentrate on doing a good and thorough job with desktop development.

@leaanthony
Copy link
Member Author

Regarding demand, I think the reactions speak for themselves. Having said that, desktop will always be the primary focus

@fairking
Copy link

fairking commented Sep 21, 2023

If someone is interested there is an example of Linux Mobile (not Android): https://gitlab.com/dedSyn4ps3/wails-pinephone
Supported OS: Phosh, Plasma Mobile, Ubuntu Touch.

@baxiry
Copy link

baxiry commented Sep 21, 2023

Supporting mobile will add momentum to this project. It will be beneficial, even if indirectly.
The Wells project is beginning to approach stability, It will become possible to support new platforms

@ddkwork
Copy link

ddkwork commented Oct 19, 2023

Another way for build apk use

https://github.com/xlab/android-go

@PylotLight
Copy link
Contributor

Another way for build apk use

https://github.com/xlab/android-go

Given the lack of commit history on this one, I don't think it's a super viable option officially long term.

@ddkwork
Copy link

ddkwork commented Nov 1, 2023

find a gradle lib

https://github.com/bitrise-io/go-android/tree/master/gradle

@PylotLight
Copy link
Contributor

PylotLight commented Nov 1, 2023

find a gradle lib
https://github.com/bitrise-io/go-android/tree/master/gradle

Looks updated but with 0 documentation, do you know how to use/implement it?

@neoramos
Copy link

neoramos commented Dec 8, 2023

I'm currently evaluating Wails.
First thank you to those developing / supporting Wails.
It is really amazing what you have accomplished thus far.
Support for IOS and Android mobile apps would be fantastic.
As someone else mentioned in another comment, Wails would become my "one-stop shop" for GUI app development.

@leaanthony
Copy link
Member Author

Thanks for the kind words. We'd love to support mobile.

@gedw99
Copy link

gedw99 commented Mar 14, 2024

hey @leaanthony

there is a golang web view for iOS and android here. I used it ages ago and it worked ok.

https://github.com/gioui-plugins/gio-plugins/tree/add-signin/webviewer

I wish wails had mobile web views...

@leaanthony
Copy link
Member Author

Thanks! Why not join us on discord and we can talk about what's needed for doing it? All we need is someone to drive it.

@camstuart
Copy link

For mobile support, I wonder if capacitor is an option?
Use ionic framework ui components?

@PylotLight
Copy link
Contributor

The Tauri mobile integration doesn't look super complicated, something we can work with there in terms of "borrowing"?
https://github.com/tauri-apps/tauri/blob/dev/core/tauri/mobile/android/build.gradle.kts

@MikeyA-yo
Copy link

Hey friendly reminder, i'd be glad if it supports android

@PylotLight
Copy link
Contributor

Hey friendly reminder, i'd be glad if it supports android

Anyone with the skills or experience is welcome to contribute, the current limited time of maintainers is currently focused on other areas like getting v3 out the door.

@wailsapp wailsapp deleted a comment from fairking Oct 8, 2024
@gedw99
Copy link

gedw99 commented Oct 8, 2024

Thanks! Why not join us on discord and we can talk about what's needed for doing it? All we need is someone to drive it.

sorry @leaanthony I missed this.

Happy to meet with you via google meet, signal, etc

Booking Cal:

https://www.cal.com/gedw99

Signal:

https://signal.me/#eu/vgBESlcvaESbERk8FZvKoT8gTOxWwvoG2GbNlR789l4OYUmnMTtO1aiXhPiPK49t

@PylotLight
Copy link
Contributor

@gedw99 Community discussions are occurring on discord, so instead of trying to get a limited 1:1, it would be more convenient for everyone to keep the discussion public and localised to 1 platform.

@gedw99
Copy link

gedw99 commented Oct 8, 2024

@gedw99 Community discussions are occurring on discord, so instead of trying to get a limited 1:1, it would be more convenient for everyone to keep the discussion public and localised to 1 platform.

@leaanthony

from https://wails.io/docs/community/links

https://discord.com/invite/JDdSxwjhGf is dead for me at least.. Im on browser.

@omar2205
Copy link

omar2205 commented Oct 8, 2024

@gedw99 That invite link worked for me, I created one if it is still dead https://discord.gg/MGUSPY5c

@gedw99
Copy link

gedw99 commented Oct 8, 2024

@gedw99 That invite link worked for me, I created one if it is still dead https://discord.gg/MGUSPY5c

thanks.

Hmmm its will not connect to the browser version. I will not install their app.

funny because the links used to work into their web browser.

seriously... nuts. can we use GitHub Discussions ?

@leaanthony
Copy link
Member Author

DMed you in Discord 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

16 participants