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

I.1 Add Dynamic links

Hadi Tavakoli edited this page Jun 16, 2019 · 5 revisions

Connect your AdobeAIR app to Firebase

  1. Make sure you are considering the minimum requirements for running Firebase.
  2. Install the Firebase SDK.
  3. In the Firebase console, add your app to your Firebase project.
  4. Make sure you have added your app SHA certificate fingerprints on the Android side. (Firebase console > select your app > on the Overview page select the settings option of your Android app > On the general tab of the settings page, scroll down and you will see a ADD FINGERPRINT button. If you don't know how to find out your app's SHA-1 and SHA-256, read this post

Add DynamicLinks ANE to your app

Before adding Dynamic Links (or any of the other Firebase child ANEs) to your AdobeAIR app, you need to make sure you have setup the firebaseCore.ane correctly in your project. To add Dynamic Links, you need to add the required ANEs and Frameworks to your project. These dependencies are explained in details in this document.

AIR manifest .xml file
Beside changes you need to make to your manifest .xml file when implementing the firebaseCore.ane you need to add the following changes also to make the Dynamic Links ANE work properly:

<!-- 
	Add this meta-data tag under <service android:name="com.google.firebase.components.ComponentDiscoveryService" android:exported="false">

	You should have added the above service tag when you were implementing the FirebaseCore ANE.
-->

<service android:name="com.google.firebase.components.ComponentDiscoveryService" android:exported="false">

	<!--
		Other meta-data tags required by other ANEs.
	-->

	<!-- Required by firebase_dynamicLinks.ane -->
	<meta-data
	android:name="com.google.firebase.components:com.google.firebase.dynamiclinks.internal.FirebaseDynamicLinkRegistrar"
	android:value="com.google.firebase.components.ComponentRegistrar"/>

</service>





<android>
	<manifestAdditions>
		<manifest android:installLocation="auto">
			<application>
				
				<!-- 
					Other settings required by the Firebase core or other ANEs...
					
					Change the main activity tag and include the scheme information
					to your app.
				-->
				
				<activity>
					<intent-filter>
						<action android:name="android.intent.action.MAIN" />
						<category android:name="android.intent.category.LAUNCHER" />
					</intent-filter>
					<intent-filter>
						<action android:name="android.intent.action.VIEW" />
						<category android:name="android.intent.category.BROWSABLE" />
						<category android:name="android.intent.category.DEFAULT" />
						
						<!-- Your complete app package name -->
						<data android:scheme="air.com.doitflash.firebaseCore" />
						
						<!-- Your website domain address -->
						<data android:scheme="http" android:host="www.myflashlabs.com" />
						<data android:scheme="https" android:host="www.myflashlabs.com" />
						
					</intent-filter>
				</activity>
				
			</application>
		</manifest>
	</manifestAdditions>
</android>





<iPhone>
    <InfoAdditions>
	
		<!-- 
            Other settings required by the Firebase core or other ANEs...
        -->
        
		<!-- Required by firebaseDynamicLinks.ane (don't change the key, just change the value) -->
        <key>com.myflashlabs.firebase.deepLinkURLScheme</key>
        <string>dlscheme</string>
		
	</InfoAdditions>
    <requestedDisplayResolution>high</requestedDisplayResolution>
	
	<Entitlements>
	
		<!-- 
            Other settings required by the Firebase FCM or other ANEs...
        -->
        
        <!--
            Go to your Firebase console/dynamicLinks and create
			your URL Prefix, it looks like: https://YOUR_URL_PREFIX.page.link/xxxx

			You must set the associated-domains to "YOUR_URL_PREFIX.page.link"
        -->
        <key>com.apple.developer.associated-domains</key>
        <array>
            <string>applinks:YOUR_URL_PREFIX.page.link</string>
        </array>
		
	</Entitlements>
	
</iPhone>




<extensions>
	
	<!-- 
		Required ANEs for the Firebase Core ANE comes here first.
		https://github.com/myflashlab/Firebase-ANE/wiki/A.4.-Initialize-Firebase-in-your-app
	-->
	
	<!-- To support Firebase DynamicLinks -->
	<extensionID>com.myflashlab.air.extensions.firebase.dynamicLinks</extensionID>
	<extensionID>com.myflashlab.air.extensions.dependency.firebase.dynamicLinks</extensionID>
	
</extensions>

NOTE: When you change the iOS Entitlements part, you will not be able to compile your app on iOS and the AIR compiler will throw an error saying that your provision does not match or is invalid or something like that. To fix this problem, you need to read the next document where we are talking about what change you need to make to your iOS app ID in your Apple Developer Console.

Introduction to Firebase ANEs collection for Adobe Air apps


Get Started with Firebase Core in AIR

  1. Prerequisites
  2. Add Firebase to your app
  3. Add the Firebase SDK
  4. Init Firebase Core
  5. Available ANEs
  6. Managing Firebase iid

Get Started with Analytics

  1. Add Analytics ANE
  2. Init Analytics ANE
  3. Log Events
  4. Set User Properties

Get Started with Crashlytics

  1. Add Crashlytics ANE
  2. Test Your Implementation
  3. Customize Crash Reports
  4. Upload .dSYM for iOS apps

Get Started with DynamicLinks

  1. Add DynamicLinks ANE
  2. Init DynamicLinks ANE
  3. Create DynamicLinks
  4. Receive DynamicLinks
  5. View Analytics

Get Started with Authentication

  1. Add Authentication
  2. Init Authentication
  3. Manage Users
  4. Phone Number
  5. Custom Auth
  6. Anonymous Auth
  7. State in Email Actions
  8. Email Link Authentication

Get Started with FCM + OneSignal

  1. Add FCM ANE
  2. Init FCM ANE
  3. Send Your 1st Message
  4. Send Msg to Topics
  5. Understanding FCM Messages
  6. init OneSignal

Get Started with Firestore

  1. Add Firestore
  2. Init Firestore
  3. Add Data
  4. Transactions & Batches
  5. Delete Data
  6. Manage the Console
  7. Get Data
  8. Get Realtime Updates
  9. Simple and Compound
  10. Order and Limit Data
  11. Paginate Data
  12. Manage Indexes
  13. Secure Data
  14. Offline Data
  15. Where to Go From Here

Get Started with Realtime Database

  1. Add Realtime Database
  2. Init Realtime Database
  3. Structure Your Database
  4. Save Data
  5. Retrieve Data
  6. Enable Offline Capabilities

Get Started with Remote Config

  1. Parameters and Conditions
  2. Add Remote Config
  3. Init Remote Config

Get Started with Performance

  1. Add Performance ANE
  2. Init & Start Monitoring

Get Started with Storage

  1. Add Storage ANE
  2. Init Storage ANE
  3. Upload Files to Storage
  4. Download Files to Air
  5. Use File Metadata
  6. Delete Files

Get Started with Functions

  1. Write & Deploy Functions
  2. Add Functions ANE
  3. Init Functions
Clone this wiki locally