Ejemplo n.º 1
0
        public void SetHelpshiftEventsListener(IHelpshiftEventsListener eventsListener)
        {
            HelpshiftInternalLogger.d("Event listener is set");
            HelpshiftAndroidEventsListener internalEventListener = new HelpshiftAndroidEventsListener(eventsListener);

            hsUnityApiClass.CallStatic("setHelpshiftEventsListener", new object[] { internalEventListener });
        }
Ejemplo n.º 2
0
        public void ShowFAQSection(string sectionId, Dictionary <string, object> configMap)
        {
            string config = SerializeMap(configMap);

            HelpshiftInternalLogger.d("show section api called with config" + config);
            hsUnityApiClass.CallStatic("showFAQSectionUnity", new object[] { this.currentActivity, sectionId, config });
        }
Ejemplo n.º 3
0
        public void HandlePushNotification(Dictionary <string, object> pushNotificationData)
        {
            string pushData = SerializeMap(pushNotificationData);

            HelpshiftInternalLogger.d("Handle push notification : data :" + pushData);
            hsUnityApiClass.CallStatic("handlePush", new object[] { pushData });
        }
Ejemplo n.º 4
0
        public void Install(string platformId, string domain, Dictionary <string, object> configMap)
        {
            string jsonSerializedConfig = SerializeMap(configMap);

            hsUnityApiClass.CallStatic("install", new object[] { this.application, platformId, domain, jsonSerializedConfig });

            HelpshiftInternalLogger.d("Install called : Domain : " + domain + "Platform ID : " + platformId + ", Config : " + jsonSerializedConfig);
        }
Ejemplo n.º 5
0
 /*
  * Get instance for logger.
  */
 public static HelpshiftInternalLogger getInstance()
 {
     if (internalLoggerInstance == null)
     {
         internalLoggerInstance = new HelpshiftInternalLogger();
     }
     return(internalLoggerInstance);
 }
Ejemplo n.º 6
0
        public void install(string apiKey, string domain, string appId, Dictionary <string, object> configMap)
        {
            string jsonSerializedConfig = Json.Serialize(configMap);

            hsHelpshiftClass.CallStatic("install", new object[] { this.application, apiKey, domain, appId, jsonSerializedConfig });

            HelpshiftInternalLogger.d("Install called : Domain : " + domain + ", Config : " + jsonSerializedConfig);
        }
Ejemplo n.º 7
0
 public void Login(Dictionary <string, string> userData)
 {
     if (userData == null)
     {
         userData = new Dictionary <string, string>();
     }
     HelpshiftInternalLogger.d("Login called : " + userData.ToString());
     hsUnityApiClass.CallStatic("login", new object[] { Json.Serialize(userData) });
 }
Ejemplo n.º 8
0
 public void Login(Dictionary <string, string> userDetails)
 {
     if (userDetails == null)
     {
         HelpshiftInternalLogger.e("userDetails are null in Login API!");
         userDetails = new Dictionary <string, string>();
     }
     HelpshiftInternalLogger.d("Login called : " + userDetails);
     HsLogin(Json.Serialize(userDetails));
 }
 public HelpshiftAndroid()
 {
     this.jc = new AndroidJavaClass("com.unity3d.player.UnityPlayer");
     this.currentActivity    = jc.GetStatic <AndroidJavaObject>("currentActivity");
     this.application        = currentActivity.Call <AndroidJavaObject>("getApplication");
     this.hsUnityAPIDelegate = new AndroidJavaClass("com.helpshift.supportCampaigns.UnityAPIDelegate");
     HelpshiftWorker.getInstance().registerClient("support", this);
     HelpshiftDexLoader.getInstance().loadDex(this, application);
     hsInternalLogger = HelpshiftInternalLogger.getInstance();
 }
Ejemplo n.º 10
0
 public void SetSDKLanguage(string locale)
 {
     HelpshiftInternalLogger.d("setLanguage api called for language " + locale);
     hsUnityApiClass.CallStatic("setLanguage", new object[] { locale });
 }
Ejemplo n.º 11
0
 public void SetSDKLanguage(string languageCode)
 {
     HelpshiftInternalLogger.d("setLanguage api called for language " + languageCode);
     HsSetLanguage(languageCode);
 }
Ejemplo n.º 12
0
 public void ClearAnonymousUserOnLogin()
 {
     HelpshiftInternalLogger.d("ClearAnonymouseUserOnLogin api called");
     HsClearAnonymousUserOnLogin();
 }
Ejemplo n.º 13
0
 public void Logout()
 {
     HelpshiftInternalLogger.d("logout api called");
     HsLogout();
 }
Ejemplo n.º 14
0
 public void login(string identifier, string userName, string email)
 {
     HelpshiftInternalLogger.d("Login called : " + userName);
     hsHelpshiftClass.CallStatic("login", new object[] { identifier, userName, email });
 }
Ejemplo n.º 15
0
 public void PauseDisplayOfInAppNotification(bool pauseInAppNotifications)
 {
     HelpshiftInternalLogger.d("Pause in-app notification called with shouldPause :" + pauseInAppNotifications);
     HsPauseDisplayOfInAppNotification(pauseInAppNotifications);
 }
Ejemplo n.º 16
0
 public void ShowSingleFAQ(string faqId, Dictionary <string, object> configMap)
 {
     HelpshiftInternalLogger.d("show single FAQ api called with faqId" + faqId + " config" + SerializeDictionary(configMap));
     HsShowSingleFaqWithConfig(faqId, SerializeDictionary(configMap));
 }
Ejemplo n.º 17
0
 public void ClearAnonymousUserOnLogin()
 {
     HelpshiftInternalLogger.d("ClearAnonymouseUserOnLogin api called");
     hsUnityApiClass.CallStatic("clearAnonymousUserOnLogin");
 }
Ejemplo n.º 18
0
 public void ShowConversation(Dictionary <string, object> config)
 {
     HelpshiftInternalLogger.d("show conversation api called with config" + SerializeDictionary(config));
     HsShowConversationWithConfig(SerializeDictionary(config));
 }
Ejemplo n.º 19
0
 public void registerDeviceToken(string deviceToken)
 {
     HelpshiftInternalLogger.d("Register device token :" + deviceToken);
     hsHelpshiftClass.CallStatic("registerDeviceToken", new object [] { this.currentActivity, deviceToken });
 }
Ejemplo n.º 20
0
        // Public APIs

        public void Install(string platformId, string domainName, Dictionary <string, object> installConfig)
        {
            HelpshiftInternalLogger.d("Install called : Domain : " + domainName + "Platform ID : " + platformId + ", Config : " + SerializeDictionary(installConfig));
            HsInstallForPlatformIdWithConfig(platformId, domainName, SerializeDictionary(installConfig));
        }
Ejemplo n.º 21
0
 public void SetHelpshiftEventsListener(IHelpshiftEventsListener listener)
 {
     HelpshiftInternalLogger.d("Event listener is set");
     HelpshiftXiOSDelegate.SetExternalDelegate(listener);
 }
Ejemplo n.º 22
0
 public void HandlePushNotification(Dictionary <string, object> notificationDataDict)
 {
     HelpshiftInternalLogger.d("Handle push notification data :" + SerializeDictionary(notificationDataDict));
     HsHandleNotificationWithUserInfoDictionary(SerializeDictionary(notificationDataDict), false);
 }
Ejemplo n.º 23
0
 public void RegisterPushToken(string deviceToken)
 {
     HelpshiftInternalLogger.d("Register device token :" + deviceToken);
     hsUnityApiClass.CallStatic("registerPushToken", new object[] { deviceToken });
 }
Ejemplo n.º 24
0
 public void ShowFAQSection(string sectionId, Dictionary <string, object> configMap)
 {
     HelpshiftInternalLogger.d("show FAQ section api called with sectionId" + sectionId + " config" + SerializeDictionary(configMap));
     HsShowFaqSectionWithConfig(sectionId, SerializeDictionary(configMap));
 }
Ejemplo n.º 25
0
 public void login(HelpshiftUser helpshiftUser)
 {
     HelpshiftInternalLogger.d("Login called : " + helpshiftUser.name);
     hsHelpshiftClass.CallStatic("loginHelpshiftUser", new object[] { jsonifyHelpshiftUser(helpshiftUser) });
 }
Ejemplo n.º 26
0
 public void RequestUnreadMessageCount(Boolean shouldFetchFromServer)
 {
     HelpshiftInternalLogger.d("request unread message count api called with remote fetch : " + shouldFetchFromServer);
     HsRequestUnreadMessageCount(shouldFetchFromServer);
 }
Ejemplo n.º 27
0
 public void Logout()
 {
     HelpshiftInternalLogger.d("logout api called");
     hsUnityApiClass.CallStatic("logout");
 }
Ejemplo n.º 28
0
 public void RequestUnreadMessageCount(Boolean shouldFetchFromServer)
 {
     HelpshiftInternalLogger.d("request unread message count api called : shouldFetchFromServer" + shouldFetchFromServer);
     hsUnityApiClass.CallStatic("requestUnreadMessageCountUnity", new object[] { shouldFetchFromServer });
 }
Ejemplo n.º 29
0
 public void ShowFAQs(Dictionary <string, object> configMap)
 {
     HelpshiftInternalLogger.d("show FAQs api called with config" + SerializeDictionary(configMap));
     HsShowFaqsWithConfig(SerializeDictionary(configMap));
 }
Ejemplo n.º 30
0
 public void RegisterPushToken(string deviceToken)
 {
     HelpshiftInternalLogger.d("Register device token :" + deviceToken);
     HsRegisterDeviceToken(deviceToken);
 }