Native Shopify Mobile App with 20 new features
Kickstart your hyperlocal marketplace in Corona pandemic with a starter guide
Android App Development
iOS App Development
Cross Platform App Development
Hire on-demand project developers and turn your idea into working reality.
Big thanks to Webkul and his team for helping get Opencart 22.214.171.124 release ready!
Owner and Founder. Opencart
Here, today, we will see how we can check if there is any File Explorer present on the device or not. I had to write a code to select a file from device that an be uploaded on server. But as I started finding the solution I got to know that some devices might not even contain a file explorer. so I implemented a file explorer by myself.
But I was not happy as I wanted that user should use his/her own file explorer if they have one. So i Google it for days and finally found a solution here.
Here I applied a check to firstly get if there is any file explorer present in the device or not. And if present then it will be opened and if not then mine one will start.
Here is the small snippet for the same
After asking for permission ( if your device is above API level 22) you will see a screen like this from where you can select a file you want to upload. To get the path for the file you selected you have to add onActivityResult() method in your activity/ fragment as
And here you go with your File selection from Existing File Explorer.
Your email address will not be published. Required fields are marked*
Save my name email and website in this browser for the next time I comment.
Be the first to comment.
Enquiry or Requirement
If you have more details or questions, you can reply to the received confirmation email.