Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Android Implementing Designs for Android Adding Push Notifications from Parse.com Sending User-to-User Push Notifications

How to disable notifications?

If I'm already in the inbox when I receive a message, I would think that I don't need a system notification appearing. I would just want the message to appear in my inbox with a forced refresh.

I'm sitting here trying to figure out how to implement this extra check... would I create a custom receiver using LocalBroadcastManager? If I were to do that, then how would I check to see if they are in the inbox and send them a different intent vs when they are not in the inbox and would get the regular notification?

Any ideas?

2 Answers

Ben Jakuben
STAFF
Ben Jakuben
Treehouse Teacher

I haven't tried it myself, but you may be able to try Responding with an Intent and trigger the inbox refresh there somehow.

Okay, did some more research into using an intent. I think what needs to happen here is the use of a callback function that makes use of a refresh.

I'll mark this as "best answer". I think at this point, I'll have to create another question and start posting code for more specifics. Thanks Ben.

Curiously, do you know of a resource that can explain using callbacks?