Firebase Analytics Plugin

This plugin allows you store files though firebase storage for iOS(8+) and Android(4.0 +)

Functions:

firebaseStorage.init(bucketUrl)

-- initialize firebase storage

bucketUrl(string)(optional) bucket to use( note no bucket url with result in using deafult bucket)

firebaseStorage.upload(filePath, pathInFirebase, listener)

filePath(path) path to file you want to upload via system.pathForFile()

pathInFirebase(string) where you want to put file in firebase

listener(function) returns event.isError(boolean), event.error(string), and event.downloadURL(string, returned on successful upload)

firebaseStorage.getDownloadURL(pathInFirebase, listener)

pathInFirebase(string) where you want to get file url in firebase

listener(function) returns event.isError(boolean), event.error(string), and event.downloadURL(string, returned if url is found)

firebaseStorage.delete(pathInFirebase, listener)

pathInFirebase(string) where you want to delete file in firebase

listener(function) returns event.isError(boolean) and event.error(string)

How do I download a file:

Setup:

Please go to your firebase console. Go to Storage>Rules and turn off user auth for storage. make sure your code looks like this( don't copy and paste). 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.

Helpful Links:

Example

Support

Get Plugin