\\ Home Page : Articolo : Stampa
How to publish a Windows Phone Application (creating XAP file) and insert the Google Mobile Ads on your App with Visual Studio 13.
By Admins (from 21/07/2014 @ 06:08:54, in en - Video Alert, read 2118 times)

We, from TurismoAssociati, have begun to create free apps for WP8 (here is the LINK to our Store). Here are all the information you need to create, insert and post a Windows Phone application with ads:

The Google Mobile Ads SDK allows developers to easily incorporate mobile-friendly text and image banners as well as rich, full-screen web apps known as interstitials. An ever-growing set of "calls-to-action" are supported in response to user touch including direct access to the App Store, Google Play, Windows Phone 8 Marketplace, iTunes, maps, video and the dialer. Ads can be targeted by location and demographic data.

For Windows 8 you will need to meet these requirements:
Windows Phone SDK 8.0
Visual Studio 2012 or later

You can get the SDK by downloading the zip.

Incorporate the downloaded DLL:

1. Right-click the References node in Solution Explorer and choose Add Reference.
2. Select the Browse button to find the unzipped Google Mobile Ads SDK.
3. Choose the downloaded GoogleAds.dll file and click Add.
4. Make sure that GoogleAds.dll is selected and click OK.


Selecting capabilities

With the SDK, you will need to select mandatory and optional capabilities for your app.

Windows Phone

You can modify your app's capabilities by opening WMAppManifest.XML and selecting the Capabilities tab.

Mandatory Capabilities
ID_CAP_NETWORKING†Access to network services is required when requesting ads.
ID_CAP_WEBBROWSERCOMPONENT†Required since the AdView is a web browser.
ID_CAP_MEDIALIB_PLAYBACK†Provides access for currently playing media items.
ID_CAP_MEDIALIB_AUDIO†Provides read access to audio items in media library.

Here is the LINK with details.

Banner ads use a small portion of the screen to entice users to "click through" to a richer, full-screen experience such as a website or app store page. This guide shows you how to enable your app to serve a banner ad.

Windows Phone 8 apps are composed of controls the user sees, such as text areas, buttons and other UI elements. AdView is simply another control displaying ads that respond to user touch.

Adding a banner ad

Locate the AdView control in the Toolbox menu. Note that this is different from the AdControl control. Skip to step 2 if you've already got the AdView control in your toolbox.

Right click in the Toolbox and select Choose Items.... Click Browse on the menu that pops up and select the GoogleAds.dll file you previously downloaded (if you downloaded the package using NuGet, you should be able to find it in the packages folder in your project). Make sure the AdView control is selected from the GoogleAds namespace, then click OK.

Like many controls, AdView is most easily specified in XAML markup. One way to do this is to drag the AdView control from your Toolbox into the pane that shows the output of your XAML markup.

Here is the LINK with details.

How to modify the app manifest file for Windows Phone 8?

The app manifest file, WMAppManifest.xml, contains properties and settings that are required when you submit your app to the Windows Phone Store. Windows Phone SDK 8.0 includes a Manifest Designer that is integrated with Visual Studio. Manifest Designer makes it easy for you to update the manifest file without editing the raw XML of the file.
You can use Manifest Designer to modify the manifest file for apps that target Windows Phone OS 7.1 as well as apps that target Windows Phone 8.

How to modify the manifest file in Manifest Designer?

To modify the manifest file you use Manifest Designer.

1. In Visual Studio, close the manifest file if itís already open in XML code view.
2. In Solution Explorer, expand the Properties node of the open project.
3. Double-click the manifest file, WMAppManifest.xml. Or, right-click the file and select Open or View Designer from the context menu. If the manifest file is already open in XML code view, Visual Studio prompts you to close the file. Then Manifest Designer opens in a new Visual Studio tab.

Here is the LINK with details.

Solution Explorer > Solution 'App" (x projects) > right click > Properties > Configuration Properties > select Release and Deploy > Apply and OK - Then go to BUILD > Build Solution - Upload/Submit apps the *.xap (AppStudio_Release_AnyCPU.xap) file (from C:\...\AppStudio.UI\Bin\Release) to your Windows Phone Store (dev.windows)

When adding a reference to the Analytics monitor from a project in Visual Studio, an error may occur on Windows 8:

"A reference to a higher version or incompatible assembly cannot be added to the project"

This is likely due to the file being blocked by Windows, as downloaded content is deemed unsafe for. The solution is to right-click on the unpacked monitor file, select Properties, and click Unblock.

Here is the LINK with details.

Ford Turani for TurismoAssociati.it