Thursday, July 21, 2016

Firebase in Android (FCM)

Firebase in Android



Firebase Cloud Messaging (FCM) is a cross-platform messaging solution that lets you reliably deliver messages at no cost.
Using FCM, you can notify a client app that new email or other data is available to sync. You can send notification messages to drive user re-engagement and retention. For use cases such as instant messaging, a message can transfer a payload of up to 4KB to a client app.

 Firstly you should know how to implement FCM in your Android app, You will get complete information about this here.

Few useful features of firebase are

  1. Firebase Cloud Messaging
  2. Firebase Authentication
  3. Firebase Realtime Database
  4. Firebase Storage
  5. Firebase Crash Reporting

 1.Firebase Cloud Messaging

 Key functions

Send notification messages or data messages -->    Send notification messages that are displayed to your user. Or send data messages and determine completely what happens in your application code.



Versatile message targeting -->    Distribute messages to your client app in any of three ways — to single devices, to groups of devices, or to devices subscribed to topics.



Send messages from client apps -->    Send acknowledgments, chats, and other messages from devices back to your server over FCM’s reliable and battery-efficient connection channel.

How does it work?

Firebase Cloud Messaging architecture diagram An FCM implementation includes an app server that interacts with FCM via HTTP or XMPP protocol, and a client app. You can compose and send messages using the app server or the Notifications console.
Firebase Notifications is built on Firebase Cloud Messaging and shares the same FCM SDK for client development. For testing or for sending marketing or engagement messages with powerful built-in targeting and analytics, you can use Notifications. For deployments with more complex messaging requirements, FCM is the right choice.

2. Firebase Authentication

Most apps need to know the identity of a user. Knowing a user's identity allows an app to securely save user data in the cloud and provide the same personalized experience across all of the user's devices.
Firebase Authentication provides backend services, easy-to-use SDKs, and ready-made UI libraries to authenticate users to your app. It supports authentication using passwords, popular federated identity providers like Google, Facebook and Twitter, and more.
Firebase Authentication integrates tightly with other Firebase services, and it leverages industry standards like OAuth 2.0 and OpenID Connect, so it can be easily integrated with your custom backend.


Links do the right thing for the platform

Key functions

You can sign in users to your Firebase app either by using FirebaseUI as a complete drop-in auth solution or by using the Firebase Authentication SDK to manually integrate one or several sign-in methods into your app.

FirebaseUI (beta)  

Easily add a complete sign-in system to your app. FirebaseUI provides a drop-in auth solution that handles the UI flows for signing in users with email addresses and passwords, Google Sign-In, and Facebook Login.
The FirebaseUI Auth component implements best practices for authentication on mobile devices and websites, which can maximize sign-in and sign-up conversion for your app. It also handles edge cases like account recovery and account linking that can be security sensitive and error-prone to handle correctly.
FirebaseUI can be easily customized to fit in with the rest of your app's visual style, and it is open source, so you aren't constrained in realizing the user experience you want.

Email and password based authentication    

Federated identity provider integration     

Authenticate users by integrating with federated identity providers. The Firebase Authentication SDK provides methods that allow users to sign in with their Google, Facebook, Twitter, and GitHub accounts.
Google     iOS Android Web C++
Facebook     iOS Android Web C++
Twitter     iOS Android Web C++
GitHub     iOS Android Web C++

Custom auth system integration    

Anonymous auth

 

 

 

3.Firebase Realtime Database

Store and sync data with our NoSQL cloud database. Data is synced across all clients in realtime, and remains available when your app goes offline.
The Firebase Realtime Database is a cloud-hosted database. Data is stored as JSON and synchronized in realtime to every connected client. When you build cross-platform apps with our iOS, Android, and JavaScript SDKs, all of your clients share one Realtime Database instance and automatically receive updates with the newest data.

 

  Key functions

Realtime  ->   Instead of typical HTTP requests, the Firebase Realtime Database uses data synchronization—every time data changes, any connected device receives that update within milliseconds. Provide collaborative and immersive experiences without thinking about networking code.


Offline  ->   Firebase apps remain responsive even when offline because the Firebase Realtime Database SDK persists your data to disk. Once connectivity is reestablished, the client device receives any changes it missed, synchronizing it with the current server state.

Accessible from Client Devices ->    The Firebase Realtime Database can be accessed directly from a mobile device or web browser; there’s no need for an application server. Security and data validation are available through the Firebase Realtime Database Security Rules, expression-based rules that are executed when data is read or written.

 

 

4.Firebase Storage

Firebase Storage is built for app developers who need to store and serve user-generated content, such as photos or videos.
Firebase Storage provides secure file uploads and downloads for your Firebase apps, regardless of network quality. You can use it to store images, audio, video, or other user-generated content. Firebase Storage is backed by Google Cloud Storage, a powerful, simple, and cost-effective object storage service.

 

 Key functions


Robust   ->  Firebase Storage performs uploads and downloads regardless of network quality. Uploads and downloads are robust, meaning they restart where they stopped, saving your users time and bandwidth.


Secure   ->  Firebase Storage integrates with Firebase Authentication to provide simple and intuitive authentication for developers. You can use our declarative security model to allow access based on filename, size, content type, and other metadata.


Scalable  ->   Firebase Storage is backed by Google Cloud Storage for petabyte scale when your app goes viral. Effortlessly grow from prototype to production using the same infrastructure that powers Snapchat.

How does it work?

Developers use the Firebase Storage SDK to upload and download files directly from clients. If the network connection is poor, the client is able to retry the operation right where it left off, saving your users time and bandwidth.
Firebase Storage stores your files in a Google Cloud Storage bucket shared with the default Google App Engine app, making them accessible through both Firebase and Google Cloud APIs. This allows you the flexibility to upload and download files from mobile clients via Firebase and do server-side processing such as image filtering or video transcoding using Google Cloud Platform. Firebase Storage scales automatically, meaning that there's no need to migrate from Firebase Storage to Google Cloud Storage or any other provider.
This integration makes files accessible directly from the Google Cloud Storage gcloud client libraries, so you can use Firebase Storage with your favorite server-side languages. For more control, you can also use the Google Cloud Storage XML and JSON APIs.
Firebase Storage integrates seamlessly with Firebase Authentication to identify users, and provides a declarative security language that lets you set access controls on individual files or groups of files, so you can make files as public or private as you want.



5. Firebase Crash Reporting

Comprehensive and actionable information to help diagnose and fix problems in your app.
Crash Reporting creates detailed reports of the errors in your app. Errors are grouped into clusters of similar stack traces and triaged by the severity of impact on your users. In addition to automatic reports, you can log custom events to help capture the steps leading up to a crash. Crash Reporting is currently in beta release while we resolve some known issues on Android and iOS.

 Key functions

Monitor fatal and non-fatal errors   ->  Monitor fatal errors in iOS and fatal and non-fatal errors in Android. Reports are triaged by the severity of impact on users.


Collect the data you need to diagnose problems  ->   Each report contains a full stack trace as well as device characteristics, performance data, and user circumstances when the error took place. Similar reports are automatically clustered to make it easier to identify related bugs.


Integrate with Analytics  ->   Errors captured are set as app_exception events in Analytics, allowing you to filter audiences based on who sees errors.


Free and easy  ->   Crash Reporting is free to use. Once you've added Firebase to your app, it's just a few lines of code to enable comprehensive error reporting. 





You can check sample apps from here.

0 comments:

Post a Comment

Don't lose faith when you see others receive answers to their prayers

An elephant and a dog became pregnant at same time. Three months down the line the dog gave birth to six puppies. Six months later the dog...

 

G-Expo Template by Ipietoon Cute Blog Design