-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Android/iOS stability and scalability? #1602
Comments
@angelsix said: |
Avalonia is just reaching a point where a few commercial projects are starting to adopt. We are now at a stage where we are in Beta and there are a few bugs, but on the whole the UI framework is stable and useable for all kinds of projects on the Desktop. @kekekeks can provide more information regarding IOS / Android, although I believe these compile to .NET assemblies, with some .net runtime stuff need to make it run. The rendering is native rendering, we use Direct2D /Skia on Windows, on Linux with use Skia, on Mac we use MonoMac (I think) we use GTK for window management on those platforms too. Avalonia provides real applications (not a web browser pretending to be an app). Avalonia is most closely related to WPF, then UWP, it uses lookless templated controls, so its a truly cross platform UI. You can achieve the exact same UI on all platforms, obviously you can customize UI to a specific platform too. We don't use native controls, although some work has been done to allow embedding native controls on some platforms. Regarding Mobile specific features, you can just use our UI with the Xamarin libraries or the native platform libraries directly for this kind of stuff. Our mobile 'backends' as we call them are a little behind the Desktop, as we have fewer people contributing in that area, and are kind of considered experimental / alpha, whereas desktop apps are pretty much stable now. It wouldn't take much to get the mobile backends up to scratch though, we mainly just need to add proper touch integration (we currently only have mouse pointers in the framework). We would love to hear your feedback and it would be awesome to see a tutorial video on Avalonia from you at some stage if you wanted I could help get you started. BTW I really like your WPF tutorial videos they are really high quality, I will start sending people there that come here with MVVM getting started type questions :) |
Cool thanks for the feedback. It sounds promising and perhaps something to finally bring not just desktop but mobile into one unified place. It has huge potential if done right and it was something I was going to make it nobody else did within the next year (I was holding out for MS to do it, and purchasing Xamarin was the first step in that direction). However, I see you have been working on this for a while now and it looks very nice and a lot of advanced and user-friendly features. I will likely look at this in my spare time to get comfortable and a feel for it and if it seems good probably make a real simple application that will run on all 5 platforms and then if that works do videos on it. Pretty exciting stuff, keep up the good work |
We tried out the ControlCatalog on both Android and iOS. Apart from making a quick fix for #2228 we also had to add ReactiveUI to the startup projects and change the target version to 8.0 in the android project. Afterwards the app successfully launched on both mobile targets. There are multiple issues tough:
Things aren't yet as smooth as on the desktop platforms and there still seems to be quite a bit of work left to get there. I really like the concept of Avalonia but think that it is crucial for its success that the mobile targets aren't treated like second class citizens. Question likely is whether there are other parties that are interested in helping pushing the mobile targets forward. |
For running properly on mobile platforms we still require the following: General infrastructure:
Missing bits in mobile backends:
Not sure what happened to keyboard, but we were using some hacks for detecting if currently focused control is a TextBox. |
@kekekeks: are there any ballpark estimates what it would take to get first class mobile support? |
I would say 2020 Q2 with our current scarce resources. The problem is that mobile support isn't currently actively worked on by anyone. I've made an updated roadmap which contains some features needed for mobile planned for 0.8 release (namely touch support and IM) that I'm planning to work on this year. We could circumvent the need of IM support by reusing our old hack (iOS, Android), not sure why it doesn't work anymore. But that's probably it. Help with mobile backends would be very appreciated. |
Unfortunately this is a bit of a hen-egg problem. A possible involvement from our side would require other backers that are committed to help considerably speed up things and ensure long term maintenance. |
I'll take a shot at mobile backend re-animation after getting touch support this spring, since I'll need to update them to make sure I'm not missing anything touch-input related. The set of new features probably would be popup support for iOS and GPU acceleration. |
Hi guys, good job. How can I contribute to this project? |
best to get in touch via https://gitter.im/AvaloniaUI/Avalonia to see how best you can contribute :) welcome |
I want to suggest Avalonia to my company for a fully cross platform app, but I'm unsure if Android/iOS support has been fixed ? |
There were several things in the core framework that needed to be done before further attempts to get mobile platforms working:
Until at least those are ready it's kinda pointless to "fix" the mobile platform support, since we won't be able to deliver a proper UX anyway. There are also ongoing work on performance optimizations which are kinda required for low-power devices. There is a chance of getting it till the end of the year, but I can't promise that right now. |
I wonder if some of the drawing can be pulled over from the dart flutter project since it also uses skia for it's gui engine. |
It would be great if you concentrated on mobile because the world is mobile-first today. Everybody wants to make a mobile app, not desktop. |
@lastlink - it sounds like drawing is not an issue. @kekekeks - when .Net 5 releases, will that cover your issues with running on iOS and Android? My brief reading of .NET 5 is that it includes the essential mobile parts of Xamarin: doing that well from C# is what made Xamarin valuable. In my experience, Xamarin as ".Net Core on mobile platforms" works very smoothly - if you write the UI using Xamarin's "native" bindings for each platform's UI. (The cross-platform UI - Xamarin Forms - is the part that needs to be replaced by Avalonia.) My point being that your project should -soon- not have to write much Android and iOS specific code, if Microsoft has done their job fully. |
@kekekeks Will you give us an update on how things are going? |
iOS: mostly working: some initialization issue that causes black screen until screen rotation, works completely fine in simulator, will probably ship a fixed version with 0.10.1 or something |
Any plans/dates? :) |
@ili quite a lot of progess. its probably ready for people to start beta testing... expecting a few rough edges to help find what still needs doing. |
@danwalmsley sounds really cool! I'll look forward to start porting my project to Avalonia! |
I'd appreciate a clue or two about what I'm doing wrong here. I'm on a Mac running Big Sur 11.1. I need to figure out how to set up an Avalonia IOS project to I can recreate an ios app I created with Windows & Xamarin. I downloaded the Avalonia-Master, went to Samples/ControlCatalog.IOS, and double-clicked on the .sln file to start Visual Studio. Got the following: Getting restore information for project /Users/t/Downloads/Avalonia-master/samples/ControlCatalog.iOS/ControlCatalog.iOS.csproj NuGet Config files used: Feeds used: Unable to find project information for '/Users/t/Downloads/Avalonia-master/samples/ControlCatalog/ControlCatalog.csproj'. If you are using Visual Studio, this may be because the project is unloaded or not part of the current solution so run a restore from the command-line. Otherwise, the project file may be invalid or missing targets required for restore. |
@FloridaMatt please look at https://github.com/AvaloniaUI/Avalonia/blob/master/Documentation/build.md Also check |
Really looking forward to seeing the outcome of this. I'm especially concerned about performance which no one seems to have gotten right at this point. XAML-tech is very resource intensive as you know. Anyway, the status of iOS and other mobile backends may drastically tip the scales towards Avalonia very quickly. I hope the code is made public and integrated into the main repo soon. |
@robloo somewhat functional iOS support is available in 0.10. It's a bit broken on actual devices (black screen until you rotate the screen for some reason), but everything works perfectly in emulator. |
Just a point about current experience. Avalonia requres significant memory & processor resources. For ex one of my test devices - Samsung J5 DUOS (J500H) fails to even start demo application (not control catalog, but one page demo app).... XamarinForms applications worsk fine at the same time... Google Chrome too (i do suppose Chrome on Android uses Skia?). |
Any updates on this?
|
@robloo that's true, that iOS and Android backends work now, although some planned functionality is still missed (such as IME, which only recently came to Linux and is coming to Windows). These backends are not considered as production ready, and that's the only reason why Avalonia.Android wasn't updated on nuget (but IMO it could be, just with preview tag). Also, tbh, I wouldn't really push development of these backend until we have stable .NET 6 that can replace old MonoXamarin. But it's my personal opinion.
I would argue that it makes huge difference. But if developers use it everywhere it is possible and makes sense, in overall it actually might make that difference. Anyway, it should be discussed here #1434 |
I'm curious if there is any guide about developing AvaloniaUI Apps for mobile device? Is there any special changes needed to be made in my code for it to work on mobile platforms, or should I just add |
Note: mobile backends are not considered to be production-ready. E. g. iOS one has issues on some devices when screen is black until the first screen orientation change. If you are really interested in mobile support, contact us, we might figure something. Answer: You can keep your entire app in a netstandard2.0 library (or keep it as is and use multitargeting with conditional compilation to remove the [Register("AppDelegate")]
public partial class AppDelegate : AvaloniaAppDelegate<App>
{
} where public override void OnFrameworkInitializationCompleted()
{
if (ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktopLifetime)
desktopLifetime.MainWindow = new MainWindow();
else if (ApplicationLifetime is ISingleViewApplicationLifetime singleViewLifetime)
singleViewLifetime.MainView = new MainView();
base.OnFrameworkInitializationCompleted();
} Those are the only required changes to your application aside from the lack of |
Just FYI I'v checked
Also I'v just finished small project where Avalonia was used for simple UI rendering on SCV500 device (Ubuntu Core, rendering to the framebuffer). Simple ui means TextBlocks, Images, Grids, and ProgressBar. Success! :) I do writing this to make a point:
In general - things are comming better :)) |
Things are coming better! Coming back with my poor old test phone with the latest Super, great job is done! PS also tried
|
Mobile backends are now published on nuget. They are stable for net6, but some features are not there yet (file picker...). I am closing this issue. Please open a new one for specific issues/missing features, if there is no one existed. Templates And sample app |
And plans for single project support to combine Android/iOS? I notice it is still all separate projects. |
@robloo at least when Microsoft will complete them. And so far they seems to be very limited to the maui (in terms of resources/assets). Which means, not earlier than maui release, unless somebody will try to experiment. |
Issue moved from: VitalElement/AvalonStudio#651
The text was updated successfully, but these errors were encountered: