Пример #1
0
        public void SetHelpshiftEventsListener(IHelpshiftEventsListener eventsListener)
        {
            HelpshiftInternalLogger.d("Event listener is set");
            HelpshiftAndroidEventsListener internalEventListener = new HelpshiftAndroidEventsListener(eventsListener);

            hsUnityApiClass.CallStatic("setHelpshiftEventsListener", new object[] { internalEventListener });
        }
Пример #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 });
        }
Пример #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 });
        }
Пример #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);
        }
Пример #5
0
 /*
  * Get instance for logger.
  */
 public static HelpshiftInternalLogger getInstance()
 {
     if (internalLoggerInstance == null)
     {
         internalLoggerInstance = new HelpshiftInternalLogger();
     }
     return(internalLoggerInstance);
 }
Пример #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);
        }
Пример #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) });
 }
Пример #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();
 }
Пример #10
0
 public void SetSDKLanguage(string locale)
 {
     HelpshiftInternalLogger.d("setLanguage api called for language " + locale);
     hsUnityApiClass.CallStatic("setLanguage", new object[] { locale });
 }
Пример #11
0
 public void SetSDKLanguage(string languageCode)
 {
     HelpshiftInternalLogger.d("setLanguage api called for language " + languageCode);
     HsSetLanguage(languageCode);
 }
Пример #12
0
 public void ClearAnonymousUserOnLogin()
 {
     HelpshiftInternalLogger.d("ClearAnonymouseUserOnLogin api called");
     HsClearAnonymousUserOnLogin();
 }
Пример #13
0
 public void Logout()
 {
     HelpshiftInternalLogger.d("logout api called");
     HsLogout();
 }
Пример #14
0
 public void login(string identifier, string userName, string email)
 {
     HelpshiftInternalLogger.d("Login called : " + userName);
     hsHelpshiftClass.CallStatic("login", new object[] { identifier, userName, email });
 }
Пример #15
0
 public void PauseDisplayOfInAppNotification(bool pauseInAppNotifications)
 {
     HelpshiftInternalLogger.d("Pause in-app notification called with shouldPause :" + pauseInAppNotifications);
     HsPauseDisplayOfInAppNotification(pauseInAppNotifications);
 }
Пример #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));
 }
Пример #17
0
 public void ClearAnonymousUserOnLogin()
 {
     HelpshiftInternalLogger.d("ClearAnonymouseUserOnLogin api called");
     hsUnityApiClass.CallStatic("clearAnonymousUserOnLogin");
 }
Пример #18
0
 public void ShowConversation(Dictionary <string, object> config)
 {
     HelpshiftInternalLogger.d("show conversation api called with config" + SerializeDictionary(config));
     HsShowConversationWithConfig(SerializeDictionary(config));
 }
Пример #19
0
 public void registerDeviceToken(string deviceToken)
 {
     HelpshiftInternalLogger.d("Register device token :" + deviceToken);
     hsHelpshiftClass.CallStatic("registerDeviceToken", new object [] { this.currentActivity, deviceToken });
 }
Пример #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));
        }
Пример #21
0
 public void SetHelpshiftEventsListener(IHelpshiftEventsListener listener)
 {
     HelpshiftInternalLogger.d("Event listener is set");
     HelpshiftXiOSDelegate.SetExternalDelegate(listener);
 }
Пример #22
0
 public void HandlePushNotification(Dictionary <string, object> notificationDataDict)
 {
     HelpshiftInternalLogger.d("Handle push notification data :" + SerializeDictionary(notificationDataDict));
     HsHandleNotificationWithUserInfoDictionary(SerializeDictionary(notificationDataDict), false);
 }
Пример #23
0
 public void RegisterPushToken(string deviceToken)
 {
     HelpshiftInternalLogger.d("Register device token :" + deviceToken);
     hsUnityApiClass.CallStatic("registerPushToken", new object[] { deviceToken });
 }
Пример #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));
 }
Пример #25
0
 public void login(HelpshiftUser helpshiftUser)
 {
     HelpshiftInternalLogger.d("Login called : " + helpshiftUser.name);
     hsHelpshiftClass.CallStatic("loginHelpshiftUser", new object[] { jsonifyHelpshiftUser(helpshiftUser) });
 }
Пример #26
0
 public void RequestUnreadMessageCount(Boolean shouldFetchFromServer)
 {
     HelpshiftInternalLogger.d("request unread message count api called with remote fetch : " + shouldFetchFromServer);
     HsRequestUnreadMessageCount(shouldFetchFromServer);
 }
Пример #27
0
 public void Logout()
 {
     HelpshiftInternalLogger.d("logout api called");
     hsUnityApiClass.CallStatic("logout");
 }
Пример #28
0
 public void RequestUnreadMessageCount(Boolean shouldFetchFromServer)
 {
     HelpshiftInternalLogger.d("request unread message count api called : shouldFetchFromServer" + shouldFetchFromServer);
     hsUnityApiClass.CallStatic("requestUnreadMessageCountUnity", new object[] { shouldFetchFromServer });
 }
Пример #29
0
 public void ShowFAQs(Dictionary <string, object> configMap)
 {
     HelpshiftInternalLogger.d("show FAQs api called with config" + SerializeDictionary(configMap));
     HsShowFaqsWithConfig(SerializeDictionary(configMap));
 }
Пример #30
0
 public void RegisterPushToken(string deviceToken)
 {
     HelpshiftInternalLogger.d("Register device token :" + deviceToken);
     HsRegisterDeviceToken(deviceToken);
 }