Showing posts from May, 2018

Simple example of using firestore in Android | Kotlin

Here is the simple example of maintaining database using Firebase instead of SQLite in Kotlin Programming Language. Step 1. Login into Firebase Console and create your project. Step 2. Navigate into Database and follow the steps given there. Step 3. Create your Android project and add the following classpath into root of the project's build.gradle.
classpath '' Step 4. And then add the following plugin into your module's build.gradle.
apply plugin: '' Step 5. And then add the following dependency into your module's build.gradle.
implementation 'com.firebaseui:firebase-ui-firestore:3.3.1' That's all you wanted to access the Firebase's Firestore API in your project.
Here is the methods to create document(Like table in SQLite), Add data to document, edit data from document, delete data from document.
Add data to document using Hashmap. //Create employee using hashmap val employ…