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


    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 information Application data Store

     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:

    The sample covers these new tasks for Windows 10:

    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.
  • 相关阅读:
    Combine 框架,从0到1 —— 4.在 Combine 中使用计时器
    Combine 框架,从0到1 —— 4.在 Combine 中使用通知
    Combine 框架,从0到1 —— 3.使用 Subscriber 控制发布速度
    Combine 框架,从0到1 —— 2.通过 ConnectablePublisher 控制何时发布
    使用 Swift Package Manager 集成依赖库
    iOS 高效灵活地配置可复用视图组件的主题
    构建个人博客网站(基于Python Flask)
    Swift dynamic关键字
    Swift @objcMembers
    仅用递归函数操作逆序一个栈(Swift 4)
  • 原文地址:https://www.cnblogs.com/qianblue/p/4389761.html
Copyright © 2020-2023  润新知