Posts

Showing posts with the label filenotfoundexception

Android FileNotFound canread and exists false media whatsapp files

Image
Android FileNotFound canread and exists false media whatsapp files I'm trying to read a file that exists, but I can not. Thanks! File f = new File("/mnt/sdcard/WhatsApp/Media/WhatsApp Images/IMG-20180628-WA0000.jpg"); File sdDir = Environment.getExternalStorageDirectory(); Log.w("Whatsapp","#SDDIR CANREAD? "+ sdDir.canRead() +" PATH: "+ sdDir.getAbsolutePath()); f.setReadable(true,false); Log.w("Whatsapp","#FILE: "+ f.getName() +" l:"+ f.length() +" exists:"+ f.exists() +" canRead:"+ f.canRead() +" PATH: "+ f.getPath() +" ABSOLUTE: "+ f.getAbsolutePath()); LOG #SDDIR CANREAD? false PATH: /storage/emulated/0 #FILE: IMG-20180628-WA0000.jpg l:0 exists:false canRead:false PATH: /mnt/sdcard/WhatsApp/Media/WhatsApp Images/IMG-20180628-WA0000.jpg ABSOLUTE: /mnt/sdcard/WhatsApp/Media/WhatsApp Images/IMG-20180628-WA0000.jpg AndroidManifest Permissions <uses-permission android:nam...