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

Beyond Serverless

Beyond Serverless

Firebase goes beyond being a tool for making your application serverless; it is a complete solution to control many more aspects of your product.

Find out what's beyond the amazing Serverless talk, get on an exciting trip of Deeplinking, Play Services and Analytics.

Saúl Díaz

July 26, 2016
Tweet

More Decks by Saúl Díaz

Other Decks in Programming

Transcript

  1. VS

  2. 1. compile 'com.google.firebase:firebase-core:9.2.1' 2. firebase = FirebaseAnalytics. getInstance((Context) object); 3.

    final Bundle props = new Bundle(); props.putString( "type", type); firebase.logEvent("login_completed", props); Firebase Analytics
  3. Firebase Remote Config 1. compile 'com.google.firebase:firebase-crash:9.2.1' 2. mFirebaseRemoteConfig = FirebaseRemoteConfig

    .getInstance(); FirebaseRemoteConfigSettings configSettings = new FirebaseRemoteConfigSettings.Builder() .setDeveloperModeEnabled(BuildConfig. DEBUG) .build(); firebase.setConfigSettings(configSettings);
  4. firebase.fetch(cacheExpirationTime) .addOnSuccessListener( new OnSuccessListener<Void>() { @Override public void onSuccess(Void aVoid)

    { Log. d(TAG, "Fetch Succeeded"); // Once the config is successfully fetched it must be activated before newly fetched // values are returned. firebase.activateFetched(); // Set A/B Values } }) .addOnFailureListener( new OnFailureListener() { @Override public void onFailure(@NonNull Exception exception) { Log. d(TAG, "Fetch failed"); // Set default values } }); Firebase Remote Config
  5. Firebase App Invites 1. compile 'com.google.firebase:firebase-invites:9.2.1' 2. this.client = new

    GoogleApiClient.Builder(context) .addApi(AppInvite. API) .build(); 3. final Intent intent = new AppInviteInvitation.IntentBuilder("Invite users to BeAuthentic") .setMessage("BeAuthentic is the ultimate demo app") .setDeepLink(Uri.parse("http://beauthentic.com/invite")) .build(); startActivityForResult(intent, REQUEST_INVITE);
  6. https://example.app.goo.gl/?link=https://www.example.com/someresource &apn=com.example.android // Android Package &amv=3 // Min Android Version

    &al=exampleapp://someresource //Alternate URL for Android App &afl=http://play.google.com // Open if Android app is not installed &ibi=com.example.ios // iOS Package &isi=1234567 //iOS Min version &ius=exampleapp // iOS Custom Schema &ifl=http://itunes.apple.com // Open if iOS app is not installed &ipbi=com.example.ios // The same, for iPads &ipfl=http://itunes.apple.com
  7. AppInvite.AppInviteApi.getInvitation(client, this, true) .setResultCallback( new ResultCallback<AppInviteInvitationResult>() { @Override public void

    onResult(@NonNull AppInviteInvitationResult result) { if (result.getStatus().isSuccess()) { // Extract deep link from Intent Intent intent = result.getInvitationIntent(); String deepLink = AppInviteReferral.getDeepLink(intent); // Do whatever you want with the deeplink } } });
  8. Thing object = new Thing.Builder() .setName("Zara looks") // all this

    is localizable! .setDescription("A collection of Zara looks") .setUrl(Uri.parse("https://chicisimo.com/albums/213f62")) .build(); Action action = new Action.Builder(Action.TYPE_VIEW) .setObject(object) .setActionStatus(Action.STATUS_TYPE_COMPLETED) .build(); AppIndex.AppIndexApi.start(client, action); // When finishing with the screen AppIndex.AppIndexApi.end(client, action);