public override void OnCreate() { base.OnCreate(); //Initialize the HUAWEI Ads SDK. HwAds.Init(this); }
private void Init() { Debug.Log("[HMS] HMSAdsKitManager Start"); HwAds.Init(); isInitialized = true; adsKitSettings = HMSAdsKitSettings.Instance.Settings; StartCoroutine(LoadingAds()); }
public void Init() { if (isInitialized) { return; } HwAds.Init(); isInitialized = true; }
public void setRequestOptionsNonPersonalizedAd() { RequestOptions reqOptions = HwAds.getRequestOptions() .toBuilder() .setNonPersonalizedAd(new Integer(NonPersonalizedAd.ALLOW_ALL)) .build(); HwAds.setRequestOptions(reqOptions); TestTip.Inst.ShowText("RequestOptions NonPersonalizedAd:" + HwAds.getRequestOptions().getNonPersonalizedAd()); }
protected override void OnCreate(Bundle savedInstanceState) { TabLayoutResource = Resource.Layout.Tabbar; ToolbarResource = Resource.Layout.Toolbar; base.OnCreate(savedInstanceState); HwAds.Init(this); Xamarin.Essentials.Platform.Init(this, savedInstanceState); global::Xamarin.Forms.Forms.Init(this, savedInstanceState); LoadApplication(new App()); }
protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); Title = GetString(Resource.String.interstitial_ad); SetContentView(Resource.Layout.activity_interstitial); // Initialize the HUAWEI Ads SDK. HwAds.Init(this); Log.Info(TAG, "HwAds.Init called successfully."); Log.Info(TAG, "HwAds.RequestOptions: " + HwAds.RequestOptions); Log.Info(TAG, "HwAds.SDKVersion: " + HwAds.SDKVersion); displayRadioGroup = FindViewById <RadioGroup>(Resource.Id.display_radio_group); loadAdButton = FindViewById <Button>(Resource.Id.load_ad); loadAdButton.Click += LoadAdButton_Click; }
protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); Xamarin.Essentials.Platform.Init(this, savedInstanceState); SetContentView(Resource.Layout.activity_main); Android.Support.V7.Widget.Toolbar toolbar = FindViewById <Android.Support.V7.Widget.Toolbar>(Resource.Id.toolbar); SetSupportActionBar(toolbar); HwAds.Init(this); BannerView bannerView = FindViewById <BannerView>(Resource.Id.hw_banner_view); // Set the ad slot ID and ad size,"testw6vs28auh3" is a dedicated test ad slot ID. bannerView.AdId = "testw6vs28auh3"; bannerView.BannerAdSize = BannerAdSize.BannerSize32050; AdParam adParam = new AdParam.Builder().Build(); bannerView.LoadAd(adParam); FloatingActionButton fab = FindViewById <FloatingActionButton>(Resource.Id.fab); fab.Click += FabOnClick; }
public void Init() { HwAds.Init(); initialized = true; }