示例#1
0
        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);
        }
示例#2
0
 public void onInAppMessageButtonClicked(AndroidJavaObject inapp, int index)
 {
     _listener.OnInAppMessageButtonClicked(InAppMessage.FromAndroid(inapp), index);
 }
示例#3
0
 public void onInAppMessageDismissed(AndroidJavaObject inapp)
 {
     _listener.OnInAppMessageDismissed(InAppMessage.FromAndroid(inapp));
 }