Firebase Database Plugin
This plugin allows you to access firebase database api.
Legacy:
This plugin is completely different from the old lua plugin. Please see docs and sourcePlatforms:
Android 4.4+ and iOS 8+Functions:
firebaseDatabase.init()
firebaseDatabase.setOnline(isActive)
--isActive(boolean) if set to true then we are online. If set to false we are offline.firebaseDatabase.set(path, data, listener)
-- set datapath(string) path to set data
data(string, boolean, interger, table) data to set at the path specified
listener(function) If event.isError == true then no data was set and an event.error is returned. If event.isError == false then data was set.
firebaseDatabase.update(path, data, listener)
-- update datapath(string) path to update data
data(table) data to update at the path specified
listener(function) If event.isError == true then no data was updated and an event.error is returned. If event.isError == false then data was updated.
firebaseDatabase.delete(path, listener)
-- update datapath(string) path to delete data
listener(function) If event.isError == true then no data was deleted and an event.error is returned. If event.isError == false then data was deleted.
firebaseDatabase.get(path, listener)
-- update datapath(string) path to get data
listener(function) If event.isError == true then no data was received and an event.error is returned. If event.isError == false then data was received and event.data is returned which contains data at given path.
Please go to your firebase console. Go to Realtime Database>Rules and turn off user auth for database realtime access
Make sure you download and include GoogleServices-Info.plist and put in root folder of corona project. Also add your google-services.json to your root folder and useGoogleServicesJson = true in build.settings.


