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![](https://ecs-static.teamtreehouse.com/assets/views/marketing/shared/community-banner-white-47072046c51352fe6a69f5e691ff5700b28bb11d45197d7bdf066d9ea3f72d0c.webp)
![MUZ140118 Cathrine Makuya](https://uploads.teamtreehouse.com/production/profile-photos/2175882/micro___263_78_272_7142__20141125_234759.jpg)
MUZ140118 Cathrine Makuya
10,300 Pointsstage 8 challenge 2
Now, save currentUserId in the ParseInstallation variable using the put() method. Use the key "userId".
import android.app.Activity;
import android.os.Bundle;
import com.parse.ParseInstallation;
import com.parse.ParseUser;
public class LoginActivity extends Activity {
/*
* Some code has been omitted for brevity!
* This method gets called upon a successful login.
*/
public void updateParseInstallation() {
String currentUserId = ParseUser.getCurrentUser().getObjectId();
ParseInstallation installation = ParseInstallation.getCurrentInstallation();
installation.put("userId");
installation.saveInBackground();
}
}
import android.app.Activity;
import android.os.Bundle;
import com.parse.ParseInstallation;
import com.parse.ParseQuery;
public class InviteActivity extends Activity {
/*
* Some code has been omitted for brevity!
* This method gets called when an invitation is sent.
*/
public void sendPushNotifications(String playerId) {
ParseQuery<ParseInstallation> pushQuery;
}
}
MUZ140118 Cathrine Makuya
10,300 PointsMUZ140118 Cathrine Makuya
10,300 Pointsl dont know where l am going wrong l have tried it all but its not working ..please help...thank you in advance