July 6, 2016

Firebase for Android Developers

At Google I/O 2016, Google announced that Firebase is expanding to become a unified app platform for Android, iOS and mobile web development. Firebase includes features and integrations designed to help you develop high-quality apps, grow your user base, and earn more money.

Firebase features work independently and you can choose the features that you need. At the heart of Firebase is Firebase Analytics, a free and unlimited analytics solution for mobile apps.



Develop

  • Cloud Messaging: Google Cloud Messaging (GCM) is now Firebase Cloud Messaging (FCM). FCM is a cross-platform messaging solution that lets you reliably send and receive messages to Android, iOS, or the Web at no cost.
  • Authentication: Firebase Authentication provided backend services to authenticate users via Google, Facebook, Twittter, and Github sign-in, email and password, and even custom auth system.
  • Realtime Database: Firebase Realtime Database is a NoSQL cloud database that syncs data across connected clients in realtime, even when your app becomes offline.
  • Storage: Firebase Storage, powered by Google Cloud Storage, provides easy, secure, and scalable uploads and downloads of images, audio files, videos, and other user-generated contents. It also gracefully handles poor network conditions.
  • Hosting:Firebase Hosting allows developers to quickly deploy web apps and static content to a secure content delivery network.
  • Remote Config: Firebase Remote Config is a cloud service that allows you to customize the look and feel of your app without downloading updates, via instantly-updatable parameters.
  • Test Lab:Cloud Test Lab is now Firebase Test Lab for Android. It is a platform where you can automate testing of your app on real devices hosted in Google data centers.
  • Crash Reporting: Firebase Crash Reporting gives you prioritized, actionable reports to help you diagnose and fix problems in your published apps.

Grow

  • Notifications: Firebase Notifications is a free service that enables targeted user notifications for Android and iOS devices without writing a line of code.
  • App Indexing: Firebase App Indexing, formerly Google App Indexing, brings new and existing users to your app from Google search.
  • Dynamic Links: Firebase Dynamic Links are smart URLs that work the way you want them to. They can link to different content depending on the platform they are opened and even persist across app installs.
  • Invites: Firebase Invites is a cross-platform solution for easily sending referral codes or content via personalized SMS or email invitations to their network.
  • AdWords: AdWords Google's advertising platform for user acquisition and engagement, is now integrated with Firebase.

Earn

  • Admob: Firebase is integrated with AdMob, Google's mobile advertising platform that allows you to monetize mobile apps with targeted, in-app ads.

Android Setup

Firebase runs on Google Play Services (9.2+) and is available for Android 2.3 and higher. To add Firebase in your Android project:
  1. Go to the Firebase Console. Create a new project or open an existing one. You can also Import Google Project if you already have one for your app.
  2. Click Add Firebase to your Android app and provide your app's package name (required) and signing certificate (optional).
  3. Download the google-services.json file and copy it to your project's module folder (app).
  4. Add classpath 'com.google.gms:google-services:3.0.0' in your project's build.gradle file.
  5. Add apply plugin: 'com.google.gms.google-services' at the bottom of your module folder's build.gradle file. Add the dependencies for the Firebase SDKs you want to use.

The Firebase SDK dependencies are in the com.google.firebase:firebase-x:9.2.0 format where x can be core (Analytics), database (Realtime Database), storage (Storage), crash (Crash Reporting), auth (Authentication), messaging (Cloud Messaging/Notifications), config (Remote Config), invites (Invites/Dynamic Links), ads (Admob). For Firebase App Indexing, the dependency is com.google.android.gms:play-services-appindexing:9.2.0



What's Next?

Try the Firebase Android Codelab and read the Firebase Docs to learn more about the new Firebase.


No comments:

Post a Comment