App capability removed after pubblication - c#

When I test my app on my device, by deploying it with Visual Studio directly from my pc to my phone, ad is showing. Then I published my app, and there the ad is not showing.
After some research, I found that my to show my ad correctly my app should have ID_CAP_WEBBROWSERCOMPONENT in WMAppManifest file. I noticed, by watching my app's details inside my developer dashboard, that that id_cap is being removed after publishing the app!
I'm not the only, one but I didn't find an answer.
Some posts:
http://social.msdn.microsoft.com/Forums/wpapps/en-US/a172dcb6-7e31-45a1-82f1-44bcd8aeac73/my-app-needs-idcapwebbrowsercomponent-but-marketplace-says-not?forum=wpsubmit
http://social.msdn.microsoft.com/Forums/wpapps/en-US/6e5c635d-fcb4-4156-97fe-c5153088bb91/ads-are-not-showing-im-my-published-app-they-worked-during-development-whats-up-with-that?forum=wpdevelop
Note that I'm working with XNA-Silverlight and using the DrawableAd associated with AdComponent.
I really don't know how to handle this problem. Maybe can I add the capability programmatically?
** EDIT **
I aknowledged that the manifest file is just used while debugging, when you submit an app, it's capababilities are recognized automatically. Here is the problem. I run the StoreKitTeste in Visual Studio as shown here: http://msdn.microsoft.com/en-us/library/windowsphone/develop/gg180730(v=vs.105).aspx#BKMK_UsingtheMarketplaceTestKittoDetermineApplicationCapabilitiesforWindowsPhoneOS71Applications
and in fact it doesn't recognize ID_CAP_WEBBROWSERCOMPONENT. How can I make him see that I need it?
** EDIT 2 *
I found here the same problem http://www.geekchamp.com/tips/be-careful-when-submitting-for-windows-phone-marketplace-an-app-that-uses-capturesource-class
It is related to microphone capability, how can I do the same with Webbrowsercomponent?

I just added: WebBrowser w = new WebBrowser(); somewhere and it recognized its capability.

Related

AdControl doesn't show ads with my AppID and UnitID

In my UWP app I use an AdControl that can be either 320x50 or 640x100 depending on the windows size. The problem is that I can't get it to display ads if I'm using my AppID and UnitID even though it displays them if I use the test IDs provided by Microsoft. The app has the Internet Client capability, is privately available in the store since last week and I'm debugging it on an italian IP. TheErrorOccured event gives me a NoAdAvailable error. How could I solve this?
EDIT 1:
I installed the Microsoft Ads SDK using the link of the answer but I now get on this line of code global::Windows.UI.Xaml.Application.LoadComponent(this, resourceLocator, global::Windows.UI.Xaml.Controls.Primitives.ComponentResourceLocation.Application);
in the MainPage.g.i.cs file this error: Windows.UI.Xaml.Markup.XamlParseException.
Is there a way I can solve it?
You May miss something Follow these steps-
1) Download this SDK
2) Add a reference to the Microsoft Advertising SDK in your project:
From the Solution Explorer window, right click References, and select Add Reference…
In Reference Manager, expand Universal Windows, click Extensions, and then select the check box next to Microsoft Advertising SDK for XAML (Version 10.0).
In Reference Manager, click OK.
3) Modify the XAML for the page where you are embedding advertising to include the Microsoft.Advertising.WinRT.UI namespace
Add this line of code in xaml references -
xmlns:UI="using:Microsoft.Advertising.WinRT.UI"
4) Then add your ad control with Ad Unit and ID from store
<UI:AdControl ApplicationId="Your Ad ID"
AdUnitId="Your AdUnit"
HorizontalAlignment="Left"
Height="250"
VerticalAlignment="Top"
Width="300"/>
this is example for Banner ads so go to your dev dashboard Monetize > In App Ad then Create new ad unit.
*Select Your App,
*Add ad unit name,
*Select ad unit type to banner,
*and device family Windows 10 UWP.
and click on create after that copy your ad unit id and app id and pase in you ad control in xaml
Then Debug your app in x86,x64x,ARM then wait few seconds (according to your internet connection) ad will appear soon.
Further after submission of app package to the store you need to configure ad mediation.. read this article for this it will show you everthing step by step

WinRT & UWP WebView localhost url doesn't fire when app is packaged

Boy I'm really struggling with this one!
So I have a WinRT Metro application that has an HTML webpage embedded into a webview within the application. In the HTML page there is a div with an href to a localhost url. I'm using this localhost call to communicate with a .NET desktop application that is listening for this url on a localhost port.
When I build the application (as debug or release) in Visual Studio (2015, update 1 or 2), the application works as expected. I can click on the div, the url is fired, and the communication is successful.
However, when I package the application and sideload it on to my machine, the functionality does not work as expected. I can click on the div...but the url is never fired.
HTML Url Example ([...] = code removed):
<a href="http://localhost:8123/?Api [...] >Click here</a>
Codebehind Navigating to HTML Example:
this.webView.Navigate(new Uri("ms-appdata:///local/index.html"));
XAML Webview Instantiation:
<WebView x:Name="webView" Grid.Row="1" ScriptNotify="webView_ScriptNotify" Grid.Column="1" Visibility="Collapsed"/>
Here are the things I've tried:
I created a WinRT app that only contained the webview and the embedded HTML page. Functionality works when built, but not when packaged.
I created a UWP app that only contained the webview and the embedded HTML page. Functionality works when built, but not when packaged.
I tried packaging the app outside of Visual Studio using the command line as described here. The functionality does not work.
I tried using different versions of Visual Studio 2015. Same results.
I tried building/packaging on different machines. Same results.
I tried to navigate to google instead of the localhost. Works.
I tried to navigate to another html file instead of the localhost. Works.
Naturally, I tried the obvious things too like cleaning, changing package name, changing settings in the Visual Studio App Packager, reboots, removing references, etc.
Has anyone experienced this before? It seems to be some sort of bug with the packaging process. Any suggestions/tips/answers are welcome! Thanks!
And just in case you're wondering, this application is intended for enterprise use only within the company I work for and will not be uploaded to the Windows Store.
Normally, you can't open a loopback connection in a UWP store app. Full stop. If you're side loading, or in an enterprise environment, there is a workaround:
https://msdn.microsoft.com/en-us/library/windows/apps/dn640582.aspx
I had a problem similar enough to this for it to be worth sharing my experience.
My app is a Universal app with a WebView control. The WebView source is a file in the app package. I define my WebView in the XAML as follows.
<WebView x:Name="myWebview" Source="ms-appx-web:///Assets/www/mylocalwebpage.html"/>
In Debug mode this works perfectly. In the first run in Release mode it does not load the page. In all subsequent runs of the Release mode app it works perfectly. It's a reproducible and incredibly frustrating bug.
My workaround is simple but effective. I use a timer to set the Source of the webview after one second. I add the following line below this.InitializeComponent();
// this worksaround a bug: on first launch in release mode the webview doesn't load
loadWebviewTimer = new Timer(loadWebview, null, 1000, Timeout.Infinite);
And then another
private async void loadWebview(object state)
{
await Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () =>
{
myWebview.Navigate(new Uri("ms-appx-web:///www/mylocalwebpage.html"));
});
}
It's not a pretty fix, but it works. Of interest, mylocalwebpage.html has quite a lot of javascript in it; I suspect that this is related to the problem.

Warning: MapServiceToken not specified

I have been making an UWP app with the using a MapControl but when I run the app I get an error in the bottom corner saying "Warning: MapServiceToken not specified". The XAML I am using is as follows:
<Maps:MapControl x:Name="MapControl1" Loaded="mapLoaded" ZoomLevelChanged="mapZoomChanged" MapServiceToken="AqK9nK0h_LngGSC8pHPzBJvl62yf617zRytgimB3fyYqdJPljcB-EGm3llmUUrlI"/>
As you can see I have specified the MapServiceToken and I have also tried specifying it using C# with no luck.
MapService.ServiceToken = "AqK9nK0h_LngGSC8pHPzBJvl62yf617zRytgimB3fyYqdJPljcB-EGm3llmUU...";
MapControl1.MapServiceToken = "AqK9nK0h_LngGSC8pHPzBJvl62yf617zRytgimB3fyYqdJPljcB-EGm3llmU...";
I have used www.bingmapsportal.com to get my token but I have also tried using the Application ID and Authentication Token from the Windows Dev Center. Any Ideas?
NOTE: For those who may be using older keys from Windows 8 platform
There seems to be an issue updating old keys to the Universal Windows Platform type. I had a key that was created in 2014, but even after I updated the key to Universal Windows it still would not authorize when I placed the key in the MapServiceToken value of the XAML. (it seems as though the value of the key itself never changes when you change the type on the key, even though it should update with a new value)
In order to solve this you have to create a brand new application key and use that value instead, and then the Warning message will go away.
I got the same issue but here is my solution.
First navigate to https://www.bingmapsportal.com/Application. Find the link to create a new key.
On the form, fill in the Application type field. The available options are:
Dev/Test
Mobile Application
Website
Windows Application
Even though you are developing a Xamarin.Forms project (that is intuitively a kind of mobile app), you must choose Windows Application rather than Mobile Application. Why? The reason might be "UWP is an Windows Application". Period.
Failure doing so will trigger the warning.
Sign into the Microsoft Dev account and navigate to this URI
https://www.bingmapsportal.com/Application#
Here the Key can be obtained for Universal.
It can be set in the XAML MapServiceToken, works fine!
Also, you can sign in directly on Bing Maps to generate a key.
https://www.bingmapsportal.com/
My Account -> My keys
For UWP, this key is quite long.
FYI, when I added the key on XAML for MapControl using MapServiceToken property, the app crashed my computer. Then when I restarted it, the App run well. Oh dear me...
Read Microsoft documentation
https://learn.microsoft.com/en-us/windows/uwp/maps-and-location/authentication-key
Generate new key and add it in MapControl MapServiceToken. Its work for me.

Windows Phone - link to the publisher in the app store

I have created several windows phone apps and I would like to link to my publisher's page to show all of the apps that I publish. Note that I am developing my app for Windows Phone 7.x and up using C# and XAML.
UPDATE
What I would like to do is show the following publisher page: From within Windows Phone, navigate to the Windows Phone store, then select any app, then select the "more from <Publisher>" link. This displays a nice mobile view of all of that publisher's apps. But I can't figure out how to bring up that publisher page directly from within my app. Any help would be appreciated!
Option 1) Link directly to the URL for my publishers page (using a WebBrowserTask)
Issue) All links to the store seem to require the en-US language embedded in the URL. I'm concerned about what will happen to users in other countries/languages.
Example: http:/www.windowsphone.com/en-US/store/publishers?publisherId=Microsoft%2BCorporation
Is there a language independent way to link to a publisher in the store?
Option 2) Use the MarketplaceDetailTask to link to the publisher
Issue) From what I've seen, this can only be used to link to an app. I tried using my publisher GUID and got: Marketplace Error - We're sorry, but we can't complete your request right now.
MarketplaceDetailTask marketplaceDetailTask = new MarketplaceDetailTask();
marketplaceDetailTask.ContentType = MarketplaceContentType.Applications;
marketplaceDetailTask.ContentIdentifier = <My Publisher GUID>;
marketplaceDetailTask.Show();
Option 3) Use the MarketplaceSearchTask to link to the publisher
Issue) This allows searching the store with any string. The problem is, when I put my publisher name in the search string, other apps are shown in addition to mine. My publisher name includes a common word and any app with that word shows up.
MarketplaceSearchTask searchTask = new MarketplaceSearchTask();
searchTask.ContentType = MarketplaceContentType.Applications;
searchTask.SearchTerms = "<My Publisher Name>";
searchTask.Show();
Any thoughts or suggestions would be appreciated!
Thanks.
As you're targeting WP7+, unfortunately using the zune:search URI only works on WP8 as it relies on URI Schemes, which was not backported to WP7. Based on these two posts, I tried the following on your behalf:
zune://search/?publisher=Henry%20Chong;
And a bunch of other things, but it seems that only zune://navigate is available on Windows Phone 7 and that only allows you to load a specific app. (Perhaps someone who feels like opening reflector or on the Phone teams could comment here...)
Two other things I've come across that you can look into:
1) There used to be an undocumented Zune api that you could query the marketplace against; it looks like this has been replaced by the Marketplace Edge Service, which you could try and dig around for:
http://social.msdn.microsoft.com/forums/windowsapps/en-US/f5294fcb-f4b3-4b19-9bda-f49c6a38b327/marketplace-edge-service-query
2) You could add a specific unique keyword to all your apps and use the MarketplaceSearchTask, as suggested here by Matt.
Personally, I'd go with #2 because:
you never know when the Marketplace Edge Service will change
1 is not technically supported by Microsoft
you won't have to replicate the page you're trying to display
Of course, there's also nothing stopping you from creating your own "Apps by X" page for your app and maintain it yourself manually.
Best of luck!

facebook-c#-sdk for windows phone mango 7.1, log-in fail

I have The following problem:
I use facebook-c#-sdk for windows phone 7.1(mango version), taken from here:
http://facebooksdk.codeplex.com/releases/view/76445 with the samples too,for compatibility question, I've recompiled the samples project situated inside the folder called "FacebookCSharpSDK\Samples\CS-WP7" for mango, after opening the application, I logged-in on the facebook form login and immediately after coming out a, maybe, error message.Here is the screenshot of the problem: http://img854.imageshack.us/img854/6276/wp7error.png
Thanks for the help.
Solved, i've discovered a bug about the touch device in the facebook-sdkafter the code: loginParameters["response_type"] = "code";type in a new line this code:loginParameters["display"]="wap";

Categories