MauiSamples
MauiSamples copied to clipboard
IDialog wont work under Android
it does not work (Save&Read) aswell it cant create a new folder or display right paths
could you please provide more details?
On the Exsample Project MauiPaint if you run it on Android you cant save or open the file
it does not trow any msg or similar. Its the stock project you can simply test it and see the result as well you cant create a folder and the paths does not exists
all under android windows seems fine
if you need any more information let me know i am highly intrested to solve that beacuse i dependt on a file picker
Have you enabled the storage permission?
Of course
i checked promission on manifest
i checked promission on the phone aswell
Those paths doesn't exist even
See there the prove
it's the path to root. You can change it to your own path. https://github.com/VladislavAntonyuk/MauiSamples/blob/main/MauiPaint/Platforms/Android/Services/DialogService.cs#L38
via replacing the null with my target path?
Sry even the root path is invaild and i have no clu how to fix or change the path I need your help or i need to ditch your file picker and wirte my own from scracth wich would be a real boomer
I will check tomorrow, but I suggest you to check what path you pass to the method.
Initial path is set here: https://github.com/VladislavAntonyuk/MauiSamples/blob/main/MauiPaint/Platforms/Android/Services/DialogService.cs#L38
@DeepWorksStudios I can't reproduce it:
On click Save:
On click Open:
I will create a repo for reproducing the bug but it will take some time approxi next day Thanks for the support
from what I see, you shared the screen from SDCard, the folders you see are the internal storage.
To see the folders you can open emulated/0/
maybe these links can help you as well:
- https://stackoverflow.com/questions/60569224/cant-write-to-android-external-storage-even-with-permissions-set/60594975#60594975
- https://o7planning.org/10541/android-external-storage
I've just merged the branch which should fix your issue. please try again
I have tested it extensively the mauipaint under different variations of android version and all under api level 30 will not work that is why it will not work on my project. Just drag the maui paint project add android emulator api level 23 that the minimun for the project to run and see the results. My personal device was api level 29 there the pictures come out but i observed every version had the same problems
can not save can not load and wrong paths
If i may ask, could you reproduce it?
I've just tried it on Android 6.0.1. And I see all my files:
Thats strange well than i will create a repoduction repo but it could take some time But i really appricate your help
Could you please pull the latest changes? It contains fix for the Paint app
I pulled your latest commit and it did not change the case sadly
The path exist not :/ i enabled invisable folders checked local storage external storage read/wirte promission
i really dont know what to do
https://user-images.githubusercontent.com/59297046/176146001-167351d0-de07-4e0f-a299-da831140eebf.mp4
I had the same issue when I didn't provide permission to the storage for the app. Open App settings and make sure you allowed the access to the storage
I did that already. Same result
https://user-images.githubusercontent.com/33021114/176219389-36e6366b-d8fb-4c40-825f-b83fb2320546.mp4
Its unmodified newest commit from you
https://user-images.githubusercontent.com/59297046/176236561-708f67d2-ff2a-4c36-9ee5-432c0c3d8f74.mp4
Sorry, I don't know. By default the phone storage is "storage/emulated/0". You can try to traverse the file system to get the path you need.
I added a check to make sure storage permission is granted.
You can try to add android:requestLegacyExternalStorage="true"
in your AndroidManifest.xml
I will try that thanks :)
I like the idea of the Dialogue service, but when I attempted to reuse your code to do this I keep getting a build error with MauiProgram.cs "CS0246 The type or namespace name 'DialogService' could not be found (are you missing a using directive or an assembly reference?)". Other than just using the code, is there a config setting to allow the serice to be seen and allow the build
Make sure you added it for all platforms
It has been added to all platforms with the exception of Tizen, but I did not see this in your sample either. Is there a project setting that needs to be set so that the device type (Windows, Tizen etc) gets stripped out?
If you attach a small repro, I can help you
First of all thank you very much for the offer of help.
I have removed a lot of the other code in order to just get to the problem.
Within MauiProgram.cs when ever I enable
builder.Services.AddSingleton<IDialogService, DialogService>();
the App will not build.
I have also has to mess with the FileDialog.cs withint he Android Platform services, but I think that is more a case of the incorrect set of usings.
Please find attached a zip of the code.
From: Vladislav Antonyuk @.> Sent: 26 August 2022 11:20 To: VladislavAntonyuk/MauiSamples @.> Cc: Cairn23 @.>; Comment @.> Subject: Re: [VladislavAntonyuk/MauiSamples] IDialog wont work under Android (Issue #24)
If you attach a small repro, I can help you
— Reply to this email directly, view it on GitHub https://github.com/VladislavAntonyuk/MauiSamples/issues/24#issuecomment-1228321240 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AFT5Z4XBONDRCPIHYXAL6NLV3CK3LANCNFSM5ZIP3ANQ . You are receiving this because you commented. https://github.com/notifications/beacon/AFT5Z4Q53ZX3DFO6YDPRFGTV3CK3LA5CNFSM5ZIP3AN2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOJE3LDWA.gif Message ID: @.*** @.***> >
@Cairn23 Please attach the sample using GitHub. It is not attached when you send it using email