Android App Development
iOS App Development
Flutter 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 3.0.3.7 release ready!
Deniel Kerr
Founder. Opencart
Top Partners
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.
Source: https://github.com/iPaulPro/aFileChooser/blob/master/aFileChooser/src/com/ipaulpro/afilechooser/utils/FileUtils.java
Your email address will not be published. Required fields are marked*
Name*
Email*
Save my name email and website in this browser for the next time I comment.
Be the first to comment.
We use cookies to personalize your experience. By continuing to visit this website you agree to our use of cookies. Learn more about privacy policy
It was a successful collaboration. The Mobikul team provided the client everything they needed in a timely and high-quality manner. They were very professional, reliable, and accessible during the entire process. The client also saw no room for any improvements in the vendor's performance.
Vincenzo Carrano
Administrator, Segshop
USA
India
Global
Name
Email
Enquiry or Requirement
If you have more details or questions, you can reply to the received confirmation email.