In-app purchase is rapidly becoming the leading way to grow mobile app revenue. Now, that Windows Phone 8, developers can add it to apps and games, Microsoft details ideas to consider when using in-app purchase in an app, and also shared a how to add in-app purchase to app code.
In-app purchase gives mobile app the opportunity to sell digital content and digital services inside a phone app. "The opportunity is significant - some estimates point to over $1 billion dollars being transacted through in-app purchase in 2011," Microsoft writes.
"Not only does in-app purchase increase the possibility that your apps will make more money, in-app purchase also will save time: by using in-app purchase dev can simply unlock some functionality in apps based on customer in-app purchase, and then no longer maintain two versions of every app--a free/lite version and a paid version," Microsoft stated.
"Windows Phone 8 offers a consistent purchase experience on the phone and safe handling of personal information, both of which contribute to a confident purchase experience for the user.
Developer can add in-app purchase to a WP8 app, as well as to Windows Phone 7 code that runs on a WP8 device. "For WP7 code, you must include error handling to detect when the app is running on a Phone 7 device, and not show the in-app purchase experience (it will not be available in the phone)," explains Bernardo Zamora, on Windows Phone blog.
Windows Phone in-app purchase offers following benefits to dev and consumers:
- "easy-to-use purchase experience, available in 191 countries/regions
- Integration of purchases with the PIN-secured Windows Phone Wallet for a range of payment options including credit card, PayPal, Microsoft gift card, and Mobile Operator billing with select operators
- hardened commerce platform: server-signed receipts provide the developer with high-confidence, portable proof of purchase
- Common namespace and Interface Definition Language (IDL) between the Windows Phone Store and the Windows Store, which simplifies porting apps between platforms
- Flexible keyword support to help categorize products for sale," Bernardo informs.
To integrate in-app purchase follow the four steps listed below:
- "Understand and define the features that want to monetize.
- Add in-app purchase to app code to unlock content after a successful purchase.
- Resubmit the updated XAP in Dev Center
- Add the in-app products in Dev Center," Bernardo added.
In the video "Intro to In-app Purchase on WP8" below, Product Manager Bernardo Zamora, walkthrough the basics of In-app purchase on Windows Phone.
Windows Phone 8: In App Purchase & Developer Center:
Adding In App Purchase as a 'light up' feature to your Windows Phone 7 Games:
Here are some additional In-app resources:
- IAP in the Windows Phone official documentation
- Mock IAP Library, required for testing IAP
- Links to //build 2012 session on In-app purchase (via):
- Windows Phone in the day 1 keynote (at 1h11m21s)
- Windows Phone 8: Application Model (Andrew Clinick)
- Windows Phone 8: Native C/C++ Game Development (Sam George)
- Windows Phone 8: XAML Application Development (Shawn Oster)
- How to Leverage your Code across WP8 and Windows 8 (Andrew Byrne, Doug Rothaus)
- Windows Phone 8- In App Purchase & Developer Center (Zac Woodall, Arvind Ladha, Saral Shodhan)
- Windows Phone 8: Critical Developer Practices for Delivering Outstanding Apps (Stefan Wick)
- Windows Phone 8: Networking, Bluetooth, and NFC Proximity for Developers (Tim Laverty)
- Windows Phone 8: Making Money with Your Application on Windows Phone (Todd Brix)
- Windows Phone 8: HTML5/IE10 for Developers (Jorge Peraza, Rick Xu)
- Windows Phone 8: Maps, Location, and Background Execution for Developers (Adina Trufinescu)
- Windows Phone 8: Performance & Optimization for Developers (Oren Nachman)
- Windows Phone 8: Photo and Lens Apps (Eric Bennett)
- Windows Phone 8: Tiles, Lock Screen, and Notifications (Thomas Fennel)
- Windows Phone 8: Using C++ in your Applications (Peter Torr)
- Windows Phone 8: Using the Speech API (Avery Bishop)
- Windows Phone 8: Wallet and Deals for Developers (Matthias Baer)
- Windows Phone 8: App to App Communication (Sean McKenna)
- Windows Phone 8: Enterprise Development (Cliff Strom, Shawn Henry)
- Nokia Music Windows Phone 8 App-to-App APIs (Matthew Cooper, Steve Robbins)
Microsoft also outlines the strategy for compiling Windows Phone apps in the cloud.
In addition, to Build 2012 session, there's now more publicly available information, a new Channel 9 "Going Deep" episode digs into cloud compilation, which Microsoft is advertising as enabling "really fast startup of Windows Phone 8 .Net apps."
The way this works behind the scenes isn't via NGEN (Native Image Generator) -- "a tool for improving performance of managed applications byusing native images stored in cache rather than a just-in-time compiler. Instead, according to the Going Deep presentation, Machine Dependent Intermediate Language (MDIL) is at the core of Microsoft's compiler-in-the-cloud solution. Microsoft officials are claiming that the linking step on devices that convert MDIL assembly to a native image takes one-fifth of the time as traditional NGEN on device."
"Thus, we get some of the benefits of both pre-compilation (since we are executing off the native image where all instructions are assembly instructions) and JIT-compilation (no heavy compilation on the device during framework updates)," the video abstract read (via.
Here's how Microsoft is describing the process to Windows Phone developers:
"When you build your app in Visual Studio, the code is not compiled into a native image, but into a machine-independent Common Intermediate Language (CIL) binary file. (CIL was formerly known as Microsoft Intermediate Language, or MSIL.) This CIL file is what you submit to the Store when you're ready to sell your app. At that time, the binary file is converted from CIL to optimized Machine Dependent Intermediate Language, or MDIL. Finally, when the user downloads your app to a device, the MDIL file is linked to produce a native image. These steps are repeated in your development environment whenever you deploy your app to a Windows Phone 8 device."
"The functionality of your app is not affected by the conversion to native code. However, the native image typically starts and runs faster."
Deep Dive into the Kernel of .NET on Windows Phone 8: