VishnuSanal / Quotes

Quotes Status Creator lets you share quotations as status images on social media
https://play.google.com/store/apps/details?id=phone.vishnu.quotes
GNU General Public License v3.0
50 stars 20 forks source link

Open to the displayed Quote upon notification click #111

Open Jonykkd opened 2 years ago

Jonykkd commented 2 years ago

When Clicked on the Notification, it is not redirecting to same quote, which is displayed on Notification Bar.

VishnuSanal commented 2 years ago

@Jonykkd Hello!

Thanks for reporting!

When Clicked on the Notification, it is not redirecting to same quote, which is displayed on Notification Bar.

Yes! The actions present on notification are to share & add to favourites. The share action is extended to a click on notification too (not only on the share button). So, to share the quote or to add them to favourites, the app should be opened. Then the share bottom sheet pops up (or triggers the default share action) or adds the Quote to favourites & gives a feedback to the user via a Toast message.

Due to this it's not necessary to display the same Quote as that of the notification. This is the same behaviour for widgets too.

Hope this answers your question. Thanks a ton for reporting & feel free to revert back if you've any more queries :)

Jonykkd commented 2 years ago

@VishnuSanal Hi, Thank You for your reply. I agree with you that it might not be required for the user to get the notification click redirects the same quote. But, If we want it really, how should we achieve it? Just to learn about the notification action of this. Thank you!

VishnuSanal commented 2 years ago

@Jonykkd Hi!

Thanks for showing interest.

The notification click (widget click & shortcut action click too) redirects to the MainActivity. Then the specifics are handled there.

Also, I feel like, if we want to achieve the behaviour, we can add the Quote from the notification to the first position (index zero) in the list & pass it onto the Quotes' list & then submit the list to the ViewPagerAdapter.

Hope this answers your question. Feel free to revert back if you've any more queries. :)

PS: Excuse my brevity - answered from smartphone without referring to the actual code!

VishnuSanal commented 1 year ago

The notification click (widget click & shortcut action click too) redirects to the MainActivity. Then the specifics are handled there.

Also, I feel like, if we want to achieve the behaviour, we can add the Quote from the notification to the first position (index zero) in the list & pass it onto the Quotes' list & then submit the list to the ViewPagerAdapter.

I feel this can be converted into a feature request. Adding good-first-issue label too, since this is an easy fix!