Restore in-app purchases - c#

I'm using Xamarin InAppBilling to do in-app purchases.
Is it possible to restore previous purchases? I have looked everywhere but can't find any information that helps.

Of course.
Xamarin allows you to wrap java jar files, and in this case you need google play store jar (this answer assumes you want to use google play store to do in-app billing from, rather than going on, say, amazons app store) and use the java api. This answer (Cannot figure out how to restore transactions on in-app purchases in Android) explains some of the Java code needed, it shouldn't be at all that difficult to write it in C# as the apis are the same.
One thing to keep in mind is that you may not be able to restore consumable/one-time purchases, such as in game currency.
Here is the official android guide on in game purchases: http://developer.android.com/google/play/billing/billing_integrate.html

Related

Is there a way to test an app before actually publishing it on Play Store?

I just finished up my game and it contains ads. Up til now I have tested my game with only test ads that are provided by Unity out of the box that are of Unity. I wanted to ask how do I publish my game on Google Play Store so that I can get the game to show real ads? Basically I wanted to test my app just for this, to see whether I get real ads upon publishing or not. Thank you.
There's a "beta testing" option, the actual options available are; internal, closed, and open test options that you can use when you upload the .apk file to the google store.
More about it here
The closed/internal one is the one you'd probably be interested in, with the closed one, you actually need to invite people who have a gmail account, so perhaps the internal testing is what you should be look at.

Microsoft Cognitive Services: Bing Speech Recognition XAML

I am trying to develop a humble AI to help the daily routines of my family.
Voice recognition is a must, and commands can not be limited to a command library.
so command library mode is out of the table
I tried dictation mode, which already has a terrible recognition with headset, wont be able to understand anything with a room mic.
So I am trying to use Microsoft Cognitive Services: Bing Speech Recognition:
I downloaded the documents and the example, I see everything is in XAML form. I don't understand why.
I am asking some guidance from those who are experienced in this, is it possible to make it in console app or windows form? (I am using .Net 4.6).
If not do you have any suggestion for me to solve my problem?
Thank you for your time and patience.
You can use NuGets to achieve the same. Find sample over here https://github.com/Azure-Samples/Cognitive-Speech-STT-Windows
Further details about BingSpeechSDK -> https://learn.microsoft.com/en-us/azure/cognitive-services/Speech/GetStarted/GetStartedCSharpDesktop
You can use the same for Console App also just need to define the input segment from MicIn.

Test Windows Store App as if I didn't purchase an IAP

I'm testing an app with an IAP. I want to test the change when purchasing the IAP, but I can't because I have already purchased it. Is there a way to "unpurchase" it? (It's a Durable, not Consumable.)
I know I can workaround such as by adding code to imitate the IAP purchase. The point is I want to verify it works, not just assume my workaround is correct.
By using CurrentAppSimulator, you can do that by simulate the purchase status and change it as you want, and your app will behave as it's not begin simulated :)
In this article, there's a full implementation and docs:
https://msdn.microsoft.com/en-us/library/windows/apps/windows.applicationmodel.store.currentappsimulator.aspx
When you test Release version in the emulator, and you have fresh deployed version of the app in it - you can purchase IAP this way. It will be done in the "emulator way" so no money required, it will be just like you would buy/cancel it in the real app.
It's just not as much convenient compared to CurrentAppSimulator because IAP state isn't preserved when you relaunch the emulator.
CurrentAppSimulator is convenient way to check different combinations of purchased IAPs, but isn't required to check if IAPs are working.
Remember to have an IAP submitted in Dev Center. Otherwise it won't work. If you have it, then it will look exactly the same way as it is in released app. The image will be there with title, description and options to purchase.

Send data from UWP app to Unity3D on the same machine

I have a universal apps getting data from Microsoft's Band 2 (accelerometer) and want to export the processed data in the app to the unity project to be used as input control. The data will be frequent, so real-time response is preferred.
What should I learn or use to achieve this?
I'm pretty sure it would be easier to write a plugin for Unity to connect to Band directly rather than to connect to an app that connects to Band (actually I have no clue how to do that).
Having that in mind, you probably should:
download the appropriate Band SDK from the official website
Read about writing plugins for Unity for the platform you need (Desktop/WP, Android, iOS)
Draw a pentagram and hope for the best

Time-based trial for an application - how to check when app was downloaded

Is there any way to access the time the app was downloaded (or first launched, etc) as this would be of great help in implementing my trial run feature on my app.
I don't remember how does it stand on the Win8 platform, but for WinPhone7.0/7.5 there's a clear warning/guideline in the official documents from Microsoft, saying:
Do not rely on usage time limited trials to protect your app’s value.
Typically, it is best to protect the value of your full mode app by limiting trial access to key code paths. A user may uninstall and retry an app without restriction so a trial design that offers full mode behavior for a limited time provides only inconvenience as a barrier to reuse.
Source: Creating trial apps for Windows Phone
The problem in time-based trials is very simple: when you uninstall the application, the Phone's operating system will erase it completely. This means, that nothing will be left, not a byte. If you write any data to isostorage, it will be purged upon deletion.
So, if you make a time-base trial and store a "installed date", then the user will simply uninstall the application and install it again, and will be happy to get next free-trial period. If it is OK for you, well, then just be aware of that.
To make a true time-trial you'd need to create some internet service that your application will register to with the phone's/user's UUID, and then the app would need to check at the service to determine whether the trial has passed or have been used up by a previous installation..
What's more, Microsoft Phone Appp guidelines state that generally you should not create an application that "turns off some of its features" at some point of time. This irritates end-users and the makes the whole phone/platform "bad" from the user's point of view, because people don't like to lose what they once had.
IIRC, at some early point of time Microsoft even advised to create two separate applications: one free and without the extra features at all, and one paid with all extra features. Later, TrialModes were included in the Market's workflow and Microsoft's App Licensing API introduced a very easy way to determine if an app works in "free trial" or "fully paid" mode, depending on whether it was downloaded from the market for free or not.
I truly don't know which one is most-recent, so let me paste three:
XNA: http://msdn.microsoft.com/en-us/library/dd282459(v=xnagamestudio.30).aspx
SL: http://msdn.microsoft.com/en-us/library/windowsphone/develop/microsoft.phone.marketplace.licenseinformation.istrial
W8: http://msdn.microsoft.com/en-us/library/windows/apps/windows.applicationmodel.store.licenseinformation.istrial
If you are trying to implement a trial function within your phone application, why not latch onto the libraries that MS provides?
MSDN Creating a trial application
MSDN Sample code for integrating a trial applicaiton
This is only available for WP7.1, WP7.1+ and WP8 (when written for WP7.1)
Microsoft recommends using the WP8 LicenseInformation class, to do
MSDN LicenseInformation class, WP8
Hope this helps!

Categories

Resources