Advertisement
Guest User

Untitled

a guest
Jul 2nd, 2015
201
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. protected void onCreate(Bundle savedInstanceState) {
  2.  
  3. FacebookSdk.sdkInitialize(getApplicationContext());
  4. Parse.initialize(this, "x","x");
  5.  
  6. ParseInstallation.getCurrentInstallation().saveInBackground();
  7. ParsePush.subscribeInBackground("", new SaveCallback() {
  8. @Override
  9. public void done(ParseException e) {
  10. if (e == null) {
  11. Log.d("com.parse.push", "successfully subscribed to the broadcast channel.");
  12. } else {
  13. Log.e("com.parse.push", "failed to subscribe for push", e);
  14. }
  15. }
  16. });
  17.  
  18.  
  19. super.onCreate(savedInstanceState);
  20. setContentView(R.layout.activity_main);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement