Google Firebase Storage hosts your files.
TABLE OF CONTENTS
- Linking Firebase Credentials with Ensemble
- Creating and Managing File Hooks
- Editing or Removing Existing File Hook
- Uploading Files to Firebase Storage
- Upload Files via CSV
In order to use Google Firebase:
- Create new or use existing Gmail account.
- Log in to the account and go to this URL: https://console.firebase.google.com/u/4/?pli=1
- Click on "Add project" and type a name for your project.
- Accept the terms and conditions and click "Create", then when project is created hit "Continue".
- In the left nav-bar, select Authentication under Build, then go to the Sign-in method tab. Ensure Google is enabled here.
- Next to Project Overview on the side nav-bar, select the settings gear icon.
- In the General tab, scroll down to "Your Apps". Choose Android.
- For Android package name, type "com.conversasolutions.ensemble"
- Type any nickname, then register app.
- After this step download config file "google-services.json" then open it using a json viewer app (Notepad++ recommended: https://notepad-plus-plus.org/download/v7.6.1.html)
- You will need "mobilesdk_app_id" and "current_key" later.
- Go to "Service Accounts" tab and click on "Generate new private key"
- After it downloads, open the file. You will need "client_email" value which usually ends in ".iam.gserviceaccount.com" and the "private_key" value.
Linking Firebase Credentials with Ensemble
- Go to the file retrieval page under the company content tab and click on "Configure Service Account" button. under the options in the top-right of the Firebase Storage table.
- For client email field and private key, paste the values you copied from step 6 and full private key you generated in step 5.
- For APP ID, paste the mobilesdk_app_id you got from step 4.
- For API key, paste the current_key you got from step 4.
- You can now use the file retrieval feature.
Creating and Managing File Hooks
A file hook will allow you to upload file(s) from devices in your company to the Firebase storage account provided in the previous step that meet a certain search criteria: storage location, file type, file name, etc.
- Go to the file retrieval page under the company content tab and click on the add "+" button at the top-right of the File Hooks table.
- Fill out the modal accordingly:
As of Android 10, you are only able to retrieve media files from devices (Movies, Pictures, and Music files).
- Alias Name (Optional): the name you would like to give to the file hook.
Select type:
- Starts with: searches specified location for file with name that starts with what is input here.
- Ends with: searches specified location for file with name that ends with what is input here.
- Equals: searches specified location for file with name that matches what is input here.
- Contains: searches specified location for file with name that contains with what is input here.
- File Path: select the specified file path on the device you would like to search. The exact location of where your files can be saved might vary across devices - but generally they will be of the following:
Pictures: /sdcard/DCIM/Camera/
Videos: /sdcard/DCIM/Camera/
Audio: /sdcard/Music/ or /sdcard/Ringtones/ or /sdcard/Audiobooks
Downloads: /sdcard/Download/
- File Name: the search criteria you would like to search the desired locations for.
- Example: To create a file hook for files that contain the jpg extension in the Download folder use the following:
- Alias Name: any
- Select Type: Ends with or Contains
- File Path: /sdcard/Download/
- File Name: jpg
- Click "Save" in the bottom right of the modal and the file hook will be added to the file hooks table and can be used to search on devices within the company.
Editing or Removing Existing File Hook
- Go to the file retrieval page under the company content tab and select the Options in the far-right of the table for the file hook you would like to manage:
- Edit File Hook: edit the existing file hook.
- Remove File Hook: remove the existing file hook.
Uploading Files to Firebase Storage
Upload files to firebase using the file hooks created in the previous steps on devices associated with the company.
- Go to the file retrieval page under the company content tab and select "Retrieve files" in the options (top-right) of the Firebase Storage table.
- A modal will pop-up, fill it out accordingly:
- Select a filehook: select from one of the file hooks created in the previous steps.
- Select Devices: select from the devices currently tied to the company.
- Trigger Upload. If the upload was successful, the file name will appear in the table, as well as a status of "Uploaded".
- Login to your Firebase Storage account to verify the file has been uploaded to the storage bucket.
Upload Files via CSV
Upload files to firebase using the file hooks created in the previous steps on devices associated with the company via a CSV file.
- Prepare a CSV file for batch file retrieval upload. Depending on the devices, the files may look like. Proceed to the next step and select the "help icon" next to "Attach csv file" or click "Download Sample CSV" for more details.
- Go to the file retrieval page under the company content tab and select "Retrieve files" in the options (top-right) of the Firebase Storage table.
- A modal will pop-up, fill it out accordingly:
- Select a filehook: select from one of the file hooks created in the previous steps.
- File attached: supply the csv file created for batch file retrieval.
- This CSV file is only one column. Allowable headers: 'imei', 'IMEI', 'meid', 'MEID', 'mechanicalserial', 'mechanical', 'serial', 'Mechanical Serial', 'mechanical serial'
- Select Upload. If the upload was successful, the file name(s) will appear in the table after some time and you will see a status of "Uploaded".
- Login to your Firebase Storage account to verify the file(s) have been uploaded to the storage bucket.