back button on FilePicker inside chat not working

I'm using successfully the following code to open and get more than one picture from Android Gallery and then adding them in the chat.

On Android, this page to get pictures, doesn't have a "cancel" button to exit from this page without selecting any picture so the only option for the user is to press the "Android" back button

If you press it, the backbutton event is not fired in my app, neither on the page that called the Filepicker nor inside the app.shell  and, most important, my application is closed!!

How can I solve the problem in this situation ?


myfoto = await FilePicker.Default.PickMultipleAsync(new PickOptions()

{

    PickerTitle = "Seleziona immagini",

    FileTypes = customFileType

});


3 Replies

JR Jayashree Ravishankar Syncfusion Team July 11, 2024 09:14 AM UTC

Hi Walter Martin

 

We have created a simple sample based on your requirement. In our sample, we navigated to the phone gallery page from chat in the AttachmentButtonClicked event and navigated back through the device back button. The page navigated to the Chat page, and OnBackButtonPressed() is triggered properly as expected.

 

Could you please share the following details :

  • MAUI Version
  • Android Device details
  • Issue-reproducing sample, or you can modify our sample to reproduce the issue? This will help us find a solution as soon as possible.

 

We have attached the simple sample and video for your reference. Please have a look at the sample and let us know if you have any other queries.


Attachment: Chat_Sample_3934a207.zip


WM Walter Martin July 11, 2024 09:33 PM UTC

Thanks a lot

your sample works perfectly

There was a mistake in my code and for that it didn't work as aspected.



JR Jayashree Ravishankar Syncfusion Team July 12, 2024 04:43 AM UTC

Hi Walter Martin,

We are glad that the provided response meets your requirement. Please let us know if you need further assistance. As always, we are happy to help you out. 


Loader.
Up arrow icon