我目前有一个音乐应用程序,我正在尝试在应用程序广告墙中发布广告,他们在这方面永远不会给你任何帮助。他们投入的只是
将此链接放置在应用程序的网络视图或移动网页的iframe中,以便LeadBolt应用程序墙出现在其中。
http://ad.leadboltads.net/show_app_wall?section_id=97**
我是编程的新手
我已经问过了,我研究了几个小时,但我还没能找到一个解决方案,我能得到的只是混合答案
我真正想要的是一个简单的定时弹出窗口,里面有一个网络浏览器,它有一个iframe调用该地址,所以它会运行广告直到关闭,然后在x段时间后再次弹出,这是解决这个问题的最佳方法还是有其他方法
我无意粗鲁,但谁能回答呢?回答得详细,因为就像我说的那样,我是个新手,提前感谢
编辑*
我刚刚在网站上找到这个在XAML文件中添加以下行webview height="50"width="320"x:name="webview">
然后在xaml.cs文件中添加以下代码以加载HTML横幅或HTML应用程序墙webview。导航到字符串("http://ad.leadboltads.net/show_app_ad.js?section_id=xxxxxxxxx\">"(;
//对于App Wall,请使用以下代码://webview。导航(新Uri("http://ad.leadboltads.net/show_app_wall?section_id=xxxxxxxx"((;
我的新问题是,我如何让它每隔一段时间就会出现,直到用户关闭它为止
感谢您提出问题。LeadBolt的技术团队提供了以下建议来帮助您。
如果您需要进一步的帮助,我鼓励您直接联系您的客户经理,或发送电子邮件给我们的支持团队。
To Add a simple auto-refreshing HTML Banner:
1. In your xaml file, add a WebView object like so: <WebView x:Name="banner" Width="320" Height="50" />
2. Add the following code in your xaml.cs file. Please note this is just a sample code, please modify the class and method names as suited to your App’s xaml.cs file:
namespace HTMLAdDemo
{
public sealed partial class MainPage : Page
{
private DispatcherTimer timer = new DispatcherTimer();
String bannerHtml = “<html><body style=”margin:0;padding:0”><script type="text/javascript" src="http://ad.leadboltads.net/show_app_ad.js?section_id=YOUR_LB_SECTION_ID"></script></body></html>”;
public MainPage()
{
this.InitializeComponent();
banner.NavigateToString(bannerHtml);
// now setup timer to refresh banner every 30s
timer.Tick += (sender, e) => { bannerWebview.NavigateToString(bannerHtml); };
timer.Interval = new TimeSpan(00, 0, 30); //change this number to modify the refresh time
timer.Start();
}
// Your other App Specific functions here
}
}
使用关闭按钮添加应用程序墙。请注意:这只是一个示例代码,实际实现可能会在您的应用程序中有所不同,以满足您的应用的要求(即颜色、文本和样式需要根据您的应用要求进行修改(:
1. In your xaml file, add the following objects:
<WebView x:Name="appWall" Width="400" Height="300" />
<Button x:Name="closeButton" Width="400" Height="40" Content="Close" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Click="Button_Click"/>
2. Add the following code in your xaml.cs file. Please note this is just a sample code, please modify the class and method names as suited to your App’s xaml.cs file
namespace HTMLAdDemo
{
public sealed partial class MainPage : Page
{
public MainPage()
{
this.InitializeComponent();
appWall.Navigate(new Uri("http://ad.leadboltads.net/show_app_wall?section_id=YOUR_LB_SECTION_ID"));
}
private void Button_Click(object sender, RoutedEventArgs e)
{
appWall.Visibility = Visibility.Collapsed;
closeButton.Visibility = Visibility.Collapsed;
}
// Your other App Specific functions here
}
}
诚挚的问候,
LeadBolt支持