Session 03 kho tài liệu bách khoa

33 76 0
Session 03 kho tài liệu bách khoa

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

Advanced Windows Store Apps Development – II  Explain Trial Functionality  Describe the process of In-app Purchase  Explain the process of Advertising in Windows Store apps © Aptech Ltd Generating Revenue Apps/Session When users selects free trial or try from an app, the user is allowed to use the app up to certain period, which may vary from to 30 days If the trial period ends, same user cannot use that app anymore unless the app is purchased Implementing the trial functionality for an app will help the user in marketing the app, and Microsoft Apps Store recommends it It is recommended to implement these trial functionalities in an app so that user can get a chance to evaluate the app © Aptech Ltd Generating Revenue Apps/Session 3 Time-Based Trials To set a trial-based app, the user has to set a time or date calculation mechanism in the store app The store will take care of the app when the trial period ends, so the developer need not worry about the usage of the app after trial period While submitting the app in the store the developer has to specify the trial period in days for the app as shown in figure The trial period starts when the user downloads and installs the app from the store © Aptech Ltd Generating Revenue Apps/Session Feature-Differentiated Trials When the app trial period expires, the developer can display a message to the customer regarding the expiry of the trial period or send a notification in advance The developer has to send these reminders using the time-based trial period To check whether the app is in trial license, the developer can write code as shown in following Code Snippet Code Snippet: // function to check the licenseinfo private async void fnLicenseInfo() { //license info is retrieved var l = CurrentAppSimulator.LicenseInformation; if (l.IsActive) { // check if there is any trial version, and show appropriate message © Aptech Ltd Generating Revenue Apps/Session Code Snippet (Cont.): if (l.IsTrial) { await Dispatcher.RunAsync( Windows.UI.Core.CoreDispatcherPriority.Normal,() => { txtDetail.Text = “License status: Trial license”; var r = (l.ExpirationDate - DateTime.Now).Days; txtDetail.Text += System.Environment.NewLine + String.Format(“Remaining days: {1}”, l.ExpirationDate, r); }); } else //otherwise set message to full version { await Dispatcher.RunAsync( Windows.UI.Core.CoreDispatcherPriority.Normal, () => { txtDetail.Text = “License status: Full license”; txtDetail.Text += “no expiry”; }); }} else { © Aptech Ltd Generating Revenue Apps/Session Code Snippet (Cont.): await Dispatcher.RunAsync( Windows.UI.Core.CoreDispatcherPriority.Normal, () => { txtDetail.Text = “License status: license expired Purchase the app!”; }); } } When the code is executed, the output will be as shown in the following figure © Aptech Ltd Generating Revenue Apps/Session  In-app purchase means the ability of an app to allow sale or purchase of the app with the help of devices such as a mobile, tablet, or a PC  Many times such in-app purchase is allowed within games and other useful apps that allow the users to pay online and start using all the features of the app  The user can easily purchase such an app without any trouble The apps are normally activated immediately after in-app purchases  There is no need to download and update a fresh copy of the app that is already downloaded and is running on the systems  To develop an app with in-app purchase feature, the user has to create a config file that includes all the information about the app  This can be done by adding the code shown in Code Snippet to the appropriate config file © Aptech Ltd Generating Revenue Apps/Session Code Snippet: 00000000-0000-0000-0000-000000000000 http://apps.microsoft.com/webpdp/app/00000000-0000-0000-0000-000000000000 en-US 3 LicenseTest Will check the license info 10.00 $ USD © Aptech Ltd Generating Revenue Apps/Session Code Snippet (Cont.): License App 1.00 $ USD true true 2014-06-30T09:00:00.00Z true © Aptech Ltd Generating Revenue Apps/Session 10 When the user executes the code, the advertising banner will be displayed as shown in the following figure © Aptech Ltd Generating Revenue Apps/Session 19 Licensing an App - Licensing an app in Windows Store is made easy by Microsoft Most of the functionalities are in-built in the Store apps framework Create a blank new application and add code given in following Code Snippet to MainPage.xaml Code Snippet: { txtDetail.Text = “License status: Trial license.”; var r = (l.ExpirationDate - DateTime.Now).Days; txtDetail.Text += System.Environment.NewLine + String.Format(“ Remaining days: {1}”, l.ExpirationDate, r); }); } else } await Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () => { txtDetail.Text = “License status: Full license”; txtDetail.Text += “no expiry”; }); © Aptech Ltd Generating Revenue Apps/Session 29 Code Snippet (Cont.): else { await Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () => { txtDetail.Text = “License status: license expired Purchase the app!”; }); }}}} When the user executes the app, the output will be as shown in figure © Aptech Ltd Generating Revenue Apps/Session 30 If the user clicks the ‘Purchase’ button then the output will be as shown in the following figure © Aptech Ltd Generating Revenue Apps/Session 31 User can click the ‘Details’ button to see the details of the current application When the user executes the app and clicks the Details button, the output will be as shown in the following figure © Aptech Ltd Generating Revenue Apps/Session 32 When a user selects free trial or tries an app, then the he/she is allowed to use the app up to a certain limited period, which may vary from to 30 days To set a trial-based app, the user has to set a time or date calculation in the store app Trial app can be full-featured, but can have in-app ad banners where the paid-for version does not have such in-app ad banners Such banners are completely removed from the paid version In the XAML file, the user declares and assigns some values to two main elements, namely ListingInformation and LicenseInformation The user can develop the ad, which pays the user whenever a customer clicks such ads This is known as Pay per Click To integrate ads in the store app the developer has to register with Microsoft pubCenter © Aptech Ltd Generating Revenue Apps/Session 33 ... Generating Revenue Apps /Session 15 There are standard ad sizes to implement in the app Table shows the standard ad size and its unit id © Aptech Ltd Generating Revenue Apps /Session 16 After installing... Generating Revenue Apps /Session 18 When the user executes the code, the advertising banner will be displayed as shown in the following figure © Aptech Ltd Generating Revenue Apps /Session 19 Licensing... © Aptech Ltd Generating Revenue Apps /Session 20 Create a New Folder as shown in the following figure © Aptech Ltd Generating Revenue Apps /Session 21 Under this folder, create a New Item

Ngày đăng: 08/11/2019, 18:01

Từ khóa liên quan

Tài liệu cùng người dùng

  • Đang cập nhật ...

Tài liệu liên quan