Home » Microsoft » 70-485 » Which lines of code should you use for the production app?
You need to deactivate features of the app when it runs as a trial.
Which lines of code should you use for the production app? (Each correct answer presents part of the solution. Choose all that apply.)
A. licenseInforination.LicenseChanged += new LicenseChangedEventHandler (modifyLicense)
B. license.LicenseChanged += new LicenseChangedEventHandler(implementLicense)
C. licenseInformation = CurrentApp.GetCurrentLicense()
D. licenseInforrcation = CurrentApp.Licenselnformation
E. license = CurrentApp.GetCurrentLicense()
F. licenselnformation.LicenseChanged += new LicenseChangedEventHandler (implementLicense)
Correct Answer: BD
Explanation/Reference:
B: // Register for the license state change event.
licenseInformation.addEventListener("licensechanged", reloadLicense);
D: Initialize the CurrentApp or CurrentAppSimulator to access the app’s license info.
Example:
// Get the license info licenseInformation = currentApp.licenseInformation;
* From scenario:
/ The app must provide trial functionality that will expire after 14 days. If the app expires while it is running, the app must display an expiration message to the user and prompt the user to purchase the app.