opengeeksme / android-file-chooser Goto Github PK
View Code? Open in Web Editor NEWHandle Android file chooser click actions on all Android versions
License: GNU General Public License v3.0
Handle Android file chooser click actions on all Android versions
License: GNU General Public License v3.0
Hey there,
Thanks for sharing this. I've been trying to get this working for ages and then came across your blog. Really pleased.
However when I click the "Add photos" button in my website through webview it takes me straight to the gallery and doesn't give me an option to use the camera, it does however if I access the website from the chrome browser.
Any ideas how I can fix this?
Thanks again
I tested the demo app and everithing is cool, I found just 2 issues:
Thanks Giorgio
hello
your solution is great ! but you don't include the verifyStoragePermissions
i added this function
public static void verifyStoragePermissions(Activity activity) {
// Check if we have read or write permission
int writePermission = ActivityCompat.checkSelfPermission(activity, Manifest.permission.WRITE_EXTERNAL_STORAGE);
int readPermission = ActivityCompat.checkSelfPermission(activity, Manifest.permission.READ_EXTERNAL_STORAGE);
if (writePermission != PackageManager.PERMISSION_GRANTED || readPermission != PackageManager.PERMISSION_GRANTED) {
// We don't have permission so prompt the user
ActivityCompat.requestPermissions(
activity,
PERMISSIONS_STORAGE,
REQUEST_EXTERNAL_STORAGE
);
}
}
with this variables
// Storage Permissions variables
private static final int REQUEST_EXTERNAL_STORAGE = 1;
private static String[] PERMISSIONS_STORAGE = {
Manifest.permission.READ_EXTERNAL_STORAGE,
Manifest.permission.WRITE_EXTERNAL_STORAGE
};
and in on create
verifyStoragePermissions(this);
Hello,
How we can select multiple files using this code?
How to differentiate Camera and gallery with separate buttons
hello
if i take a picture
sometimes the filesize is 0 octet , sometimes not ....
Hello.
I have tested your webapp on Lollipop and the image isn't grabbed from the gallery. Instead on Marshmallow it works great.
Hi;
I was looking for a solution to the problem with webview in kitkat 4.4 and thought this might work but it does not ?
Do you have any solutions that will work on kitkat 4.4 ?
hi, my name effendi from Belitung Island - Indonesia, i follow your code and its works, but camera not in the list - just direct open my photo gallery..
thank you
Hi,
Thanks for your example - it works fine.
Can you help - how implement downloading all types of files?
Thank you!
Open app, click "START UPLOADING"
Click "Cancel" or press "Back button" on device"
LeEco Le 2
Android 6.0
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.