CameraKit / blurkit-android

The missing Android blurring library. Fast blur-behind layout that parallels iOS.
MIT License
3.72k stars 309 forks source link

Crash on api 16 and 17 #11

Closed vararg closed 7 years ago

vararg commented 7 years ago

Hi, I find a problem on api 16 and 17. Blur are corrupted and few seconds later it cause crash. Here is a part of stacktrace

12-14 14:21:06.714 11696-11696/com.my.app E/dalvikvm: Could not find class 'android.app.AppOpsManager', referenced from method com.google.android.gms.internal.zzsh.zzg
12-14 14:21:09.096 11696-11696/com.my.app E/RenderScript_jni: No GC methods
12-14 14:21:09.104 11696-12011/com.my.app E/RenderScript: Couldn't load libRSSupportIO.so

It's similar to this issue http://stackoverflow.com/questions/21563299/defect-of-image-with-scriptintrinsicblur-from-support-library And due to the answer from link please change one row in BlurLayout

Bitmap bitmap = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_4444);

to

Bitmap bitmap = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888);

because ARGB_4444 is deprecated and doesn't work with renderscript on older devices (tested on 19+ and all was fine).

dwillmc commented 7 years ago

Fixed with #14