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

Does this library support Android? #741

Closed
Joe23232 opened this issue Feb 18, 2021 · 9 comments
Closed

Does this library support Android? #741

Joe23232 opened this issue Feb 18, 2021 · 9 comments
Labels
duplicate This issue or pull request already exists
Milestone

Comments

@Joe23232
Copy link

Hi does this crate support Android, if I were to use something like android-ndk-rs crate along with iced?

@13r0ck
Copy link
Member

13r0ck commented Feb 18, 2021

No. Mobile is planned in the FAR future

@Joe23232
Copy link
Author

I am a little new to Rust so I am apologise in advance if I do not understand, but like if I am using android-ndk-rs crate which allows me to use the API of Android, am I not able to use this crate still and to get it to display on the screen?

@13r0ck
Copy link
Member

13r0ck commented Feb 19, 2021

No worries! Welcome to rust!
I wish it worked that way, but unfortunately no.
You have the order flipped a bit. Iced is not visual widgets that are fed into a visual framework. Iced abstracts the windows/linux/web visual frameworks into widgets.
For iced to work on android it would have to be re-written to call the Android APIs to build the widgets.
It is totally possible, but would require a re-write of the foundation of Iced.

Rust still early days when it comes to UI programming.
The most up to date list is kept here:
https://www.areweguiyet.com/

@Joe23232
Copy link
Author

Joe23232 commented Feb 19, 2021

No worries! Welcome to rust!

Thanks mate :)

I wish it worked that way, but unfortunately no.

That's a shame :(

You have the order flipped a bit. Iced is not visual widgets that are fed into a visual framework. Iced abstracts the windows/linux/web visual frameworks into widgets.
For iced to work on android it would have to be re-written to call the Android APIs to build the widgets.

I see mate.

It is totally possible, but would require a re-write of the foundation of Iced.

I hope it soon comes to Android, would love to use it =D

It is totally possible, but would require a re-write of the foundation of Iced.

Rust still early days when it comes to UI programming.
The most up to date list is kept here:
https://www.areweguiyet.com/

Would you happen to know another easy to use GUI crate (like this one) but it supports Windows as well as Android?

@Kaiden42
Copy link
Contributor

For iced to work on android it would have to be re-written to call the Android APIs to build the widgets.

As far as I know only partial. Iced is rendering the GUI using some Renderes like wgpu or glow in a windowing shell like winit or glutin. Both winit and glutin are developed by the same devs like android-ndk-rs and could technically work on android (never tried it so I can not gurantee that it works). But having the foundations to support android is only half the step. Iced itself needs to sopport it too. For example: The textinput would need to call the android api to open up the virtual keyboard.
So for short - rendering of the GUI could work already - interacting with it only partial (touch input should work).

@Joe23232
Copy link
Author

I see, interesting, is there like an issue that is created where they are currently trying to have better support for Android if you happen to know?

@13r0ck
Copy link
Member

13r0ck commented Feb 19, 2021

I see, interesting, is there like an issue that is created where they are currently trying to have better support for Android if you happen to know?

There is #302, mobile support is a LONG way away. It isn't even on the road map. Being realistic well over a year away from even alpha level functionality.

I am not aware of any rust crates for windows + android UI dev. I'm sure there will be eventually, but at this point the best way to do that and still write some Rust code would be Rust as a backend with JS + Electron + React Native for the UI..

You asked for an easy crate for an easy crate for windows + android dev UI dev. As far as I'm aware there is no easy way to do that in any language... I wish you luck!

@Joe23232
Copy link
Author

Thanks mate :)

@hecrj
Copy link
Member

hecrj commented Feb 27, 2021

Let's keep the discussion in #302 for now.

@hecrj hecrj closed this as completed Feb 27, 2021
@hecrj hecrj added the duplicate This issue or pull request already exists label Feb 27, 2021
@hecrj hecrj added this to the 0.3.0 milestone Feb 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

4 participants