Diese Präsentation wurde erfolgreich gemeldet.
Die SlideShare-Präsentation wird heruntergeladen. ×

Let's your users share your App with Friends: App Invites for Android

Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige

Hier ansehen

1 von 57 Anzeige

Let's your users share your App with Friends: App Invites for Android

Herunterladen, um offline zu lesen

Thinking about free marketing ? Want to give the opportunity to your user to share your app with their friends ? Maybe you just need more downloads ? Not sure where to start? Android App Invite is one of the answer you were looking for.
You will learn more about app invite is all about and why you need to care about. This talk will teach you exactly what you need to know to integrate app invite in your application.
At the end of this class, you will learn how to:

- integrate app invite in your app
- test your app invite for sending and reception of invites
- Manage invites tracking using Google Analytics API

Thinking about free marketing ? Want to give the opportunity to your user to share your app with their friends ? Maybe you just need more downloads ? Not sure where to start? Android App Invite is one of the answer you were looking for.
You will learn more about app invite is all about and why you need to care about. This talk will teach you exactly what you need to know to integrate app invite in your application.
At the end of this class, you will learn how to:

- integrate app invite in your app
- test your app invite for sending and reception of invites
- Manage invites tracking using Google Analytics API

Anzeige
Anzeige

Weitere Verwandte Inhalte

Diashows für Sie (20)

Ähnlich wie Let's your users share your App with Friends: App Invites for Android (20)

Anzeige

Aktuellste (20)

Anzeige

Let's your users share your App with Friends: App Invites for Android

  1. 1. Let's your users share your App with Friends: APP INVITES FOR ANDROID
  2. 2. Story Time!
  3. 3. @ewilly1 Android Developer
  4. 4. Why Should I care ?
  5. 5. Word of mouth Legacy
  6. 6. Word of mouth Legacy
  7. 7. Word of mouth Legacy
  8. 8. We (USERS) care about “Happiness only real when shared.” Christopher McCandless
  9. 9. Bad and Good Pattern Please don’t stalk
  10. 10. Bad and Good Pattern The smart way: be ready be kind
  11. 11. Recap
  12. 12. Google App Invite API
  13. 13. How does it work ?
  14. 14. Let’s add it to our app Prepare Setup Configuration File Code
  15. 15. Prepare
  16. 16. Setup manifest <meta-data android:name="com.google.android.gms.version" android: value="@integer/google_play_services_version" />
  17. 17. Setup gradle APP compile 'com.google.android.gms:play-services-appinvite:8.3.0' PROJECT classpath 'com.google.gms:google-services:1.5.0-beta2'
  18. 18. Configuration File Google developer console Enable App Invite API SHA-1 key Download your file
  19. 19. Code 1. Connect Google Client API with APP Invite Service Enabled 2. Start App Invite Intent 3. handle the result in the callback 4. Check if someone installed the app from an invitation
  20. 20. mGoogleApiClient = new GoogleApiClient.Builder(this) .addApi(AppInvite.API) .enableAutoManage(this, this) .build();
  21. 21. mGoogleApiClient = new GoogleApiClient.Builder(this) .addApi(AppInvite.API) .enableAutoManage(this, this) .build();
  22. 22. mGoogleApiClient = new GoogleApiClient.Builder(this) .addApi(AppInvite.API) .enableAutoManage(this, this) .build();
  23. 23. @Override protected void onStart() { super.onStart(); mGoogleApiClient.connect(); } @Override protected void onStop() { super.onStop(); mGoogleApiClient.disconnect(); }
  24. 24. @Override protected void onStart() { super.onStart(); mGoogleApiClient.connect(); } @Override protected void onStop() { super.onStop(); mGoogleApiClient.disconnect(); }
  25. 25. public void onConnectionFailed(ConnectionResult connectionResult) { Log.d(TAG, "onConnectionFailed:" + connectionResult); showMessage(getString(R.string.google_play_services_error)); }
  26. 26. private void onInviteClicked() { Intent intent = new AppInviteInvitation.IntentBuilder(getString(R.string.invitation_title)) .setMessage(getString(R.string.invitation_message)) .setDeepLink(Uri.parse(getString(R.string.invitation_deep_link))) .setCustomImage(Uri.parse(getString(R.string.invitation_custom_image))) .setCallToActionText(getString(R.string.invitation_cta)) .build(); startActivityForResult(intent, REQUEST_INVITE); }
  27. 27. private void onInviteClicked() { Intent intent = new AppInviteInvitation.IntentBuilder(getString(R.string.invitation_title)) .setMessage(getString(R.string.invitation_message)) .setDeepLink(Uri.parse(getString(R.string.invitation_deep_link))) .setCustomImage(Uri.parse(getString(R.string.invitation_custom_image))) .setCallToActionText(getString(R.string.invitation_cta)) .build(); startActivityForResult(intent, REQUEST_INVITE); }
  28. 28. protected void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); Log.d(TAG, "onActivityResult: requestCode=" + requestCode + ", resultCode=" + resultCode); if (requestCode == REQUEST_INVITE) { if (resultCode == RESULT_OK) { String[] ids = AppInviteInvitation.getInvitationIds(resultCode, data); Log.d(TAG, getString(R.string.sent_invitations_fmt, ids.length)); } else { showMessage(getString(R.string.send_failed)); } } }
  29. 29. protected void onCreate(Bundle savedInstanceState) { boolean autoLaunchDeepLink = true; AppInvite.AppInviteApi.getInvitation(mGoogleApiClient, this, autoLaunchDeepLink) .setResultCallback( new ResultCallback<AppInviteInvitationResult>() { @Override public void onResult(AppInviteInvitationResult result) { Log.d(TAG, "getInvitation:onResult:" + result.getStatus()); } }); }
  30. 30. protected void onCreate(Bundle savedInstanceState) { boolean autoLaunchDeepLink = true; AppInvite.AppInviteApi.getInvitation(mGoogleApiClient, this, autoLaunchDeepLink) .setResultCallback( new ResultCallback<AppInviteInvitationResult>() { @Override public void onResult(AppInviteInvitationResult result) { Log.d(TAG, "getInvitation:onResult:" + result.getStatus()); } }); }
  31. 31. protected void onCreate(Bundle savedInstanceState) { boolean autoLaunchDeepLink = true; AppInvite.AppInviteApi.getInvitation(mGoogleApiClient, this, autoLaunchDeepLink) .setResultCallback( new ResultCallback<AppInviteInvitationResult>() { @Override public void onResult(AppInviteInvitationResult result) { Log.d(TAG, "getInvitation:onResult:" + result.getStatus()); } }); }
  32. 32. Recap
  33. 33. Numbers matters Let's measure it
  34. 34. Overview of Google Analytics API measure user activity Collection - Configuration - Processing - Reporting
  35. 35. Integrating Google Analytics API to measure your invites Prepare Setup Get tracking Id Configuration File Code
  36. 36. Prepare
  37. 37. Setup manifest <uses-permission android:name="android.permission.INTERNET"/> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/> <application android:name="AnalyticsApplication"> ... </application>
  38. 38. Setup gradle APP apply plugin: 'com.google.gms.google-services' compile 'com.google.android.gms:play-services-analytics:8.3.0'
  39. 39. Tracking ID Create Account Add a Mobile Project to track -> Tracking ID Configure Analytics to process App Invites data Create App Invite DashBoard
  40. 40. Configuration File Google developer console Enable Analytics API Download your file
  41. 41. Code 1. Create a Tracker 2. Generate Event (sent and received invites)
  42. 42. Application level public static Tracker tracker() { return tracker; } @Override public void onCreate() { super.onCreate(); analytics = GoogleAnalytics.getInstance(this); tracker = analytics.newTracker(TRACKING-ID); tracker.enableExceptionReporting(true); tracker.enableAdvertisingIdCollection(true); tracker.enableAutoActivityTracking(true); }
  43. 43. Application level public static Tracker tracker() { return tracker; } @Override public void onCreate() { super.onCreate(); analytics = GoogleAnalytics.getInstance(this); tracker = analytics.newTracker(TRACKING-ID); tracker.enableExceptionReporting(true); tracker.enableAdvertisingIdCollection(true); tracker.enableAutoActivityTracking(true); }
  44. 44. Invite sent // Get tracker. Tracker t = ((KitApplication) getApplication()). tracker(); // Build and send an Event. t.send(new HitBuilders.EventBuilder() .setCategory(getString(R.string.category_id)) .setAction(getString(R.string.sent)) .build());
  45. 45. Invite sent // Get tracker. Tracker t = ((KitApplication) getApplication()). tracker(); // Build and send an Event. t.send(new HitBuilders.EventBuilder() .setCategory(getString(R.string.category_id)) .setAction(getString(R.string.sent)) .build());
  46. 46. Invite received Tracker t = ((MYApplication) getApplication()). tracker(); // Build and send an Event. t.send(new HitBuilders.EventBuilder() .setCategory(getString(R.string.category_id)) .setAction(getString(R.string.accepted)) .build());
  47. 47. Let's see some numbers
  48. 48. Recap
  49. 49. Show time (Live test)
  50. 50. Video https://goo.gl/Gk0iMY
  51. 51. @ewilly1 mbouendaw@yahoo.fr Code:goo.gl/POESae Slides:goo.gl/PBkzVm Thanks for your attention!
  52. 52. Q & A

×