tonyofrancis/Fetch

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

ryancode-commit opened this issue ยท 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

Kindly Solve this issuse Owner of library

Please update the library!

@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.

Thank you for this fix

@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?

@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!

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

@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?

replace these drawable and string resources with your local resources.

Thank you so much.