-
Notifications
You must be signed in to change notification settings - Fork 5
/
how to use.txt
21 lines (19 loc) · 1002 Bytes
/
how to use.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
public FileUploader uploader=new FileUploader();
uploader.Chooser(webView, getActivity(), new FileUploader.callBackListner() {
@Override
public void cancelOpenChooser() {
//handle here canceled request from file chooser.
Log.d("uy","cancel file chooser popup");
}
});
# //set the on activity result in Activity class or fragment class
public void onActivityResult(int requestCode, int resultCode, Intent data) {
fileUploader.setActivityResult(requestCode,resultCode,data);
}
# //set the permission request result here
@Override
public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
Log.e("permission","onRequestPermissionsResult 1");
super.onRequestPermissionsResult(requestCode, permissions, grantResults);
fileUploader.setRequestPermissionsResult(requestCode, permissions, grantResults);
}