-
Notifications
You must be signed in to change notification settings - Fork 20
Android guide
Mk5 edited this page Oct 18, 2020
·
11 revisions
NOTE! Firebase Crash Reporting will be unavailable after 9 September 2018. Crash reporting should be done by Crashlytics and Fabric. Read this Crashlytics wiki page if you need it
Complete guide is here: https://firebase.google.com/docs/android/setup
In short:
-
Add the google-services classpath to the
buildscript:buildscript{ // ... dependencies { classpath 'com.google.gms:google-services:4.3.4' } } -
Modify
android/build.gradleas follow:// dependencies dependencies{ implementation "pl.mk5.gdx-fireapp:gdx-fireapp-android:$gdxFireappVersion" // the version you are using implementation platform("com.google.firebase:firebase-bom:25.12.0") implementation 'com.google.firebase:firebase-core' implementation 'com.google.firebase:firebase-storage' implementation 'com.google.firebase:firebase-auth' implementation 'com.google.firebase:firebase-database' implementation 'com.google.firebase:firebase-crashlytics' implementation 'com.google.firebase:firebase-analytics' // Add this if you need google authorization implementation 'com.google.android.gms:play-services-auth:18.1.0' } // put following line at bottom of the file apply plugin: 'com.google.gms.google-services'
If you have a problem with google dependencies the google maven repository is probably missing. You should add it then.
repositories { maven { url 'https://maven.google.com' } // or google() depends of your build tools version. } -
Add
google-services.json(it is a firebase android configuration file, you can download it from firebase console) atandroid/google-services.json -
That's it ! ;)
- Getting started
-
Usage 2.x/3.x
- Promises
- Filtering API
- Google Sign in
- Apple Sign in
- Mock other platforms
- Debug
- Database POJO Conversion
-
Examples
- Anonymous authentication
- Create user
- Sign in / Sign out
- Google sign in
- User management
- Upload image to storage
- Download image from storage
- Upload bytes to storage
- Download bytes from storage
- Delete something from storage
- Analytics API methods
- Crash API methods
- Database read value
- Database read object
- Database set value
- Database limit equal
- Database reference listener
- Database read objects list
- Database child event
- Database transaction
- Database sharding
- Database onDisconnect
- General examples
- Kotlin
- Usage 1.x
- Donate