Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Mobile & Social

Mobile & Social

My talk on the things I've learned from the Google+ mobile apps, and how that applies to the recently release Google+ Sign-In platform. From #mdevcon13

Ian Barber

March 15, 2013
Tweet

More Decks by Ian Barber

Other Decks in Programming

Transcript

  1. Social&Mobile
    Ian Barber
    What we I learned from
    Google+
    Google+ Developer Advocate
    Friday, 15 March 13

    View full-size slide

  2. Friday, 15 March 13

    View full-size slide

  3. Many Devices
    Many Apps
    Single Identity
    Friday, 15 March 13

    View full-size slide

  4. Many Devices
    Friday, 15 March 13

    View full-size slide

  5. Consistency Matters
    Friday, 15 March 13

    View full-size slide

  6. Context Matters
    Friday, 15 March 13

    View full-size slide

  7. Context Matters
    Friday, 15 March 13

    View full-size slide

  8. Context Matters
    Friday, 15 March 13

    View full-size slide

  9. Google+ Sign-In
    Friday, 15 March 13

    View full-size slide

  10. Applications Not Devices
    Friday, 15 March 13

    View full-size slide

  11. Friday, 15 March 13

    View full-size slide

  12. Many Apps
    Friday, 15 March 13

    View full-size slide

  13. Social Applications
    Friday, 15 March 13

    View full-size slide

  14. Social Applications
    Friday, 15 March 13

    View full-size slide

  15. builder = new PlusShare.Builder(this, mPC);
    builder.setMessage("Create a Google+ Page");
    builder.setContentUrl(
    Uri.parse("https://eg.com/pages/"));
    builder.setContentDeepLinkId("/pages/",
    null, null, null);
    builder.addCallToAction("CREATE_ITEM",
    Uri.parse("http://eg.com/pages/create"),
    "/pages/create");
    startActivityForResult(builder.build(), 0);
    Android
    Friday, 15 March 13

    View full-size slide

  16. builder = [[GPPShare sharedInstance]
    shareDialog];
    [builder setPrefillText:@"Create a Page!"];
    [builder setURLToShare:[NSURL
    URLWithString:@"http://eg.com/pages"]];
    [builder setContentDeepLinkID:@"/pages/"];
    [builder setCallToActionButtonWithLabel:
    @"CREATE_ITEM"
    URL:@"http://eg.com/pages/create"
    deepLinkID:@"/pages/create"];
    [builder open];
    iOS
    Friday, 15 March 13

    View full-size slide

  17. Single Identity
    Friday, 15 March 13

    View full-size slide

  18. Single Identity
    Friday, 15 March 13

    View full-size slide

  19. Single Identity
    Friday, 15 March 13

    View full-size slide

  20. Google+ Sign-In
    Friday, 15 March 13

    View full-size slide

  21. mPlusClient = new PlusClient.Builder(
    this.getApplicationContext(), this, this)
    .setScopes(PLUS_LOGIN)
    .setVisibleActivities(
    "http://schemas.google.com/AddActivity")
    .build();
    Android
    Friday, 15 March 13

    View full-size slide

  22. Consent
    onConnection
    Failed
    onActivity
    Result
    onStart
    onConnected
    Account
    Chooser
    connect
    startResolution
    forResult
    connect
    connect
    connect
    Friday, 15 March 13

    View full-size slide

  23. GPPSignIn *signIn =
    [GPPSignIn sharedInstance];
    signIn.clientID = @"CLIENT_ID_GOES_HERE";
    signIn.scopes = [NSArray arrayWithObjects:
    kGTLAuthScopePlusLogin, nil];
    signIn.actions = [NSArray arrayWithObjects:
    @"http://schemas.google.com/AddActivity",
    nil];
    signIn.delegate = self;
    iOS
    Friday, 15 March 13

    View full-size slide

  24. Google+ /
    Chrome /
    Safari
    GPPSignIn
    authenticate
    trySilent
    Authentication
    finishedWith
    Auth:error
    GPPURLHandler
    Friday, 15 March 13

    View full-size slide

  25. Types of Identity
    Friday, 15 March 13

    View full-size slide

  26. Performed Identity
    Friday, 15 March 13

    View full-size slide

  27. Moment moment = new Moment.Builder()
    .setType("http://schemas.google.com"
    + "/ReviewActivity");
    .setTarget(target)
    .setResult(result)
    .build();
    if (mPlusClient.isConnected()) {
    mPlusClient.writeMoment(moment);
    }
    Android
    Friday, 15 March 13

    View full-size slide

  28. GTLPlusMoment *moment =
    [[[GTLPlusMoment alloc] init]];
    moment.type = @"http://schemas.google.com"
    @"/ReviewActivity";
    moment.target = target;
    moment.result = result;
    GTLQueryPlus *query = [GTLQueryPlus
    queryForMomentsInsertWithObject:moment
    userId:@"me"
    collection:kGTLPlusCollectionVault];
    iOS
    Friday, 15 March 13

    View full-size slide

  29. Social Identity
    Friday, 15 March 13

    View full-size slide

  30. public void onConnected() {
    // ...
    mPlusClient.loadPerson(this, "me");
    }
    public void onPersonLoaded(
    ConnectionResult status, Person person) {
    if (status.getErrorCode() ==
    ConnectionResult.SUCCESS) {
    Log.d(TAG, "Display Name: " +
    person.getDisplayName());
    }
    }
    Android
    Friday, 15 March 13

    View full-size slide

  31. GTLQueryPlus *query = [GTLQueryPlus
    queryForPeopleListWithUserId:@"me"
    collection:kGTLPlusCollectionVisible];
    [plusService executeQuery:query
    completionHandler:^(id ticket,
    GTLPlusPeopleFeed *peopleFeed,
    NSError *error) {
    if (!error) {
    NSArray* people= [peopleFeed.items];
    }
    }];
    iOS
    Friday, 15 March 13

    View full-size slide

  32. Single Identity
    Friday, 15 March 13

    View full-size slide

  33. Many Devices
    Many Apps
    Single Identity
    Friday, 15 March 13

    View full-size slide

  34. Friday, 15 March 13

    View full-size slide

  35. [email protected]
    http://profiles.google.com/ianbarber
    http://twitter.com/ianbarber
    http://developers.google.com/+
    http://github.com/googleplus
    Thank You
    Friday, 15 March 13

    View full-size slide