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

Mono/C# support on Android #20267

Open
akien-mga opened this Issue Jul 19, 2018 · 8 comments

Comments

Projects
None yet
8 participants
@akien-mga
Copy link
Member

commented Jul 19, 2018

We lacked an issue to keep track of Android export support for Mono/C# projects, so here's one.

@neikeq What are the needed steps to get this to work?

@exts

This comment has been minimized.

Copy link
Contributor

commented Jul 19, 2018

I know @hpvb on discord said he'd be looking into the android stuff. Maybe he can chim in some.

@aaronfranke

This comment has been minimized.

Copy link
Contributor

commented Jul 19, 2018

This applies to iOS too but I'll just post this here for now since we'd likely focus on Android first. The only framework I'm aware of for creating mobile apps using Mono/C# is Xamarin. Unfortunately, these tools are not available for Linux, which is problematic for if we want to make use of them since Godot is a strongly multiplatform game engine. I submitted a feature request here: mono/monodevelop#5228

For Android specifically, I also found this https://github.com/xamarin/xamarin-android

We may be able to use Mono separately from Xamarin on Android and iOS, but it would still be good to have Xamarin working on Linux, to ensure that the underlying tech (Mono) works properly.

@akien-mga

This comment has been minimized.

Copy link
Member Author

commented Jul 19, 2018

This applies to iOS too but I'll just post this here for now since we'd likely focus on Android first. The only framework I'm aware of for creating mobile apps using Mono/C# is Xamarin.

Well, isn't Godot itself a framework for creating mobile apps using Mono/C# already? We can build Windows apps from Linux with Godot + Mono (i.e. the Linux-compiled C# assemblies work on Windows), so it should work the same for Android, no?

IINM, we just need to find how to include the assemblies in the APK and load them from there - and of course compile the Android export templates with the Mono module, but that shouldn't be hard. (I might miss something specific to non-desktop platforms that would require us to go through a thirdparty framework though).

@dunyakilavuz

This comment has been minimized.

Copy link

commented Jul 25, 2018

Since #19839 is closed, forwarding my question.
Is there any rough estimations for android exporting functionality?

@neikeq

This comment has been minimized.

Copy link
Member

commented Jul 25, 2018

I will talk about this once 3.1 stable is out.

@DavidJVitale

This comment has been minimized.

Copy link

commented Dec 6, 2018

Although all the official documentation I'm reading on the subject says that Xamarin.Android isn't officially supported on Linux, I've noticed that their repository has instructions for manually building the bindings on Linux, and their CI/CD system even has automatic builds for Ubuntu set up (with the builds occasionally passing). So it looks like it's theoretically possible to hack something together: although I'm not sure that would be a smart long-term solution. Just making sure this information is known.

@migueldeicaza

This comment has been minimized.

Copy link

commented Feb 6, 2019

We will be happy to make sure that we can produce Xamarin.Android packages from our CI that are suitable for your consumption. We are trying to setup a communications channel between the Godot folks and my team to make sure we are not blocking you.

While you can certainly produce Android packages natively, I would love to see this use Xamarin.Android, mostly because we productize the latter and can provide support to any users that are running into problems. And it would be the same on Windows, Mac and Linux.

But most importantly, because then your C# users could call and consume any native APIs from Android without having to use some sort of module, they can access the entire Android API from C# when they so desire.

@akien-mga

This comment has been minimized.

Copy link
Member Author

commented Feb 27, 2019

From what I've heard @neikeq and @hpvb are pretty close to get things running on Android, but there's still some work to do. Probably won't make it in time for 3.1.0, but should hopefully be done shortly after and backported to 3.1.x releases.

@akien-mga akien-mga modified the milestones: 3.1, 3.2 Feb 27, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.