MG Console Operation Guide Updated: 2021-03-10
Sign up for Miracle Games developer account
Log in to the console of Miracle Games and click "Register now".
Application management - Create Application
- Select the application list and click Add
- Icon: click upload
- Application Name: fill in the name of the application
- English alternative name: fill in the English name of the product
- Application Description: fill in the Chinese description of the application
- Application English Description: fill in the English description of the application
- version: select Windows 10
- Supported equipment types: check all
- Application status: fill in for the first time and select Unpublished. If published in the Microsoft Store, select Published
- Win10 Microsoft Store application ID: if the application has been published in Microsoft Store, please fill in the store ID
- Package name (PFN): if the app has been published in Microsoft Store, please fill in the package name
- Application secret: if the application has access to WNS message push, please fill in. Program secret access details
- H5 game entrance address: no need to fill in, skip
- RSA application public key: no need to fill in, skip
- MS public key: no need to fill in, generated by default
- User agreement: fill in the user agreement link address, if not, please skip
- Privacy Policy: fill in the privacy policy link address, if not, please skip
- Use area: check "global"
- Chinese official website address: fill in the official website of the application. If not, please skip
- English official website address: fill in the official website of the application, if not, please skip
-
Open community: MG community function, if you choose to open, please check "yes"
- Community function: check "Information" according to your own needs
- Download label: check the download label according to the consultation requirements.
- Contact us: provide users with their own contact information
- Contact us(English): provide users with their own contact information
- Whether to receive full platform consultation: check "No"
Advertising platform - create advertising space
- Application: select the application that needs to create advertising space
- Advertising space name: edit custom name
- Ads Direction: select "horizontal screen"
- Advertisement type: it supports 6 sizes of advertisements, which can be checked according to your own needs
- Whether the user can close the advertisement: check "Yes" (the closing button is displayed in the upper right corner of the advertisement) "No" (the closing button is not displayed in the upper right corner of the advertisement)
- Usage status: Use (open AD) Disable (close AD)
- After creating the advertisement space, the advertisement space ID will be generated, and then it can be called directly
Advertising access
Download the Miracle Games SDK
You need to initialize the SDK before accessing the advertisement
Miracle Games advertising support[Open Screen 1920*1080][Banner 728*90][Insertion Screen 640*640][Couplets 300*600][Full Screen 768*432][Popup]
Open Screen,FullScreenInterstitial,Exit,Banner,Insertion,Couplets
After creating the open screen, banner, insertion screen and couplet advertising space in the console of MG, insert the following code in the relevant position of the apps code.
Open Screen
The open screen AD space is implemented in the load method of the mainPage page
public async void ShowSpreadnAd()
{
//“XXXXXXXX”Pparameter needs to pass in the advertisement key, which is created by the MG console. 。
var fiAd = await AdvertisingManager.ShowAd(“XXXXXXXX”, AdType.FullScreen);
if (ad.ReturnValue)//When the advertisement is closed, the advertisement closing event is triggered and MgAd_AdClosed is executed or do not register the event.
{
}
}
Platform::String^ MainPage::SpreadnAd() //MG FullScreenAd
{
//“XXXXXXXX”Pparameter needs to pass in the advertisement key, which is created by the MG console. 。
auto initTask = Concurrency::create_task(MiracleGames::AdvertisingManager::ShowAd("XXXXXXXX", MiracleGames::Models::AdType::FullScreen));
initTask.then([](MiracleGames::Services::Core::Common::AsyncProcessResult^ result)
{
if (result->ReturnValue)//When the advertisement is closed, the advertisement closing event is triggered and MgAd_AdClosed is executed or do not register the event.
{
}
});
return "";
}
- Among them, XXXXXXXXXX is the primary key of advertising space, and the primary key of advertising space is created in the list of advertising space of the advertising platform of MG background。
FullScreenInterstitial
public async void ShowFullScreenInterstitialAd()
{
//“XXXXXXXX”Pparameter needs to pass in the advertisement key, which is created by the MG console. 。
var fiAd = await AdvertisingManager.ShowAd(“XXXXXXXX”,AdType.FullScreenInterstitial);
if (fiAd.ReturnValue)//When the advertisement is closed, the advertisement closing event is triggered and MgAd_AdClosed is executed or do not register the event.
{
}
}
Platform::String^ MainPage::MainScreen_FullScreenAd()
{
//“XXXXXXXX”Pparameter needs to pass in the advertisement key, which is created by the MG console. 。
auto initTask = Concurrency::create_task(MiracleGames::AdvertisingManager::ShowAd("XXXXXXXX", MiracleGames::Models::AdType::FullScreenInterstitial));
initTask.then([](MiracleGames::Services::Core::Common::AsyncProcessResult^ result)
{
if (result->ReturnValue)//When the advertisement is closed, the advertisement closing event is triggered and MgAd_AdClosed is executed or do not register the event.
{
}
});
return "";
}
Exit
//“XXXXXXXX”Pparameter needs to pass in the advertisement key, which is created by the MG console. 。
MiracleGames.AdvertisingManager.SetupExitAdUnitId(“XXXXXXXX”);
Platform::String ^ MainPage::MainScreen_QuitAd()
{
Windows::UI::Core::CoreWindow^ wnd = Windows::ApplicationModel::Core::CoreApplication::MainView->CoreWindow;
wnd->Dispatcher->RunAsync(
Windows::UI::Core::CoreDispatcherPriority::Normal,
ref new Windows::UI::Core::DispatchedHandler([]()
{
//“XXXXXXXX”Pparameter needs to pass in the advertisement key, which is created by the MG console. 。
MiracleGames::AdvertisingManager::SetupExitAdUnitId(“XXXXXXXX”);
}));
return "";
}
Banner
public async void ShowBannerAdWithClose()
{
//“XXXXXXXX”Pparameter needs to pass in the advertisement key, which is created by the MG console. 。
var bannerAd = await AdvertisingManager.ShowAd(“XXXXXXXX”, AdType.Banner, new BannerAdSettingOptions
{
DisplayCloseButton = true,//Whether to turn on the close button
//Control the placement of display ads
HorizontalAlignment = HorizontalAlignment.Center,
VerticalAlignment = VerticalAlignment.Bottom
});
if (bannerAd.ReturnValue)//When the advertisement is closed, the advertisement closing event is triggered and MgAd_AdClosed is executed or do not register the event.
{
}
}
Platform::String ^MainPage::MainScreen_Binner()
{
auto opt = ref new MiracleGames::Models::BannerAdSettingOptions();
opt->DisplayCloseButton = true;//Whether to turn on the close button
//Control the placement of display ads
opt->HorizontalAlignment = Windows::UI::Xaml::HorizontalAlignment::Center;
opt->VerticalAlignment = Windows::UI::Xaml::VerticalAlignment::Bottom;
//“XXXXXXXX”Pparameter needs to pass in the advertisement key, which is created by the MG console. 。
auto initTask = Concurrency::create_task(MiracleGames::AdvertisingManager::ShowAd(“XXXXXXXX”, MiracleGames::Models::AdType::Banner, opt));
initTask.then([](MiracleGames::Services::Core::Common::AsyncProcessResult^ result)
{
if (result->ReturnValue)//When the advertisement is closed, the advertisement closing event is triggered and MgAd_AdClosed is executed or do not register the event.
{
}
});
return "";
}
Insertion
public async void ShowInterstitialAdWithClose()
{
//“XXXXXXXX”Pparameter needs to pass in the advertisement key, which is created by the MG console. 。
var interstitialAd = await AdvertisingManager.ShowAd(“XXXXXXXX”,AdType.Interstitial,
new InterstitialAdSettingOptions { DisplayCloseButton = true });//Whether to turn on the close button
if (interstitialAd.ReturnValue)//When the advertisement is closed, the advertisement closing event is triggered and MgAd_AdClosed is executed or do not register the event.
{
}
}
Platform::String^ MainPage::MainScreen_TableAD()
{
auto opt = ref new MiracleGames::Models::InterstitialAdSettingOptions();
opt->DisplayCloseButton = true;//Whether to turn on the close button
//“XXXXXXXX”Pparameter needs to pass in the advertisement key, which is created by the MG console. 。
auto initTask = Concurrency::create_task(MiracleGames::AdvertisingManager::ShowAd(“XXXXXXXX”, MiracleGames::Models::AdType::Interstitial, opt));
initTask.then([](MiracleGames::Services::Core::Common::AsyncProcessResult^ result)
{
if (result->ReturnValue)//When the advertisement is closed, the advertisement closing event is triggered and MgAd_AdClosed is executed or do not register the event.
{
}
});
return "";
}
Couplets
public async void ShowCoupletAdWithClose()
{
//“XXXXXXXX”Pparameter needs to pass in the advertisement key, which is created by the MG console. 。
var coupletAd = await AdvertisingManager.ShowAd(“XXXXXXXX”,
AdType.Couplet,
new CoupletAdSettingOptions
{
DisplayCloseButton = true,//Whether to turn on the close button
VerticalAlignment = VerticalAlignment.Top,//Control the placement of display ads
CoupletDisplayMode = CoupletDisplayMode.Both//The number of coupletAD Both:Couplet ads on both sides。LeftOnly:Onlyleft。RightOnly:OnlyRight
});
if (coupletAd.ReturnValue)//When the advertisement is closed, the advertisement closing event is triggered and MgAd_AdClosed is executed or do not register the event.
{
}
}
Platform::String ^ ::MainPage::MainScreen_Couplet()
{
auto opt = ref new MiracleGames::Models::CoupletAdSettingOptions();
opt->DisplayCloseButton = true;//Whether to turn on the close button
opt->VerticalAlignment = Windows::UI::Xaml::VerticalAlignment::Top;//Control the placement of display ads
opt->CoupletDisplayMode = MiracleGames::Models::CoupletDisplayMode::RightOnly;//The number of coupletAD Both:Couplet ads on both sides。LeftOnly:Onlyleft。RightOnly:OnlyRight
//“XXXXXXXX”Pparameter needs to pass in the advertisement key, which is created by the MG console. 。
auto initTask = Concurrency::create_task(MiracleGames::AdvertisingManager::ShowAd(“XXXXXXXX”, MiracleGames::Models::AdType::Couplet, opt));
initTask.then([](MiracleGames::Services::Core::Common::AsyncProcessResult^ result)
{
if (result->ReturnValue)//When the advertisement is closed, the advertisement closing event is triggered and MgAd_AdClosed is executed or do not register the event.
{
}
});
return "";
}
Advertising report and payment settings
Report: you can view the advertisement data of the application
Setting - financial information
Financial information: fill in the financial information of individual or enterprise.