public static InAppMessage FromAndroid(AndroidJavaObject androidObject) { var inapp = new InAppMessage(); try { var inappJson = PusheAndroidUtils.Extension("inappmessaging").CallStatic <string>("inAppToJson", androidObject); inapp = JsonUtility.FromJson <InAppMessage>(inappJson); } catch (Exception e) { PusheUnity.Log("Failed to parse inapp message.\n" + e); } return(inapp); }
public void onInAppMessageButtonClicked(AndroidJavaObject inapp, int index) { _listener.OnInAppMessageButtonClicked(InAppMessage.FromAndroid(inapp), index); }
public void onInAppMessageDismissed(AndroidJavaObject inapp) { _listener.OnInAppMessageDismissed(InAppMessage.FromAndroid(inapp)); }