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

stage 8 challenge 2

Set pushQuery as the query for your new push variable.

InviteActivity.java
/*
 * This code is an excerpt from InviteActivity.java
 */
ParseQuery<ParseInstallation> pushQuery = ParseInstallation.getQuery();
pushQuery.whereEqualTo("userId", playerId);

ParsePush push=new ParsePush();
push.setQuery(query);

l have followed every step in the video but l dont know where l am going wrong

l need your help please

2 Answers

So this looks like a simple syntax error. You initialized the ParseQuery as pushQuery and set it up properly, but it looks like the query you're setting is just query in push.setQuery(query);

I hope that helps.

Here are the stages you have to follow ParsePush push = new ParsePush();

push.setQuery(pushQuery);

push.setMessage("It's your turn!");

push.sendInBackground();

Thanx Mallon

Thanx Hey!!!

Mallon thanks for the meal of this code u prepare push.setQuery(pushQuery); its superb