r/dotnet • u/bktnmngnn • Mar 08 '26
You can run a full blazor web app with global server interactivity on android, accessible to the local network. (Proof of concept is using an avalonia app to host the server)
I wired up a small proof-of-concept running a full blazor web app with server interactivity running completely in an android device with Avalonia as the host and some workarounds.
Notes:
- This is not the same as maui blazor hybrid, this is a complete blazor server app, accessible in the local browser and on other devices thru the local network.
- This is not officially supported, so this is done with workarounds. Including manual dll references and extracting the blazor.web.js from a working blazor web app.
- Should you? probably not. But can you? yes.
You can take a look at this repository to see how it was set up.
41
Upvotes
11
u/r2d2_21 Mar 08 '26
I guess this could work with some P2P scenarios, right? Where you need devices in the local network to talk to each other but without reaching an external server.
3
u/JMPJNS Mar 08 '26
could you use this to embedd blazor components into an avalonia app with a webview
2
u/sloppykrackers Mar 10 '26
Running ASP.NET Core on an Android phone is an interesting technical flex but operationally it's a load-bearing solution looking for a building to hold up.
2
u/SchlaWiener4711 Mar 08 '26
What's wrong with blazor hybrid? To run a local app that's the logical way to go. I had a working blazor hybrid app rubbing on Android years ago.
5
u/MattV0 Mar 08 '26
Oh this looks great. I am about to throw a "Link to Windows" replacement together with "ftp server app". Still struggling about what libraries to use.
1
u/Frosty-Self-273 Mar 10 '26
Can you explain what this could do for you over a client side app? Are there features that this would offer over MAUI/Hybrid?
2
u/AutoModerator Mar 08 '26
Thanks for your post bktnmngnn. Please note that we don't allow spam, and we ask that you follow the rules available in the sidebar. We have a lot of commonly asked questions so if this post gets removed, please do a search and see if it's already been asked.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
1
u/Inukollu Mar 08 '26
Will go through and give feedback if I find anything
0
u/MrLyttleG Mar 08 '26
Quel dépôt ??
0
u/Mib_Geek Mar 08 '26
Very cool. might help with android co-op games 👀