Closed sorainnosia closed 4 years ago
The RCL library support was missing from BlazorMobile but has been implemented some days ago by myself.
I will ship a new version that fix this issue today or tomorrow !
Please be a little patient. I will close and update this issue when shipped.
Thanks a lot @Daddoon for the hard work, really appreciate it a lot
Just for tracking purpose, this issue is similar to https://github.com/Daddoon/BlazorMobile/issues/160
Should come in the upcoming release today !
Hi, @sorainnosia !
The update with the fix has been released ! Please update to the last version of BlazorMobile.
Hi Daddoon
Do I need to build the source code or can use the command dotnet new -i ?
I tried using dotnet new -i BlazorMobile.Templates::3.2.2-preview1.20073.1
and tried but it does not work too.
Thank you so much for the support
Hi @sorainnosia,
Check that BlazorMobile.Build Nuget package is up to date on your Blazor project first.
Can you also try to:
If it still doesn’t work maybe it’s a different use case I didn’t managed. I did try with a RCL project and it was working, the metadata were present and fetchable in the bin/*/YouProject.StaticAssets.xml in order to copy the right files. But I didn’t tested with a NuGet RCL.
However I have read that you may also have some inconsistencies with RCL in some scenario where the folder may named differently, according to the doc and github if I have good memory.
Can you open your freshly built BlazorMobile zip you get after the build , and tell me if the _content folder is present ?
If yes , if the subfolder you see in it has a different name than what is written in your index.html file, try to change the path to be the same as in the _content subfolder.
Otherwise, if it still doesn’t match can you please send me a repro project ? I’m on vacation actually I will be able to take a look only at the end of the week.
I’m sorry if it’s something wrong on my side to still fix. Long story short, I cannot use the regular ASP.Net publish functionality to get the expected files at build time directly, as this feature would internally call a project build and therefore creating a build infinite loop !
Please keep me updated.
Also did you read the migration guide to 3.2.2 at the end of the github doc ?
dotnet new -i BlazorMobile.Templates::3.2.2-preview1.20073.1 is only updating the default template when you create a new project. If your project already exists you have to update all BlazorMobile.* package in your solution.
If something additional is required, it’s written in the migration doc, so be attentive to this.
I didnt upgrade an existing project but redo from scratch. I can see browser looks nice but not in android apk
I will send you the project link later on after I go back
Please check your zip content first ! Thanks !
Hi Daddoon
I checked the zip content and yes the _content/MatBlazor/dist/matBlazor.css and js both exist. And the index.html reference the css and js correctly as seen in browser where the UI looks not messy.
Only the Android APK version still looks messy.
And I check NuGet package for BlazorMobile and all is up to date
At least file are copied.
But something seem wrong, in my opinion. I think the correct output would have been:
_content/MatBlazor/matBlazor.css
not
_content/MatBlazor/dist/matBlazor.css
If you right click your Blazor project and click on publish, and publish it somewhere, is the published folder structure different ? Specially about your RCL.
Please send me your project here attached if possible. I will take a look at the end of the week, as I’m currently away without any computer ! 😁
Otherwise thanks for your testing and support. It’s always good to know that people use my project with Blazor, and that there is still improvement to be made
Sorry I dont know how to push to github, below is the source code shared from my dropbox :
https://www.dropbox.com/s/ej07s6e3exdl1y6/JKBlazorMobile.7z?dl=0
Hello @sorainnosia,
I just checked your code. There is no bug with BlazorMobile, my RCL support was sufficient.
BUT you made a mistake in your app: You referenced some resources (css, or font) from an external source, like Google.
So your rendering will obviously not work if your phone is offline as the ressources are not embedded in the phone but loaded remotely by you.
Just for checking, i connected my phone to the Wifi & Internet, and everything were working right in your app.
There is nothing to do for me. Just remember to keep in mind that any external ressource will obviously not load if there is no internet.
thanks @Daddoon to the extend of debugging my application.
So right now, it is clear that all css/fonts/js must be on client side, because my PC has internet and the emulator is connected to internet too.
Thanks a lot for the great extend of help
It's more like content loading may be impredictable depending from where you are loading your application. Embedding it in your Blazor app make it sure that it's available at runtime, with or without internet.
Also you have no download / delay when loading offline data.
MatBlazor needs the wwwroot/index.html to include a javascript file and a css file and add the package from Nuget
I have added the css file and js file like below and added the Nuget package, it works in Blazor project (client version) on browser, but does not work on Android project (emulator version).
The css is messed up or javascript does not run. I dont know how to debug android web view.
Anyone know why?