Azure / azure-mobile-engagement-unity

Unity SDK for Azure Mobile Engagement
MIT License
13 stars 7 forks source link

Azure Mobile Engagement service has been retired and is no longer available.

Azure Mobile Engagement : Unity SDK

Installation

Configuration

The configuration of your application is performed via an EngagementConfiguration class located in the EngagementPlugin/ directory.

Engagement Configuration
Windows Universal 10 / Windows Phone 8.1
iOS
Generic
Location Reporting
Reach support
Generic
iOS
Android
Notes

Basic Integration

To initialize the Engagement service, just call EngagementAgent.Initialize(). No arguments are needed as the credentials are automatically retrieved from the EngagementConfigurationclass.

Example

Basic initialization:

    void Start () {
        // initialize the application
        EngagementAgent.Initialize ();
        // start your first activity
        EngagementAgent.StartActivity ("home");
    }

Reach Integration

To be able to receive pushes from your application, you need to call EngagementReach.initialize() and define the 3 delegates (events) to be called when a push related event is received

Notes
Example

Initialization with push support :

    void Start () {
        // initialize the Engagement Agent
        EngagementAgent.Initialize ();

        // set the Events
        EngagementReach.HandleURL += (string _push) => {
            Debug.Log ("OnHandleURL " + _push);
        };

        EngagementReach.StringDataPushReceived += (string _category, string _body) => {
            Debug.Log ("StringDataPushReceived category:" + _category + ", body:" + _body);
        };

        EngagementReach.Base64DataPushReceived += (string _category, byte[] _data, string _body) => {
            Debug.Log ("Base64DataPushReceived category:" + _category);
        };
        //  Activate the push notification support
        EngagementReach.Initialize();
        // start your first activity
        EngagementAgent.StartActivity ("home");
    }

Full API

Initialization

(see above)

Reporting APIs
Miscellaneous:

Sample Application

A sample application is available in the sampledirectory.

Building from source

The source code of the plugin are included in the src/directory. To build the package, just execute the package.sh script at the root of the SDK.

It only works on Mac OSX, with XCode, Unity and Android Studio installed.

History

1.3.0
1.2.2
1.2.1
1.2.0
1.1.0
1.0.0

Open Source Code of Conduct

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.