Fetch icon indicating copy to clipboard operation
Fetch copied to clipboard

Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent.

Open ryancode-commit opened this issue 3 years ago • 10 comments

Fetch there is an error in compileSdkVersion 31 and above & targetSdkVersion 31 and above because DefaultFetchNotificationManager there is a Pending intent with Flag_current_update

ryancode-commit avatar Jun 23 '22 06:06 ryancode-commit

Kindly Solve this issuse Owner of library

557711 avatar Jun 26 '22 16:06 557711

Please update the library!

shreyaag1 avatar Aug 27 '22 08:08 shreyaag1

@shreyaag1 @ryancode-commit @557711

I managed to fix the bug by copying and pasting the code into my own class file and corrected the PendingIntent flag. Here is the link to my code : https://gist.github.com/OmidNejadabbasi/ccda264acc68a65be6004199344d168f

Remember that you should instantiate and pass this object to setNotificationManager() method.

OmidNejadabbasi avatar Aug 31 '22 07:08 OmidNejadabbasi

Thank you for this fix

sanjaysingh1990 avatar Oct 30 '22 14:10 sanjaysingh1990

@shreyaag1 @ryancode-commit @557711

I managed to fix the bug by copying and pasting the code into my own class file and corrected the PendingIntent flag. Here is the link to my code : https://gist.github.com/OmidNejadabbasi/ccda264acc68a65be6004199344d168f

Remember that you should instantiate and pass this object to setNotificationManager() method.

I can't paste it Make a new class or edit DefaultFetchNotigicationManager?

ryancode-commit avatar Nov 03 '22 08:11 ryancode-commit

@shreyaag1 @ryancode-commit @557711 I managed to fix the bug by copying and pasting the code into my own class file and corrected the PendingIntent flag. Here is the link to my code : https://gist.github.com/OmidNejadabbasi/ccda264acc68a65be6004199344d168f Remember that you should instantiate and pass this object to setNotificationManager() method.

I can't paste it Make a new class or edit DefaultFetchNotigicationManager?

Yes, you should create your own .java file and paste my code and then use that class. I have tested it and it works!

OmidNejadabbasi avatar Nov 03 '22 10:11 OmidNejadabbasi

This fix worked for me as well after some fixes like string and drawable resources linking.

sanjaysingh1990 avatar Nov 04 '22 02:11 sanjaysingh1990

@shreyaag1 @ryancode-commit @557711 I managed to fix the bug by copying and pasting the code into my own class file and corrected the PendingIntent flag. Here is the link to my code : https://gist.github.com/OmidNejadabbasi/ccda264acc68a65be6004199344d168f Remember that you should instantiate and pass this object to setNotificationManager() method.

I can't paste it Make a new class or edit DefaultFetchNotigicationManager?

Yes, you should create your own .java file and paste my code and then use that class. I have tested it and it works!

For import net.omidn.fetchme.R.drawable and import net.omidn.fetchme.R.string Do you use library? Or what?

ryancode-commit avatar Nov 04 '22 03:11 ryancode-commit

replace these drawable and string resources with your local resources.

sanjaysingh1990 avatar Nov 04 '22 04:11 sanjaysingh1990

Thank you so much.

ryancode-commit avatar Nov 22 '22 11:11 ryancode-commit