// Use this for initialization

    void Start()
    {
        _support   = HelpshiftSdk.getInstance();
        _campaigns = HelpshiftCampaigns.getInstance();
        _inbox     = HelpshiftInbox.getInstance();
        _support.install();
        //_support.registerForPush("<gcm-key>");
        _campaigns.SetInboxMessagesDelegate(new HelpshiftExample.InboxDelegate());
        _inbox.SetInboxMessageDelegate(new HelpshiftExample.InboxDelegate());
        _inbox.SetInboxPushNotificationDelegate(new HelpshiftExample.InboxPushNotificationDelegate());
        _campaigns.SetCampaignsDelegate(new HelpshiftExample.CampaignsDelegate());

        _campaigns.RequestUnreadMessagesCount();
    }
Exemple #2
0
    // Use this for initialization

    void Start()
    {
        _support = HelpshiftSdk.getInstance();
        // App name on campaigns testing domain: Android Dev Testing
        string apiKey     = "<your_api_key>";
        string domainName = "<your_domain_name>";
        string appId;

#if UNITY_ANDROID
        appId = "your_android_app_id";
#elif UNITY_IOS
        appId = "your_ios_app_id";
#endif
        _support.install(apiKey, domainName, appId, getInstallConfig());
        _campaigns = HelpshiftCampaigns.getInstance();
        _inbox     = HelpshiftInbox.getInstance();
        _campaigns.SetInboxMessagesDelegate(new HelpshiftExample.InboxDelegate());
        _inbox.SetInboxMessageDelegate(new HelpshiftExample.InboxDelegate());
        _inbox.SetInboxPushNotificationDelegate(new HelpshiftExample.InboxPushNotificationDelegate());
        _campaigns.SetCampaignsDelegate(new HelpshiftExample.CampaignsDelegate());

        _campaigns.RequestUnreadMessagesCount();
    }