InApp purchase feature Windows Store app - windows-8

I'm currently developing a Windows 8.1 application (Store app). When I submitted it for certification on the Windows Store, my application has been refused and I'm sure this is because of in-app purchase feature.
In debug mode, I've tested the in-app purchase feature thanks to the WindowsStoreProxy.xml file and everything was working well. I've also thought to modify the reference of the "currentApp" variable before submitting. (CurrentApp instead of CurrentAppSimulator).
I also referenced my items in the "Services" category onto the Windows Store dashboard.
I implemented the in-app purchase feature following this project: http://code.msdn.microsoft.com/windowsapps/Licensing-API-Sample-19712f1a
I don't have any explicit error message while my app is refused for submitting on the Windows Store. I'm feeling that when my app is tested by Microsoft, it crashes because it has not been published on the Store yet, so my items are not yet "initialized".
Here is a code sample:
var currentApp = Windows.ApplicationModel.Store.CurrentApp;
currentApp.loadListingInformationAsync().done( function (listing) {
var item1 = listing.productListings.lookup("Item1");
var item2 = listing.productListings.lookup("Item2");
var item3 = listing.productListings.lookup("Item3");
var item4 = listing.productListings.lookup("Item4");
Any idea please ?
Thanks

Related

Add new in-app purcchase item after app available in apple store in itunesconnect

I am uploading to app to apple store, But I want to add new items later , can I add new in-app purchases from itunes account when app will approved and ready for sale, I have set everything IAP from server and in code.
Yes, you can. As long as you have code to retrieve list of available IAP and show them in your app - you're fine.
One correction. The very first IAP that you create for your app you must submit along with the binary. After that when navigating to iTunes Connect you should see In-App Purchases tab in your application page:
Yes, you just have to ensure that your live app knows how to handle these purchases, i.e. if you add a new IAP to unlock a feature, your app needs to know about it before submitting.

How to open store of windows phone when clicking the button in wp8

i have developing an app in windows phone 8 visual studio 2012 and xaml
i have a requirement to open a windows store from my app button click
please tell me how to open windows phone store from my app
To open Windows Phone Store, You can use MarketplaceHubTask like this:
add namespace:
using namespace Microsoft.Phone.Tasks;
and the C# code:
MarketplaceHubTask task = new MarketplaceHubTask();
task.Show();
MarketPlaceDetailTask is documented as able to go to the current application's page in the windows phone store. If you wanted to navigate to a paricular app's page try this out.
Or else if you want to naviagate to the windows phone store use the WebBrowserTask.
MarketplaceDetailTask marketplaceDetailTask =
new MarketplaceDetailTask
{
//give the app id as your ContentIdentifier
ContentIdentifier = null,
ContentType = MarketplaceContentType.Applications
};
marketplaceDetailTask.Show();
Hope it helps :)
Try this if it works
WebBrowserTask webBrowserTask = new WebBrowserTask();
webBrowserTask.Uri = new Uri("www.windowsphone.com/store");
webBrowserTask.Show();

Office 365 JavaScript API, redirect back to WP app after launching Store

I am creating a Windows Phone app using HTML And JavaScript. I am able to add connected services and have selected "Users and Groups" and given it Read permissions.
I am then making the following calls on button click:
var authContext = new O365Auth.Context();
authContext.getIdToken("https://TestDomain.onmicrosoft.com/TestWebApi").then(
function (token){
}
);
Services/Office365/Settings.js has been edited to the following:
Settings.clientId = "xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx";
Settings.authUri = "https://login.windows.net/common/";
Settings.redirectUri = "ms-app://s-1-15-2-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx/";
I got the redirectUri value by calling the following function:
Windows.Security.Authentication.Web.WebAuthenticationBroker.getCurrentApplicationCallbackUri();
I do get the login screen for my organization and I am able to provide credentials and it tries to redirect it back to my application, but then I get asked the following question:
"You need to install an app for this task. Would you like to search for one in the Store?"
If I click on yes, it takes me to the store and says "No apps found". If I click on no, it doesn't do anything.
How could I possibly get it redirected back to my app?
The connected services experience only works in Multi-device hybrid apps (a.k.a. Cordova), not in Windows Phone apps.

Is it possible to share HTML content and images at once(same time) using share contract in c#/xaml windows 8 metro app?

i am developing a windows 8 metro app in which i am sharing the HTML content from my windows 8 Metro App.
I want to share the HTML content and images at the same time using the share contract in c#/xaml windows 8 metro app
protected override bool GetShareContent(DataRequest request)
{
bool succeeded = false;
DataPackage requestData = request.Data;
requestData.Properties.Title = TitleInputBox.Text;
requestData.Properties.Description = DescriptionInputBox.Text;
//Sharing Images
List<IStorageItem> imageItems = new List<IStorageItem>();
imageItems.Add(this.imageFile);
imageItems.Add(this.imageFile);
imageItems.Add(this.imageFile);
requestData.SetStorageItems(imageItems);
//Sharing HTML Content
requestData.Properties.Title = "A web snippet for you";
requestData.Properties.Description = "HTML selection from a WebView control";
requestData.SetHtmlFormat(HtmlFormatHelper.CreateHtmlFormat("<h1>This
is test</h1><br></br>checking it"));
return succeeded;
}
Here in the above code , if i want to trying to share html content and images at the same time.
but , by default it is taking only the first one (either images or html content which will be placed first) it is not able to share both at the same time.
i am able to share either images or html content at a time but not both ???
1) How can i share Html content and Images at the same time using share contract in windows 8 metro app ??
2)what are the various available ways in which i can share both at same time ??
Looking forward for your response
please let me know
The way sharing in Windows 8 works is that you should populate the DataPackage with all the different sorts of data that make sense for your application and what's available to you (in this case Html and Storage Items).
Windows 8 then displays to the user any application that as registered to receive for at least one of the types of data in the package. So it may be the apps shown are registering for one of the data types you'e sharing but not the other.
Also it's completely up the receiving app what to do if it receives multiple types it support. Sometimes it makes sense for the app to use both, other times it may have some sort of priority stack for it's data.
Overall you're doing all you can in sending both forms of data but in the end it's completely up to the receiving app what it does with that data.

Share Contract in Metro app

I am writing a metro app using javascript and HTML that implements the Share Contract. I want the users of my app to post data to Social networking sites like Facebook. I have configured the People app in my system, but i am not getting it(People app option) in the share pane in the charms bar. I am seeing the People app option in other apps that i have downloaded from the store.Any help in this regard would be highly appreciated.
Thanks
People app of Windows 8 Release Preview supports only Share Link.
People App of Windows 8 RTM Supports both Text & Link Sharing.
To Share Text:
request.Data.Properties.Title = "Share Text Example";
//Description is Optional
request.Data.Properties.Description = "A demonstration that shows how to share text.";
request.Data.SetText("Hello World!");
To Share link:
request.Data.Properties.Title = "Share Link Example";
//Description is Optional
request.Data.Properties.Description = "Demonstrates how to add a link (URI) to share.";
request.Data.SetUri(new Uri("http://www.google.com"));
Which apps that show up in the Share list are determined by what types of data you are sharing. Each target app informs Windows 8 what data types it is capable of accepting. Windows will only show those apps that support the data types being shared from the source application. For example, if I only share plain text on a clean install system
request.data.setText("some plain text to share");
I will only see the Mail app show up.
However, if I also share a URI, I will now see both the Mail and the People app show up.
request.data.setText("some plain text to share");
request.data.setUri(new Uri("http://slickthought.net"));
I suspect that whatever set*() calls you are making are not one of the data type's that the People app supports.