############################### SessionM AIR Native Extension ############################### Latest release version can is |release| (`download`_). Under the hood, this extension uses the SessionM iOS SDK v1.9.3 and Android SDK v1.8.1. Source code is hosted at https://bitbucket.org/Ludia/air-sessionm. Downloads can be found at https://bitbucket.org/Ludia/air-sessionm/downloads. .. _download: https://bitbucket.org/Ludia/air-sessionm/downloads/sessionm-1.0.0.ane =============== Getting started =============== First you may want to read what `SessionM`_ is and how it will interact with your application. Then, you need to create or retrieve a developer account in order to access the `Developer portal`_. Create one application per supported platform (iOS and Android) and get their application IDs. Finally, learn what `Custom achievements`_ are and create some for your application. .. _SessionM: http://www.sessionm.com/developers-publishers/ .. _Developer portal: https://developer.sessionm.com/ .. _Custom achievements: http://www.sessionm.com/documentation/achievement-placement.php ======================= Integration in your app ======================= AIR Descriptor -------------- The following lines should be added in the ```` node of your AIR descriptor. .. code-block:: xml API Usage --------- Here is a quick explanation of how to use the ``SessionM`` class : * First of all, check for ``SesionM.isSupported`` * Then, ou can construct a ``SessionM`` instance. At that point you should only try to call methods that don't require a session to be started, such as ``getSDKVersion()``, ``getExtensionVersion()`` or ``isSupportedPlatform()``. * When required, call the ``startSession()`` method with your SessionM application ID. .. warning:: This application ID is different on Android and iOS. Thus, you will need to check for the platform in order to pass the correct value. Not using the correct ID will not generate any error but will lead to missing functionality. * Use methods such as ``presentActivity()`` and ``logAction()`` to finish SessionM integration within your application. Please read through the example to see a concret usage of the extension. You may also want to read the native SDKs `API References`_ to gain a better understanding of what the extension is doing. .. literalinclude:: ../../sessionm-example/src/main/flex/Main.as :start-after: /*doc-start :end-before: /*doc-end :append: } .. _API References: http://www.sessionm.com/documentation/api-references.php