2

I cant use download manager for android 3.2 cause app crashes. Log Cat:

java.lang.SecurityException: Invalid value for visibility: 1
at android.os.Parcel.readException(Parcel.java:1321)
at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:182)
at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:136)
at android.content.ContentProviderProxy.insert(ContentProviderNative.java:447)
at android.content.ContentResolver.insert(ContentResolver.java:721)
at android.app.DownloadManager.enqueue(DownloadManager.java:1172)
at gr.backatel.videotomp3download.MainActivity$10.onDownloadStart(MainActivity.java:800)
at android.webkit.CallbackProxy.handleMessage(CallbackProxy.java:389)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:132)
at android.app.ActivityThread.main(ActivityThread.java:4125)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:491)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:844)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:602)
at dalvik.system.NativeStart.main(Native Method)

The only thing that i can do is to check if android version is 3.2 and then start download so as to avoid device to crash.

noobProgrammer
  • 1,443
  • 4
  • 14
  • 33
  • 1
    possible duplicate of [DownloadManager.Request.setNotificationVisibility fails with jSecurityException: invalid value for visibility: 1](http://stackoverflow.com/questions/9933270/downloadmanager-request-setnotificationvisibility-fails-with-jsecurityexception) – 2Dee Sep 12 '14 at 10:07

1 Answers1

2
<uses-permission
    android:name="android.permission.DOWNLOAD_WITHOUT_NOTIFICATION" />

Try This