protected override void _pushEventLoginFinished(UserProfile userProfile, bool autoLogin, string payload) { 
			if (SoomlaProfile.IsProviderNativelyImplemented(userProfile.Provider)) return;
			AndroidJNI.PushLocalFrame(100);
			using(AndroidJavaClass jniSoomlaProfile = new AndroidJavaClass("com.soomla.profile.unity.ProfileEventHandler")) {
				ProfileJNIHandler.CallStaticVoid(jniSoomlaProfile, "pushEventLoginFinished", userProfile.toJSONObject().print(), autoLogin, payload);
			}
			AndroidJNI.PopLocalFrame(IntPtr.Zero);
		}
Exemple #2
0
 protected override void _pushEventLoginFinished(UserProfile userProfile, string payload)
 {
     if (SoomlaProfile.IsProviderNativelyImplemented(userProfile.Provider))
     {
         return;
     }
     soomlaProfile_PushEventLoginFinished(userProfile.toJSONObject().print(), payload);
 }
 protected override void _removeUserProfile(UserProfile userProfile)
 {
     AndroidJNI.PushLocalFrame(100);
     using (AndroidJavaClass jniSoomlaProfile = new AndroidJavaClass("com.soomla.profile.unity.UnitySoomlaProfile")) {
         ProfileJNIHandler.CallStaticVoid(jniSoomlaProfile, "removeUserProfile",
                                          userProfile.toJSONObject().ToString());
     }
     AndroidJNI.PopLocalFrame(IntPtr.Zero);
 }
Exemple #4
0
        protected virtual void _storeUserProfile(UserProfile userProfile, bool notify)
        {
#if UNITY_EDITOR
            string key = keyUserProfile(userProfile.Provider);
            string val = userProfile.toJSONObject().ToString();
            SoomlaUtils.LogDebug(TAG, "key/val:" + key + "/" + val);
            PlayerPrefs.SetString(key, val);

            if (notify)
            {
                ProfileEvents.OnUserProfileUpdated(userProfile);
            }
#endif
        }
		protected virtual void _storeUserProfile(UserProfile userProfile, bool notify) {
			#if UNITY_EDITOR
			string key = keyUserProfile(userProfile.Provider);
			string val = userProfile.toJSONObject().ToString();
			SoomlaUtils.LogDebug(TAG, "key/val:" + key + "/" + val);
			PlayerPrefs.SetString(key, val);

			if (notify) {
				ProfileEvents.OnUserProfileUpdated(userProfile);
			}
			#endif
		}
Exemple #6
0
 protected override void _pushEventLoginFinished(UserProfile userProfile, bool autoLogin, string payload)
 {
     if (SoomlaProfile.IsProviderNativelyImplemented(userProfile.Provider))
     {
         return;
     }
     AndroidJNI.PushLocalFrame(100);
     using (AndroidJavaClass jniSoomlaProfile = new AndroidJavaClass("com.soomla.profile.unity.ProfileEventHandler")) {
         ProfileJNIHandler.CallStaticVoid(jniSoomlaProfile, "pushEventLoginFinished", userProfile.toJSONObject().print(), autoLogin, payload);
     }
     AndroidJNI.PopLocalFrame(IntPtr.Zero);
 }
Exemple #7
0
 protected override void _removeUserProfile(UserProfile userProfile)
 {
     soomlaProfile_RemoveUserProfile(userProfile.toJSONObject().ToString());
 }
Exemple #8
0
 protected override void _storeUserProfile(UserProfile userProfile, bool notify)
 {
     soomlaProfile_SetStoredUserProfile(userProfile.toJSONObject().ToString(), notify);
 }
 protected override void _pushEventLoginFinished(UserProfile userProfile, bool autoLogin, string payload)
 {
     if (SoomlaProfile.IsProviderNativelyImplemented(userProfile.Provider)) return;
     soomlaProfile_PushEventLoginFinished(userProfile.toJSONObject().print(), autoLogin, payload);
 }
		protected override void _removeUserProfile(UserProfile userProfile) {
			soomlaProfile_RemoveUserProfile(userProfile.toJSONObject().ToString());
		}
		protected override void _storeUserProfile(UserProfile userProfile, bool notify) {
			soomlaProfile_SetStoredUserProfile(userProfile.toJSONObject().ToString(), notify);
		}
		protected override void _removeUserProfile(UserProfile userProfile) {
			AndroidJNI.PushLocalFrame(100);
			using(AndroidJavaClass jniSoomlaProfile = new AndroidJavaClass("com.soomla.profile.unity.UnitySoomlaProfile")) {
				ProfileJNIHandler.CallStaticVoid(jniSoomlaProfile, "removeUserProfile",
				                                 userProfile.toJSONObject().ToString());
			}
			AndroidJNI.PopLocalFrame(IntPtr.Zero);
		}
 public static void onLoginFinished(UserProfile userProfileJson, bool autoLogin, string payload) {
     SoomlaUtils.LogDebug("TAG", "Logged in as: " + userProfileJson.toJSONObject().print());
 }