public static void SetPreloadedApp(MATPreloadData preloadData) { if (!Application.isEditor) { MATAndroid.Instance.SetPreloadedApp(preloadData); } }
// Preloaded app attribution public void SetPreloadedApp(MATPreloadData preloadData) { // Convert C# MATPreloadData to Java MATPreloadData AndroidJavaObject objPreloadData = new AndroidJavaObject("com.mobileapptracker.MATPreloadData", preloadData.publisherId); if (preloadData.offerId != null) { objPreloadData = objPreloadData.Call <AndroidJavaObject>("withOfferId", preloadData.offerId); } if (preloadData.agencyId != null) { objPreloadData = objPreloadData.Call <AndroidJavaObject>("withAgencyId", preloadData.agencyId); } if (preloadData.publisherReferenceId != null) { objPreloadData = objPreloadData.Call <AndroidJavaObject>("withPublisherReferenceId", preloadData.publisherReferenceId); } if (preloadData.publisherSub1 != null) { objPreloadData = objPreloadData.Call <AndroidJavaObject>("withPublisherSub1", preloadData.publisherSub1); } if (preloadData.publisherSub2 != null) { objPreloadData = objPreloadData.Call <AndroidJavaObject>("withPublisherSub2", preloadData.publisherSub2); } if (preloadData.publisherSub3 != null) { objPreloadData = objPreloadData.Call <AndroidJavaObject>("withPublisherSub3", preloadData.publisherSub3); } if (preloadData.publisherSub4 != null) { objPreloadData = objPreloadData.Call <AndroidJavaObject>("withPublisherSub4", preloadData.publisherSub4); } if (preloadData.publisherSub5 != null) { objPreloadData = objPreloadData.Call <AndroidJavaObject>("withPublisherSub5", preloadData.publisherSub5); } if (preloadData.publisherSubAd != null) { objPreloadData = objPreloadData.Call <AndroidJavaObject>("withPublisherSubAd", preloadData.publisherSubAd); } if (preloadData.publisherSubAdgroup != null) { objPreloadData = objPreloadData.Call <AndroidJavaObject>("withPublisherSubAdgroup", preloadData.publisherSubAdgroup); } if (preloadData.publisherSubCampaign != null) { objPreloadData = objPreloadData.Call <AndroidJavaObject>("withPublisherSubCampaign", preloadData.publisherSubCampaign); } if (preloadData.publisherSubKeyword != null) { objPreloadData = objPreloadData.Call <AndroidJavaObject>("withPublisherSubKeyword", preloadData.publisherSubKeyword); } if (preloadData.publisherSubPublisher != null) { objPreloadData = objPreloadData.Call <AndroidJavaObject>("withPublisherSubPublisher", preloadData.publisherSubPublisher); } if (preloadData.publisherSubSite != null) { objPreloadData = objPreloadData.Call <AndroidJavaObject>("withPublisherSubSite", preloadData.publisherSubSite); } if (preloadData.advertiserSubAd != null) { objPreloadData = objPreloadData.Call <AndroidJavaObject>("withAdvertiserSubAd", preloadData.advertiserSubAd); } if (preloadData.advertiserSubAdgroup != null) { objPreloadData = objPreloadData.Call <AndroidJavaObject>("withAdvertiserSubAdgroup", preloadData.advertiserSubAdgroup); } if (preloadData.advertiserSubCampaign != null) { objPreloadData = objPreloadData.Call <AndroidJavaObject>("withAdvertiserSubCampaign", preloadData.advertiserSubCampaign); } if (preloadData.advertiserSubKeyword != null) { objPreloadData = objPreloadData.Call <AndroidJavaObject>("withAdvertiserSubKeyword", preloadData.advertiserSubKeyword); } if (preloadData.advertiserSubPublisher != null) { objPreloadData = objPreloadData.Call <AndroidJavaObject>("withAdvertiserSubPublisher", preloadData.advertiserSubPublisher); } if (preloadData.advertiserSubSite != null) { objPreloadData = objPreloadData.Call <AndroidJavaObject>("withAdvertiserSubSite", preloadData.advertiserSubSite); } ajcInstance.Call("setPreloadedApp", objPreloadData); }
internal static extern void MATSetPreloadData(MATPreloadData preloadData);
/// <para> /// Sets the preloaded app attribution values (publisher information). /// Does nothing if not an Android or iOS device. /// </para> /// <param name="preloadedData">Preloaded app attribution values (publisher information)</param> public static void SetPreloadedApp(MATPreloadData preloadData) { if (!Application.isEditor) { #if UNITY_ANDROID MATAndroid.Instance.SetPreloadedApp(preloadData); #endif #if UNITY_IPHONE MATExterns.TuneSetPreloadData(preloadData); #endif } }
// Preloaded app attribution public void SetPreloadedApp(MATPreloadData preloadData) { // Convert C# MATPreloadData to Java MATPreloadData AndroidJavaObject objPreloadData = new AndroidJavaObject("com.mobileapptracker.MATPreloadData", preloadData.publisherId); if (preloadData.offerId != null) { objPreloadData = objPreloadData.Call<AndroidJavaObject>("withOfferId", preloadData.offerId); } if (preloadData.agencyId != null) { objPreloadData = objPreloadData.Call<AndroidJavaObject>("withAgencyId", preloadData.agencyId); } if (preloadData.publisherReferenceId != null) { objPreloadData = objPreloadData.Call<AndroidJavaObject>("withPublisherReferenceId", preloadData.publisherReferenceId); } if (preloadData.publisherSub1 != null) { objPreloadData = objPreloadData.Call<AndroidJavaObject>("withPublisherSub1", preloadData.publisherSub1); } if (preloadData.publisherSub2 != null) { objPreloadData = objPreloadData.Call<AndroidJavaObject>("withPublisherSub2", preloadData.publisherSub2); } if (preloadData.publisherSub3 != null) { objPreloadData = objPreloadData.Call<AndroidJavaObject>("withPublisherSub3", preloadData.publisherSub3); } if (preloadData.publisherSub4 != null) { objPreloadData = objPreloadData.Call<AndroidJavaObject>("withPublisherSub4", preloadData.publisherSub4); } if (preloadData.publisherSub5 != null) { objPreloadData = objPreloadData.Call<AndroidJavaObject>("withPublisherSub5", preloadData.publisherSub5); } if (preloadData.publisherSubAd != null) { objPreloadData = objPreloadData.Call<AndroidJavaObject>("withPublisherSubAd", preloadData.publisherSubAd); } if (preloadData.publisherSubAdgroup != null) { objPreloadData = objPreloadData.Call<AndroidJavaObject>("withPublisherSubAdgroup", preloadData.publisherSubAdgroup); } if (preloadData.publisherSubCampaign != null) { objPreloadData = objPreloadData.Call<AndroidJavaObject>("withPublisherSubCampaign", preloadData.publisherSubCampaign); } if (preloadData.publisherSubKeyword != null) { objPreloadData = objPreloadData.Call<AndroidJavaObject>("withPublisherSubKeyword", preloadData.publisherSubKeyword); } if (preloadData.publisherSubPublisher != null) { objPreloadData = objPreloadData.Call<AndroidJavaObject>("withPublisherSubPublisher", preloadData.publisherSubPublisher); } if (preloadData.publisherSubSite != null) { objPreloadData = objPreloadData.Call<AndroidJavaObject>("withPublisherSubSite", preloadData.publisherSubSite); } if (preloadData.advertiserSubAd != null) { objPreloadData = objPreloadData.Call<AndroidJavaObject>("withAdvertiserSubAd", preloadData.advertiserSubAd); } if (preloadData.advertiserSubAdgroup != null) { objPreloadData = objPreloadData.Call<AndroidJavaObject>("withAdvertiserSubAdgroup", preloadData.advertiserSubAdgroup); } if (preloadData.advertiserSubCampaign != null) { objPreloadData = objPreloadData.Call<AndroidJavaObject>("withAdvertiserSubCampaign", preloadData.advertiserSubCampaign); } if (preloadData.advertiserSubKeyword != null) { objPreloadData = objPreloadData.Call<AndroidJavaObject>("withAdvertiserSubKeyword", preloadData.advertiserSubKeyword); } if (preloadData.advertiserSubPublisher != null) { objPreloadData = objPreloadData.Call<AndroidJavaObject>("withAdvertiserSubPublisher", preloadData.advertiserSubPublisher); } if (preloadData.advertiserSubSite != null) { objPreloadData = objPreloadData.Call<AndroidJavaObject>("withAdvertiserSubSite", preloadData.advertiserSubSite); } ajcInstance.Call("setPreloadedApp", objPreloadData); }
public void SetPreloadedApp(MATPreloadData preloadData) { object[] args = new object[] { preloadData.publisherId }; AndroidJavaObject obj2 = new AndroidJavaObject("com.mobileapptracker.MATPreloadData", args); if (preloadData.offerId != null) { object[] objArray2 = new object[] { preloadData.offerId }; obj2 = obj2.Call <AndroidJavaObject>("withOfferId", objArray2); } if (preloadData.agencyId != null) { object[] objArray3 = new object[] { preloadData.agencyId }; obj2 = obj2.Call <AndroidJavaObject>("withAgencyId", objArray3); } if (preloadData.publisherReferenceId != null) { object[] objArray4 = new object[] { preloadData.publisherReferenceId }; obj2 = obj2.Call <AndroidJavaObject>("withPublisherReferenceId", objArray4); } if (preloadData.publisherSub1 != null) { object[] objArray5 = new object[] { preloadData.publisherSub1 }; obj2 = obj2.Call <AndroidJavaObject>("withPublisherSub1", objArray5); } if (preloadData.publisherSub2 != null) { object[] objArray6 = new object[] { preloadData.publisherSub2 }; obj2 = obj2.Call <AndroidJavaObject>("withPublisherSub2", objArray6); } if (preloadData.publisherSub3 != null) { object[] objArray7 = new object[] { preloadData.publisherSub3 }; obj2 = obj2.Call <AndroidJavaObject>("withPublisherSub3", objArray7); } if (preloadData.publisherSub4 != null) { object[] objArray8 = new object[] { preloadData.publisherSub4 }; obj2 = obj2.Call <AndroidJavaObject>("withPublisherSub4", objArray8); } if (preloadData.publisherSub5 != null) { object[] objArray9 = new object[] { preloadData.publisherSub5 }; obj2 = obj2.Call <AndroidJavaObject>("withPublisherSub5", objArray9); } if (preloadData.publisherSubAd != null) { object[] objArray10 = new object[] { preloadData.publisherSubAd }; obj2 = obj2.Call <AndroidJavaObject>("withPublisherSubAd", objArray10); } if (preloadData.publisherSubAdgroup != null) { object[] objArray11 = new object[] { preloadData.publisherSubAdgroup }; obj2 = obj2.Call <AndroidJavaObject>("withPublisherSubAdgroup", objArray11); } if (preloadData.publisherSubCampaign != null) { object[] objArray12 = new object[] { preloadData.publisherSubCampaign }; obj2 = obj2.Call <AndroidJavaObject>("withPublisherSubCampaign", objArray12); } if (preloadData.publisherSubKeyword != null) { object[] objArray13 = new object[] { preloadData.publisherSubKeyword }; obj2 = obj2.Call <AndroidJavaObject>("withPublisherSubKeyword", objArray13); } if (preloadData.publisherSubPublisher != null) { object[] objArray14 = new object[] { preloadData.publisherSubPublisher }; obj2 = obj2.Call <AndroidJavaObject>("withPublisherSubPublisher", objArray14); } if (preloadData.publisherSubSite != null) { object[] objArray15 = new object[] { preloadData.publisherSubSite }; obj2 = obj2.Call <AndroidJavaObject>("withPublisherSubSite", objArray15); } if (preloadData.advertiserSubAd != null) { object[] objArray16 = new object[] { preloadData.advertiserSubAd }; obj2 = obj2.Call <AndroidJavaObject>("withAdvertiserSubAd", objArray16); } if (preloadData.advertiserSubAdgroup != null) { object[] objArray17 = new object[] { preloadData.advertiserSubAdgroup }; obj2 = obj2.Call <AndroidJavaObject>("withAdvertiserSubAdgroup", objArray17); } if (preloadData.advertiserSubCampaign != null) { object[] objArray18 = new object[] { preloadData.advertiserSubCampaign }; obj2 = obj2.Call <AndroidJavaObject>("withAdvertiserSubCampaign", objArray18); } if (preloadData.advertiserSubKeyword != null) { object[] objArray19 = new object[] { preloadData.advertiserSubKeyword }; obj2 = obj2.Call <AndroidJavaObject>("withAdvertiserSubKeyword", objArray19); } if (preloadData.advertiserSubPublisher != null) { object[] objArray20 = new object[] { preloadData.advertiserSubPublisher }; obj2 = obj2.Call <AndroidJavaObject>("withAdvertiserSubPublisher", objArray20); } if (preloadData.advertiserSubSite != null) { object[] objArray21 = new object[] { preloadData.advertiserSubSite }; obj2 = obj2.Call <AndroidJavaObject>("withAdvertiserSubSite", objArray21); } object[] objArray22 = new object[] { obj2 }; this.ajcInstance.Call("setPreloadedApp", objArray22); }
internal static extern void MATSetPreloadData(MATPreloadData preloadData);
void OnGUI() { GUIStyle headingLabelStyle = new GUIStyle(); headingLabelStyle.fontStyle = FontStyle.Bold; headingLabelStyle.fontSize = 50; headingLabelStyle.alignment = TextAnchor.MiddleCenter; headingLabelStyle.normal.textColor = Color.white; GUI.Label(new Rect(10, 5, Screen.width - 20, Screen.height/10), "MAT Unity Test App", headingLabelStyle); GUI.skin.button.fontSize = 40; if (GUI.Button (new Rect (10, Screen.height/10, Screen.width - 20, Screen.height/10), "Start MAT")) { print ("Start MAT clicked"); #if (UNITY_ANDROID || UNITY_IPHONE || UNITY_WP8 || UNITY_METRO) MATBinding.Init(MAT_ADVERTISER_ID, MAT_CONVERSION_KEY); MATBinding.SetPackageName(MAT_PACKAGE_NAME); MATBinding.SetFacebookEventLogging(true, false); #endif #if (UNITY_ANDROID || UNITY_IPHONE) MATBinding.CheckForDeferredDeeplinkWithTimeout(750); // 750 ms MATBinding.AutomateIapEventMeasurement(true); #endif } else if (GUI.Button (new Rect (10, 2*Screen.height/10, Screen.width - 20, Screen.height/10), "Set Delegate")) { print ("Set Delegate clicked"); #if (UNITY_ANDROID || UNITY_IPHONE) MATBinding.SetDelegate(true); #endif #if UNITY_WP8 MATBinding.SetMATResponse(new SampleWP8MATResponse()); #endif #if UNITY_METRO MATBinding.SetMATResponse(new SampleWinStoreMATResponse()); #endif } else if (GUI.Button (new Rect (10, 3*Screen.height/10, Screen.width - 20, Screen.height/10), "Enable Debug Mode")) { print ("Enable Debug Mode clicked"); #if (UNITY_ANDROID || UNITY_IPHONE || UNITY_WP8 || UNITY_METRO) // NOTE: !!! ONLY FOR DEBUG !!! // !!! Make sure you set to false // OR // remove the setDebugMode and setAllowDuplicates calls for Production builds !!! MATBinding.SetDebugMode(true); #endif } else if (GUI.Button (new Rect (10, 4*Screen.height/10, Screen.width - 20, Screen.height/10), "Allow Duplicates")) { print ("Allow Duplicates clicked"); #if (UNITY_ANDROID || UNITY_IPHONE || UNITY_WP8 || UNITY_METRO) // NOTE: !!! ONLY FOR DEBUG !!! // !!! Make sure you set to false // OR // remove the setDebugMode and setAllowDuplicates calls for Production builds !!! MATBinding.SetAllowDuplicates(true); #endif } else if (GUI.Button (new Rect (10, 5*Screen.height/10, Screen.width - 20, Screen.height/10), "Measure Session")) { print ("Measure Session clicked"); #if (UNITY_ANDROID || UNITY_IPHONE || UNITY_WP8 || UNITY_METRO) MATBinding.MeasureSession(); #endif } else if (GUI.Button (new Rect (10, 6*Screen.height/10, Screen.width - 20, Screen.height/10), "Measure Event")) { print ("Measure Event clicked"); #if (UNITY_ANDROID || UNITY_IPHONE || UNITY_WP8 || UNITY_METRO) MATBinding.MeasureEvent("evt11"); #endif } else if (GUI.Button (new Rect (10, 7*Screen.height/10, Screen.width - 20, Screen.height/10), "Measure Event With Event Items")) { print ("Measure Event With Event Items clicked"); #if (UNITY_ANDROID || UNITY_IPHONE || UNITY_WP8 || UNITY_METRO) MATItem item1 = new MATItem(); item1.name = "subitem1"; item1.unitPrice = 5; item1.quantity = 5; item1.revenue = 3; item1.attribute2 = "attrValue2"; item1.attribute3 = "attrValue3"; item1.attribute4 = "attrValue4"; item1.attribute5 = "attrValue5"; MATItem item2 = new MATItem(); item2.name = "subitem2"; item2.unitPrice = 1; item2.quantity = 3; item2.revenue = 1.5; item2.attribute1 = "attrValue1"; item2.attribute3 = "attrValue3"; MATItem[] eventItems = { item1, item2 }; MATEvent matEvent = new MATEvent("purchase"); matEvent.revenue = 10; matEvent.currencyCode = "AUD"; matEvent.advertiserRefId = "ref222"; matEvent.attribute1 = "test_attribute1"; matEvent.attribute2 = "test_attribute2"; matEvent.attribute3 = "test_attribute3"; matEvent.attribute4 = "test_attribute4"; matEvent.attribute5 = "test_attribute5"; matEvent.contentType = "test_contentType"; matEvent.contentId = "test_contentId"; matEvent.date1 = DateTime.UtcNow; matEvent.date2 = DateTime.UtcNow.Add(new TimeSpan((new DateTime(2,1,1)).Ticks)); matEvent.level = 3; matEvent.quantity = 2; matEvent.rating = 4.5; matEvent.searchString = "test_searchString"; matEvent.eventItems = eventItems; // transaction state may be set to the value received from the iOS/Android app store. matEvent.transactionState = 1; #if UNITY_IPHONE matEvent.receipt = getSampleiTunesIAPReceipt(); #endif MATBinding.MeasureEvent(matEvent); #endif } else if (GUI.Button (new Rect (10, 8*Screen.height/10, Screen.width - 20, Screen.height/10), "Test Setter Methods")) { print ("Test Setter Methods clicked"); #if (UNITY_ANDROID || UNITY_IPHONE || UNITY_WP8 || UNITY_METRO) MATBinding.SetAge(34); MATBinding.SetAllowDuplicates(true); MATBinding.SetAppAdTracking(true); MATBinding.SetDebugMode(true); MATBinding.SetExistingUser(false); MATBinding.SetFacebookUserId("temp_facebook_user_id"); MATBinding.SetGender(0); MATBinding.SetGoogleUserId("temp_google_user_id"); MATBinding.SetLocation(111,222,333); //MATBinding.SetPackageName(MAT_PACKAGE_NAME); MATBinding.SetPayingUser(true); MATBinding.SetPhoneNumber("111-222-3456"); MATBinding.SetTwitterUserId("twitter_user_id"); MATBinding.SetUserId("temp_user_id"); MATBinding.SetUserName("temp_user_name"); MATBinding.SetUserEmail("*****@*****.**"); //iOS-specific Features #if UNITY_IPHONE #if UNITY_5_0 MATBinding.SetAppleAdvertisingIdentifier(UnityEngine.iOS.Device.advertisingIdentifier, UnityEngine.iOS.Device.advertisingTrackingEnabled); #else MATBinding.SetAppleAdvertisingIdentifier(UnityEngine.iOS.Device.advertisingIdentifier, UnityEngine.iOS.Device.advertisingTrackingEnabled); #endif MATBinding.SetAppleVendorIdentifier(UnityEngine.iOS.Device.vendorIdentifier); MATBinding.SetDelegate(true); MATBinding.SetJailbroken(false); MATBinding.SetShouldAutoDetectJailbroken(true); MATBinding.SetShouldAutoGenerateVendorIdentifier(true); MATBinding.SetUseCookieTracking(false); #endif //Android-specific Features #if UNITY_ANDROID MATBinding.SetAndroidId("111111111111"); MATBinding.SetDeviceId("123456789123456"); MATBinding.SetGoogleAdvertisingId("12345678-1234-1234-1234-123456789012", true); MATBinding.SetMacAddress("AA:BB:CC:DD:EE:FF"); #endif //Windows Phone 8 Specific Features #if UNITY_WP8 MATBinding.SetAppName("testWP8_AppName"); MATBinding.SetAppVersion("testWP8_AppVersion"); MATBinding.SetLastOpenLogId("testWP8_LastOpenLogId"); MATBinding.SetOSVersion("testWP8_OS"); #endif //Android and iOS-specific Features #if (UNITY_ANDROID || UNITY_IPHONE) MATBinding.SetCurrencyCode("CAD"); MATBinding.SetTRUSTeId("1234567890"); MATPreloadData pd = new MATPreloadData("1122334455"); pd.advertiserSubAd = "some_adv_sub_ad_id"; pd.publisherSub3 = "some_pub_sub3"; MATBinding.SetPreloadedApp(pd); #endif #endif } else if (GUI.Button (new Rect (10, 9*Screen.height/10, Screen.width - 20, Screen.height/10), "Test Getter Methods")) { print ("Test Getter Methods clicked"); #if (UNITY_ANDROID || UNITY_IPHONE || UNITY_WP8 || UNITY_METRO) print ("isPayingUser = "******"matId = " + MATBinding.GetMATId()); print ("openLogId = " + MATBinding.GetOpenLogId()); #endif } }
public void SetPreloadedApp(MATPreloadData preloadData) { AndroidJavaObject androidJavaObject = new AndroidJavaObject("com.mobileapptracker.MATPreloadData", new object[] { preloadData.publisherId }); if (preloadData.offerId != null) { androidJavaObject = androidJavaObject.Call <AndroidJavaObject>("withOfferId", new object[] { preloadData.offerId }); } if (preloadData.agencyId != null) { androidJavaObject = androidJavaObject.Call <AndroidJavaObject>("withAgencyId", new object[] { preloadData.agencyId }); } if (preloadData.publisherReferenceId != null) { androidJavaObject = androidJavaObject.Call <AndroidJavaObject>("withPublisherReferenceId", new object[] { preloadData.publisherReferenceId }); } if (preloadData.publisherSub1 != null) { androidJavaObject = androidJavaObject.Call <AndroidJavaObject>("withPublisherSub1", new object[] { preloadData.publisherSub1 }); } if (preloadData.publisherSub2 != null) { androidJavaObject = androidJavaObject.Call <AndroidJavaObject>("withPublisherSub2", new object[] { preloadData.publisherSub2 }); } if (preloadData.publisherSub3 != null) { androidJavaObject = androidJavaObject.Call <AndroidJavaObject>("withPublisherSub3", new object[] { preloadData.publisherSub3 }); } if (preloadData.publisherSub4 != null) { androidJavaObject = androidJavaObject.Call <AndroidJavaObject>("withPublisherSub4", new object[] { preloadData.publisherSub4 }); } if (preloadData.publisherSub5 != null) { androidJavaObject = androidJavaObject.Call <AndroidJavaObject>("withPublisherSub5", new object[] { preloadData.publisherSub5 }); } if (preloadData.publisherSubAd != null) { androidJavaObject = androidJavaObject.Call <AndroidJavaObject>("withPublisherSubAd", new object[] { preloadData.publisherSubAd }); } if (preloadData.publisherSubAdgroup != null) { androidJavaObject = androidJavaObject.Call <AndroidJavaObject>("withPublisherSubAdgroup", new object[] { preloadData.publisherSubAdgroup }); } if (preloadData.publisherSubCampaign != null) { androidJavaObject = androidJavaObject.Call <AndroidJavaObject>("withPublisherSubCampaign", new object[] { preloadData.publisherSubCampaign }); } if (preloadData.publisherSubKeyword != null) { androidJavaObject = androidJavaObject.Call <AndroidJavaObject>("withPublisherSubKeyword", new object[] { preloadData.publisherSubKeyword }); } if (preloadData.publisherSubPublisher != null) { androidJavaObject = androidJavaObject.Call <AndroidJavaObject>("withPublisherSubPublisher", new object[] { preloadData.publisherSubPublisher }); } if (preloadData.publisherSubSite != null) { androidJavaObject = androidJavaObject.Call <AndroidJavaObject>("withPublisherSubSite", new object[] { preloadData.publisherSubSite }); } if (preloadData.advertiserSubAd != null) { androidJavaObject = androidJavaObject.Call <AndroidJavaObject>("withAdvertiserSubAd", new object[] { preloadData.advertiserSubAd }); } if (preloadData.advertiserSubAdgroup != null) { androidJavaObject = androidJavaObject.Call <AndroidJavaObject>("withAdvertiserSubAdgroup", new object[] { preloadData.advertiserSubAdgroup }); } if (preloadData.advertiserSubCampaign != null) { androidJavaObject = androidJavaObject.Call <AndroidJavaObject>("withAdvertiserSubCampaign", new object[] { preloadData.advertiserSubCampaign }); } if (preloadData.advertiserSubKeyword != null) { androidJavaObject = androidJavaObject.Call <AndroidJavaObject>("withAdvertiserSubKeyword", new object[] { preloadData.advertiserSubKeyword }); } if (preloadData.advertiserSubPublisher != null) { androidJavaObject = androidJavaObject.Call <AndroidJavaObject>("withAdvertiserSubPublisher", new object[] { preloadData.advertiserSubPublisher }); } if (preloadData.advertiserSubSite != null) { androidJavaObject = androidJavaObject.Call <AndroidJavaObject>("withAdvertiserSubSite", new object[] { preloadData.advertiserSubSite }); } this.ajcInstance.Call("setPreloadedApp", new object[] { androidJavaObject }); }