您的位置:首页 > 移动开发

windows 10 开发学习资料,Windows-universal-samples学习笔记系列一:App settings

2015-04-03 12:58 323 查看
windows 10 通用代码范例:
https://github.com/Microsoft/Windows-universal-samples
相关视频:https://mix.office.com/watch/fhm25mkkj3cw

Windows 10 Advertising SDK Walkthrough :
https://msdn.microsoft.com/library/mt125365(v=msads.100).aspx
以下就按分类说明:

App settings
App package informationApplication dataStore
App package information sample(App包相关的信息)

This sample shows you how to get package info by using the Windows Runtime packaging API (Windows.ApplicationModel.Package and Windows.ApplicationModel.PackageId).

The sample covers these key tasks:

Getting the package identity using Package.Id

Getting the package directory using Package.InstalledLocation

Getting package dependencies using Package.Dependencies

The sample covers these new tasks for Windows 10:

Getting the package description using Package.Description

Getting the package display name using Package.DisplayName

Determining whether the package is a bundle package using Package.IsBundle

Determining whether the package is installed in development mode using Package.IsDevelopmentMode

Determining whether the package is a resource package using Package.IsResourcePackage

Getting package logo using Package.Logo

Getting publisher display name of the package using Package.PublisherDisplayName

Application data sample (数据存储,可设置所有设备同步roaming或仅当前设备local)

This sample shows you how to store and retrieve data that is specific to each user and Windows Runtime app by using the Windows Runtime application data APIs (Windows.Storage.ApplicationData and so on).

Application data includes session state, user preferences, and other settings. It is created, read, updated, and deleted when the app is running. The operating system manages these data stores for your app:

local: Data that exists on the current device and is backed up in the cloud

roaming: Data that exists on all devices on which the user has installed the app

temporary: Data that could be removed by the system any time the app isn't running

localcache: Persistent data that exists only on the current device

The sample covers these key tasks:

Reading and writing settings to an app data store

Reading and writing files to an app data store

Responding to roaming events

Store sample (比如应用内购买)

This sample demonstrates how to perform in-app feature or product purchases operations and use the licensing API provided by the Windows Store to determine the license status of an app or a feature that is enabled by an in-app purchase.

The Windows Store supports the following types of in-app purchases:

Purchasing the app itself.

Purchasing a durable in-app product, meaning that after the purchase, the user owns the product until it (optionally) expires. For example, a new game level is typically a durable in-app product.

Purchasing a consumable in-app product, meaning that the user can purchase it multiple times. For example, a game power-up is typically a consumable in-app product. The act of confirming that the user received the consumable product is known as "fulfillment".

The sample app demonstrates the following tasks.

Check the current license status of an app.

Check the expiration date of an app trial period.

Check if an in-app product has been purchased through an in-app purchase.

Perform an in-app purchase to buy the app.

Perform an in-app purchase to buy an in-app product.

Check the expiration date (if any) of a product.

Confirm the fulfillment of an in-app consumable product.

Perform an in-app purchase transaction using the Windows Store commerce platform.

Perform an in-app purchase to buy an app feature or product from a large purchase catalog.

Launch the Windows Store page for the app, so users can purchase the app or write a review.

Generate a receipt that can be used to verify the successful completion of the transaction.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: