-
-
Notifications
You must be signed in to change notification settings - Fork 5
Configuring FirebaseANE
Create your Android app in Firebase Console
Ensure you enter your AIR appId prefixed with air eg air.com.tuarua.firebaseane.example
Download and open google-services.json for reference
Create the following file:
native_extension/ane/META-INF/ANE/Android-ARM/com.tuarua.firebase.FirebaseANE-res/values/values.xml
with the following contents:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">FirebaseANE</string>
<string name="default_web_client_id" translatable="false">[JSON client_id]</string>
<string name="firebase_database_url" translatable="false">[JSON firebase_url]</string>
<string name="gcm_defaultSenderId" translatable="false">[JSON project_number]</string>
<string name="google_api_key" translatable="false">[JSON current_key]</string>
<string name="google_app_id" translatable="false">[JSON mobilesdk_app_id]</string>
<string name="google_crash_reporting_api_key" translatable="false">[JSON current_key]</string>
<string name="google_storage_bucket" translatable="false">[JSON storage_bucket]</string>
<string name="project_id" translatable="false">[JSON project_id]</string>
<string name="ga_trackingId" translatable="false">[JSON tracking_id]</string>
</resources>
Edit the values above with the corresponding values from google-services.json
With our config values set we now need to apply these to FirebaseANE.
To do this we are going to modify FirebaseANE.ane by zipping the xml file into it.
Change directory into the native_extension/ane folder eg
cd /MyMac/dev/AIR/Firebase-ANE/native_extension/ane
bash /MyMac/dev/AIR/Firebase-ANE/native_extension/ane/apply_firebase_config.sh
If using Windows for Android use Command Prompt
apply_firebase_config.bat
Create your iOS app in Firebase Console
Ensure you enter your AIR appId with NO air prefix eg com.tuarua.firebaseane.example
Download and copy GoogleService-Info.plist into the src folder of your project. You will need to package this file in the root when packaging your AIR app.
If you are including many FirebaseANEs (or many ANEs in general) you may get Memory errors from ADT when compiling your app. Ensure you are allocating a large enough JVM heap size:
Portions of this page are modifications based on work created and shared by Google and used according to terms described in the Creative Commons 3.0 Attribution License.
Project setup
Analytics
Authentication
Dynamic Links
Google Sign In
Firestore
- Configuring the ANE
- Get Started
- Add and Manage Data
- Query Data
- Get Data
- Get Realtime Updates
- Perform Simple and Compound Queries
- Order and Limit Data
- Paginate Data
Messaging
One Signal
Performance
Remote Config
Storage
- Configuring the ANE
- Get Started
- Create a Reference
- Upload Files
- Download Files
- Use File Metadata
- Delete Files
Crashlytics
Vision
- Detect faces
- Scan barcodes
- Label images
- Recognize landmarks
- Natural Language
- Custom Models
External Links