indication / OpenRedmine

Open Redmine
http://indication.github.io/OpenRedmine/
88 stars 44 forks source link

Crash on FileDownload #202

Closed indication closed 7 years ago

indication commented 7 years ago

java.lang.SecurityException: at android.os.Parcel.readException(Parcel.java:1620) at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:183) at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:135) at android.content.ContentProviderProxy.insert(ContentProviderNative.java:476) at android.content.ContentResolver.insert(ContentResolver.java:1234) at android.app.DownloadManager.enqueue(DownloadManager.java:946) at jp.redmine.redmineclient.fragment.FileDownload$2.onClick(FileDownload.java:114) at android.view.View.performClick(View.java:5205) at android.view.View$PerformClick.run(View.java:21164) at android.os.Handler.handleCallback(Handler.java:739) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:148) at android.app.ActivityThread.main(ActivityThread.java:5417) at java.lang.reflect.Method.invoke(Native Method:0) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)

indication commented 7 years ago

https://stackoverflow.com/questions/25805779/securityexception-downloadmanager-for-android-3-2

https://developer.android.com/reference/android/app/DownloadManager.Request.html DownloadManager.Request setNotificationVisibility (int visibility): If set to VISIBILITY_HIDDEN, this requires the permission android.permission.DOWNLOAD_WITHOUT_NOTIFICATION.

indication commented 7 years ago

Set VISIBILITY_VISIBLE_NOTIFY_COMPLETED. Is this kind of DOWNLOAD_WITHOUT_NOTIFICATION? Default is VISIBILITY_VISIBLE

indication commented 7 years ago

Fix.