Android - File Chooser modules cannot show directories and files inside storage in KitKat -
i want application load file file chooser. i'd tried modules implements it, strangely kitkat rooted phone, , unrooted earlier version can read directories , files inside storage, unrooted kitkat version cannot read inside storage.
here's module tried , code used :
intent intent = new intent(this, filechooser.class); arraylist<string> extensions = new arraylist<>(); extensions.add(".csv"); intent.putstringarraylistextra("filterfileextension", extensions); startactivityforresult(intent, 0);`
intent intent = new intent(this, filechooseractivity.class); intent.putextra(filechooseractivity.input_start_folder, environment.getexternalstoragedirectory()); intent.putextra(filechooseractivity.input_regex_filter, ".*csv|.*csv"); this.startactivityforresult(intent, 0);
also, here's permissions used inside androidmanifest
<uses-permission android:name="android.permission.camera" /> <uses-feature android:name="android.hardware.camera" /> <uses-feature android:name="android.hardware.camera.autofocus" /> <uses-permission android:name="android.permission.read_phone_state" /> <uses-permission android:name="android.permission.write_external_storage" android:maxsdkversion="18" /> <uses-permission android:name="android.permission.read_external_storage" android:maxsdkversion="18" />
no errors found, when access storage, nothing can shown, when access root directory, seems normal in every phone.
is there way fix or better library / modules support recent version of android ?
edit solution : ish, attribute android:maxsdkversion can make application goes on trouble. should not using attribute. codes okay
Comments
Post a Comment