Downloader icon indicating copy to clipboard operation
Downloader copied to clipboard

DownloadNotifier.java line:110 com.download.library.DownloadNotifier.initBuilder

Open Sach16 opened this issue 3 years ago • 2 comments

Fatal Exception: java.lang.IllegalArgumentException com.monsterindia.seeker.views: Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent. Strongly consider using FLAG_IMMUTABLE, only use FLAG_MUTABLE if some functionality depends on the PendingIntent being mutable, e.g. if it needs to be used with inline replies or bubbles.

Please update the DownloadNotifier line 110 PendingIntent with the flag FLAG_IMMUTABLE

Sach16 avatar Apr 07 '22 09:04 Sach16

HI @Justson, We are using your library in our product Android application from a very long time. And as from version 31 PendingIntents are handled differently. We need you to furnish this and provide us an updated version of the library to download. Thanks

Sach16 avatar Apr 21 '22 07:04 Sach16

Hi @Justson Just to get an update from you that, can the library be fixed as soon as possible, Due to continuous usage of our product the library plays a very crucial part in it. Hence just asking to please fix the issue asap com.download.library.DownloadNotifier in line 110 shown below, needs a fix

mBuilder.setContentIntent(PendingIntent.getActivity(mContext, 200, new Intent(), PendingIntent.FLAG_UPDATE_CURRENT));

Needs to be updated as

if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) { mBuilder.setContentIntent(PendingIntent.getActivity(mContext, 200, new Intent(), PendingIntent.FLAG_IMMUTABLE or PendingIntent.FLAG_UPDATE_CURRENT)); } else { mBuilder.setContentIntent(PendingIntent.getActivity(mContext, 200, new Intent(), PendingIntent.FLAG_UPDATE_CURRENT)); }

Sach16 avatar May 05 '22 07:05 Sach16

implementation 'com.github.Justson:Downloader:v5.0.4-androidx'

Justson avatar Sep 03 '22 11:09 Justson