How to handle Mobile file upload?

I need to verify upload file in mobile, so I recorded the upload function and run the test cases and it works fine.

The same test case I try to run in another mobile, but it failed (It cant able to click gallery in that second device)

How to handle this scenario?