Usuário com melhor resposta
Passo a passo para inserir publicidade numa app Windows Phone

Pergunta
-
Respostas
-
Olá,
Você já deu uma olhada nisso:
Advertising in apps for Windows Phone 8
Windows Phone 8.0 Silverlight Apps -- Integrating the AdControl Using the Visual Designer
Herbert Lausmann
- Marcado como Resposta Giovani Cr quarta-feira, 30 de abril de 2014 19:04
-
Ah ta,
Dei uma lida sobre o assunto. É necessário, no Manifest do seu APP, adicionar as permissões abaixo:
<Capabilities> <Capability Name="ID_CAP_IDENTITY_USER"/> <Capability Name="ID_CAP_MEDIALIB"/> <Capability Name="ID_CAP_NETWORKING"/> <Capability Name="ID_CAP_PHONEDIALER"/> <Capability Name="ID_CAP_WEBBROWSERCOMPONENT"/> </Capabilities>
Está como XML, mas no editor visual do Manifest elas aparecem como CheckBox que você precisa marcar.
Caso continue com o problema, tente assim:
<UI:AdControl ApplicationId="test_client" AdUnitId="Image480_80" Height="80" Margin="78,46,98,354" Width="480" CountryOrRegion="pt-BR" />
Links de referência:
Windows phone ads not working - Stack Overflow
Ad control does not show anything and disappear on windows phone apps - Stack Overflow
Windows Phone 8 AdControl not showing on my Device - Stack Overflow
>>Complemento:
Ao que parece, se você configurar o seu AdControl com os dados do seu PubCenter com o AdUnitId e ApplicationId, a publicidade só será vista depois que seu app estiver publicado na loja. Vi isso no segundo link, e ao que parece é verídico, pois uma pessoa confirmou isso também...
Herbert Lausmann
- Marcado como Resposta Giovani Cr quarta-feira, 30 de abril de 2014 19:04
Todas as Respostas
-
Olá,
Você já deu uma olhada nisso:
Advertising in apps for Windows Phone 8
Windows Phone 8.0 Silverlight Apps -- Integrating the AdControl Using the Visual Designer
Herbert Lausmann
- Marcado como Resposta Giovani Cr quarta-feira, 30 de abril de 2014 19:04
-
-
-
Eu fiz tudo o que pede as instruções mas não aparece o anúncio, nem o teste com "test_client" e "Adtext" por exemplo.
Eu testo no emulador, será que no emulador não aparece os anúncios? Eu uso o Visual Studio Express 2012.
Olha o código:
<phone:PhoneApplicationPage
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:UI="clr-namespace:Microsoft.Advertising.Mobile.UI;assembly=Microsoft.Advertising.Mobile.UI"
x:Class="PopEnigma.MainPage"
mc:Ignorable="d"
FontFamily="{StaticResource PhoneFontFamilyNormal}"
FontSize="{StaticResource PhoneFontSizeNormal}"
Foreground="{StaticResource PhoneForegroundBrush}"
SupportedOrientations="Landscape" Orientation="Landscape"
shell:SystemTray.IsVisible="True">
<!-- ApplicationBar -->
<phone:PhoneApplicationPage.ApplicationBar>
<shell:ApplicationBar IsVisible="True" IsMenuEnabled="True" Mode="Minimized">
<shell:ApplicationBar.MenuItems>
<shell:ApplicationBarMenuItem Text="home" Click="HomeMenuItem_Click" />
</shell:ApplicationBar.MenuItems>
<shell:ApplicationBarIconButton IconUri="/Assets/AppBar/appbar.back.rest.png" IsEnabled="True" Text="back" Click="BackApplicationBar_Click"/>
<shell:ApplicationBarIconButton IconUri="/Assets/AppBar/appbar.next.rest.png" IsEnabled="True" Text="forward" Click="ForwardApplicationBar_Click"/>
</shell:ApplicationBar>
</phone:PhoneApplicationPage.ApplicationBar>
<!--LayoutRoot is the root grid where all page content is placed-->
<Grid x:Name="LayoutRoot" Background="Transparent">
<phone:WebBrowser x:Name="Browser"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
Loaded="Browser_Loaded"
NavigationFailed="Browser_NavigationFailed" Source="/Html/index.html" Margin="0,0,0,10" />
<UI:AdControl ApplicationId="test_client" AdUnitId="TextAd" Height="80" Margin="78,46,98,354" Width="480" CountryOrRegion="pt-BR" />
</Grid>
</phone:PhoneApplicationPage> -
Ah ta,
Dei uma lida sobre o assunto. É necessário, no Manifest do seu APP, adicionar as permissões abaixo:
<Capabilities> <Capability Name="ID_CAP_IDENTITY_USER"/> <Capability Name="ID_CAP_MEDIALIB"/> <Capability Name="ID_CAP_NETWORKING"/> <Capability Name="ID_CAP_PHONEDIALER"/> <Capability Name="ID_CAP_WEBBROWSERCOMPONENT"/> </Capabilities>
Está como XML, mas no editor visual do Manifest elas aparecem como CheckBox que você precisa marcar.
Caso continue com o problema, tente assim:
<UI:AdControl ApplicationId="test_client" AdUnitId="Image480_80" Height="80" Margin="78,46,98,354" Width="480" CountryOrRegion="pt-BR" />
Links de referência:
Windows phone ads not working - Stack Overflow
Ad control does not show anything and disappear on windows phone apps - Stack Overflow
Windows Phone 8 AdControl not showing on my Device - Stack Overflow
>>Complemento:
Ao que parece, se você configurar o seu AdControl com os dados do seu PubCenter com o AdUnitId e ApplicationId, a publicidade só será vista depois que seu app estiver publicado na loja. Vi isso no segundo link, e ao que parece é verídico, pois uma pessoa confirmou isso também...
Herbert Lausmann
- Marcado como Resposta Giovani Cr quarta-feira, 30 de abril de 2014 19:04
-