Ionic integration

To support those apps that use Ionic with Cordova we have created a Cordova Plugin

Installation

To add the plugin to the project it's necessary execute the following command

$ ionic cordova plugin add cordova-plugin-emma-sdk

 In src/app/app.component.ts add the following code

To obtain the "Session Key" follow this guide

 

Android integration

Push (Optional)

For the received notification in Android, you must be add the notification icon image in config.xml

To enable push it's necessary add a file, obtained in Firebase Console project, to the config.xml. You can check the steps to obtain it here. Once you have the file in the root of the project add the following to the config.xml

To receive the push it is necessary to add the following service within the AndroidManifest of the application for it we have to add the following in the config.xml

To initialize the push in the App it is necessary to call the startPush method once the deviceReady event is received inside the app.component.ts.

Finally to make the shipment it is necessary to add the Sender Id and Server Key, which gives us Firebase, in the configuration panel of the app in EMMA. Follow the next guide.

Attribution, DeepLink and AppLink (Optional)

To integrate the attribution it is necessary to configure DeepLink and AppLink in the app

In order for the app to open when a DeepLink or AppLink is run, it is necessary to add the following to the config.xml

  • ${custom_scheme} must be replaced by the chosen schema name. Normally the name chosen has to do with the name of the app. In the case of the intent filter of the powlink.io it has to be configured in the configuration panel of the App. For more information go aquí.
  • ${config_id} must be remplace by the config_id of config.xml file

Once this is added in the configuration, it is necessary to add the event in main component. This method is where the logic is processed.

Location

To enable location it is necessary add the following permissions to config.xml

Once added the location can be activated with the trackLocation method

 

iOS integration

Push (Optional)

To integrate the push in iOS you have to open the app with the Xcode tool. In the Capabilities section, enable the push notifications switch.

Captura_de_pantalla_2019-04-30_a_las_1.11.09.png

Una vez este activada esta sección solo tendrás que llamar al método startPush en onDeviceReady.

Once this section is enabled you will only have to call the startPush method in onDeviceReady. guía.

Attribution, DeepLink and AppLink (Optional)

To configure the DeepLink it is necessary to add the "scheme" in Info > Url Types

Captura_de_pantalla_2019-04-30_a_las_1.21.38.png

To configure the attribution and Powlinks (Universal Links) it is necessary to activate Associated Domains and add the domains configured in the EMMA Dashboard according to this guide

Captura_de_pantalla_2019-04-30_a_las_1.24.12.png

Once this is added in the configuration, it is necessary to add the event in main component. This method is where the logic is processed.

Location

To enable the location, it is necessary to add a key to the info.plist. For this we open the app with Xcode. The key to add is NSLocationAlwaysAndWhenInUseUsageDescription

Captura_de_pantalla_2019-04-30_a_las_14.41.07.png

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.