Android Permissions Error with FileChooserDialog with the file type picture -
today have problem. have created filechooserdialog nd when select file type picture/image, gives me error. stack trace:
07-11 16:18:43.851 7522-7522/damasoft.manumikychat e/androidruntime: fatal exception: main 07-11 16:18:43.851 7522-7522/damasoft.manumikychat e/androidruntime: process: damasoft.manumikychat, pid: 7522 07-11 16:18:43.851 7522-7522/damasoft.manumikychat e/androidruntime: java.lang.runtimeexception: failure delivering result resultinfo{who=null, request=1234, result=-1, data=intent { dat=content://com.android.providers.media.documents/document/image:1404 flg=0x1 virtualscreenparam=params{mdisplayid=-1, null, mflags=0x00000000)} }} activity {damasoft.manumikychat/damasoft.manumikychat.page1}: java.lang.securityexception: permission denial: reading com.android.providers.media.mediaprovider uri content://media/external/images/media pid=7522, uid=10134 requires android.permission.read_external_storage, or granturipermission() 07-11 16:18:43.851 7522-7522/damasoft.manumikychat e/androidruntime: @ android.app.activitythread.deliverresults(activitythread.java:4926) 07-11 16:18:43.851 7522-7522/damasoft.manumikychat e/androidruntime: @ android.app.activitythread.handlesendresult(activitythread.java:4969) 07-11 16:18:43.851 7522-7522/damasoft.manumikychat e/androidruntime: @ android.app.activitythread.access$1600(activitythread.java:222) 07-11 16:18:43.851 7522-7522/damasoft.manumikychat e/androidruntime: @ android.app.activitythread$h.handlemessage(activitythread.java:1850) 07-11 16:18:43.851 7522-7522/damasoft.manumikychat e/androidruntime: @ android.os.handler.dispatchmessage(handler.java:102) 07-11 16:18:43.851 7522-7522/damasoft.manumikychat e/androidruntime: @ android.os.looper.loop(looper.java:158) 07-11 16:18:43.851 7522-7522/damasoft.manumikychat e/androidruntime: @ android.app.activitythread.main(activitythread.java:7230) 07-11 16:18:43.851 7522-7522/damasoft.manumikychat e/androidruntime: @ java.lang.reflect.method.invoke(native method) 07-11 16:18:43.851 7522-7522/damasoft.manumikychat e/androidruntime: @ com.android.internal.os.zygoteinit$methodandargscaller.run(zygoteinit.java:1230) 07-11 16:18:43.851 7522-7522/damasoft.manumikychat e/androidruntime: @ com.android.internal.os.zygoteinit.main(zygoteinit.java:1120) 07-11 16:18:43.851 7522-7522/damasoft.manumikychat e/androidruntime: caused by: java.lang.securityexception: permission denial: reading com.android.providers.media.mediaprovider uri content://media/external/images/media pid=7522, uid=10134 requires android.permission.read_external_storage, or granturipermission() 07-11 16:18:43.851 7522-7522/damasoft.manumikychat e/androidruntime: @ android.os.parcel.readexception(parcel.java:1620) 07-11 16:18:43.851 7522-7522/damasoft.manumikychat e/androidruntime: @ android.database.databaseutils.readexceptionfromparcel(databaseutils.java:183) 07-11 16:18:43.851 7522-7522/damasoft.manumikychat e/androidruntime: @ android.database.databaseutils.readexceptionfromparcel(databaseutils.java:135) 07-11 16:18:43.851 7522-7522/damasoft.manumikychat e/androidruntime: @ android.content.contentproviderproxy.query(contentprovidernative.java:421) 07-11 16:18:43.851 7522-7522/damasoft.manumikychat e/androidruntime: @ android.content.contentresolver.query(contentresolver.java:502) 07-11 16:18:43.851 7522-7522/damasoft.manumikychat e/androidruntime: @ android.content.contentresolver.query(contentresolver.java:445) 07-11 16:18:43.851 7522-7522/damasoft.manumikychat e/androidruntime: @ com.ipaulpro.afilechooser.utils.fileutils.getdatacolumn(fileutils.java:228) 07-11 16:18:43.851 7522-7522/damasoft.manumikychat e/androidruntime: @ com.ipaulpro.afilechooser.utils.fileutils.getpath(fileutils.java:322) 07-11 16:18:43.851 7522-7522/damasoft.manumikychat e/androidruntime: @ damasoft.manumikychat.page1.onactivityresult(page1.java:253) 07-11 16:18:43.851 7522-7522/damasoft.manumikychat e/androidruntime: @ android.app.activity.dispatchactivityresult(activity.java:7138) 07-11 16:18:43.851 7522-7522/damasoft.manumikychat e/androidruntime: @ android.app.activitythread.deliverresults(activitythread.java:4922) 07-11 16:18:43.851 7522-7522/damasoft.manumikychat e/androidruntime: @ android.app.activitythread.handlesendresult(activitythread.java:4969) 07-11 16:18:43.851 7522-7522/damasoft.manumikychat e/androidruntime: @ android.app.activitythread.access$1600(activitythread.java:222) 07-11 16:18:43.851 7522-7522/damasoft.manumikychat e/androidruntime: @ android.app.activitythread$h.handlemessage(activitythread.java:1850) 07-11 16:18:43.851 7522-7522/damasoft.manumikychat e/androidruntime: @ android.os.handler.dispatchmessage(handler.java:102) 07-11 16:18:43.851 7522-7522/damasoft.manumikychat e/androidruntime: @ android.os.looper.loop(looper.java:158) 07-11 16:18:43.851 7522-7522/damasoft.manumikychat e/androidruntime: @ android.app.activitythread.main(activitythread.java:7230) 07-11 16:18:43.851 7522-7522/damasoft.manumikychat e/androidruntime: @ java.lang.reflect.method.invoke(native method) 07-11 16:18:43.851 7522-7522/damasoft.manumikychat e/androidruntime: @ com.android.internal.os.zygoteinit$methodandargscaller.run(zygoteinit.java:1230) 07-11 16:18:43.851 7522-7522/damasoft.manumikychat e/androidruntime: @ com.android.internal.os.zygoteinit.main(zygoteinit.java:1120)
i resolved problem. i'm android marshmellow(6.0), , musted add permission acces external files. link help: https://developer.android.com/training/permissions/requesting.html.
Comments
Post a Comment