Skip to content
This repository has been archived by the owner on May 17, 2022. It is now read-only.
/ Firebase-ANE Public archive

Firebase ANE collection give you access to the Google Firebase project in your AdobeAir projects supported on both Android and iOS with 100% identical ActionScript API.

Notifications You must be signed in to change notification settings

myflashlab/Firebase-ANE

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

99 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Firebase AIR Native Extension

Firebase ANE gives you access to the Google Firebase project in your AIR projects supported on both Android and iOS with 100% identical ActionScript API.

If you decide to use Firebase in your next AIR project, you should consider the following structure: Firebase AIR Native Extension is consist of a Core ANE plus some other individual ANEs which are all dependent on the Core. i.e, If you wish to use Firebase Cloud Messaging (FCM), you need to embed the Core ANE first and then use the required ANE(s) for the FCM. This structure will make sure that you are not compiling unused native code in your project. In result, your app file size will be as small as possible and faster to debug/compile. The Wiki pages will provide you detailed information about how you can embed each ANE based on the Firebase feature you wish to use in your app.

Main Features:

  • Analytics Reimagine analytics for mobile
  • Cloud Messaging (FCM) Deliver and receive messages across platforms reliably
    • Also includes the OneSignal library.
  • Authentication Reduce friction with robust authentication
  • Realtime Database Store and sync app data in realtime
  • Functions Run backend code in response to events
  • Firestore Store and sync app data at global scale
  • Storage Store files with ease
  • Remote Config Customize your app on the fly
  • Performance Gain insight into your app's performance issues.
  • Crashlytics Get clear, actionable insight into app issues
  • Dynamic Links Send users to the right place inside your app
  • MLKit Use machine learning in your apps to solve real-world problems Deprecated

find the latest asdoc for Firebase ANEs here.
How to get started? read here

Sample AS3 codes

Air Usage

import com.myflashlab.air.extensions.dependency.OverrideAir;
import com.myflashlab.air.extensions.firebase.core.*;

// Remove OverrideAir debugger in production builds
OverrideAir.enableDebugger(function ($ane:String, $class:String, $msg:String):void
{
	trace($ane+" ("+$class+") "+$msg);
});

// initialize the Firebase as early as possible in your project
var isConfigFound:Boolean = Firebase.init();

// If you wish to see the Firebase SDK debugging logs in detail, use the following
Firebase.setLoggerLevel(FirebaseConfig.LOGGER_LEVEL_MAX);

/*
	Calling Firebase.init() is just good enough to initialize Firebase core in your Air 
	project. However for debugging reasons, you can check the config values like below:
	
	What config files you may ask? well, This is explained in details in the Wiki pages. 
	https://github.com/myflashlab/Firebase-ANE/wiki but to give you a quick idea, I 
	should say that before being able to start with Firebase, you need to create a 
	Firebase account (It's free) and introduce your app to your Firebase console. When 
	you do that, your Firebase console will give you a config file. it will be a .plist 
	for iOS "GoogleService-Info.plist" and a .json file "google-services.json" for the 
	Android side. The content of these two config files are similar to these: 
	https://github.com/myflashlab/Firebase-ANE/tree/master/AIR/bin
	
	You need to make sure that these two config files are being embedded in your project 
	by putting them in the bin folder of your project. (Next to the main .swf file of 
	your app)
*/

if (isConfigFound)
{
	var config:FirebaseConfig = Firebase.getConfig();
	trace("default_web_client_id = " + 			config.default_web_client_id);
	trace("firebase_database_url = " + 			config.firebase_database_url);
	trace("gcm_defaultSenderId = " + 			config.gcm_defaultSenderId);
	trace("google_api_key = " + 				config.google_api_key);
	trace("google_app_id = " + 					config.google_app_id);
	trace("google_crash_reporting_api_key = " + config.google_crash_reporting_api_key);
	trace("google_storage_bucket = " + 			config.google_storage_bucket);
	trace("project_id = " + 					config.project_id);

	// You must init other Firebase children after a successful initialization of the Core ANE.
	// readyToUseFirebase();
}
else
{
	trace("Config file is not found!");
}

/*
	To know how to use other features of Firebase, read the Wiki:
	https://github.com/myflashlab/Firebase-ANE/wiki
*/

Firebase ANEs are dependent on some other ANEs and frameworks. Complete information about these dependencies are explained in wiki pages. However, to make sure you are not confused with all these settings, you are encouraged to use the ANE-LAB Software.

Requirements

  1. Android API 19+
  2. iOS SDK 10.0+
  3. Air SDK 30+
  4. Every Firebase ANE might need some dependency Frameworks/ANEs which is explained in details here.

Commercial Version

Firebase ANE

Tutorials

How to embed ANEs into FlashBuilder, FlashCC and FlashDevelop
How to support Firebase in my Air app?
How to use Firebase Realtime database?
How to use Firebase Firestore?
How to use Firebase Remote Config?
How to use Firebase Authentication?
How to use Firebase Storage?
How to use Crashlytics?
How to use Firebase FCM + OneSignal?
How to use Firebase Analytics?
How to use Firebase Dynamic Links?
How to use Firebase MLKit?
How to use Firebase Performance?
How to use Firebase Functions?

Premium Support

Premium Support package If you are an active MyFlashLabs club member, you will have access to our private and secure support ticket system for all our ANEs. Even if you are not a member, you can still receive premium help if you purchase the premium support package.


DISCRIMINATION: Firebase SDKs are developed by Google and they own every copyright to the Firebase "native" projects. However, we have used their "compiled" native SDKs to develop the ActionScript API to be used in Adobe Air mobile projects. Moreover, as far as the documentations, we have copied and when needed has modified the Google documents so it will fit the needs of Adobe Air community. If you wish to see the original documentations in Android/iOS, visit here. But if you are interested to do things in Adobe Air, then you are in the right place.

About

Firebase ANE collection give you access to the Google Firebase project in your AdobeAir projects supported on both Android and iOS with 100% identical ActionScript API.

Topics

Resources

Stars

Watchers

Forks