1 / 56

BCIS 4650 Visual Programming for Business Applications

BCIS 4650 Visual Programming for Business Applications. App Package Manifest Search Share Contract. App Manifest Package. What is the App Package Manifest?. Is an XML file containing metadata about your Windows Store app, ex., App identity External capabilities required by the app

tamal
Download Presentation

BCIS 4650 Visual Programming for Business Applications

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. BCIS 4650 Visual Programming for Business Applications App Package Manifest Search Share Contract The University of North Texas, ITDS Dept., Dr. Vedder

  2. App ManifestPackage

  3. What is the App Package Manifest? • Is an XML file containing metadata about your Windows Store app, ex., • App identity • External capabilities required by the app • Created automatically by VS, but you can edit • Required and cannot be changed after app package “signed” The University of North Texas, ITDS Dept., Dr. Vedder

  4. Package.appmanifest in VS 2013 A series of tabbed forms • Application – name, description, orientation, notification settings, etc. • Visual Assets – app splash screen, tile sizes, app logo images The University of North Texas, ITDS Dept., Dr. Vedder

  5. Application Tabas opened in Manifest Designer The University of North Texas, ITDS Dept., Dr. Vedder

  6. Visual Assets Tab The University of North Texas, ITDS Dept., Dr. Vedder

  7. Package.appmanifest, 2 • Capabilities – request(s) for your app to interact with other functions; part of what the customer sees at the Store • Declarations –ID what external activities for which your app can be a contract target (task completer) The University of North Texas, ITDS Dept., Dr. Vedder

  8. Capabilities Tab The University of North Texas, ITDS Dept., Dr. Vedder

  9. Declarations Tab The University of North Texas, ITDS Dept., Dr. Vedder

  10. Package.appmanifest, 3 • Content URIs – for hosting HTML content inside the app that use JavaScript (which you allow or disallow) • Packaging – information required for display at the Windows Store The University of North Texas, ITDS Dept., Dr. Vedder

  11. Content URIs Tab The University of North Texas, ITDS Dept., Dr. Vedder

  12. Packaging Tab The University of North Texas, ITDS Dept., Dr. Vedder

  13. Search

  14. Search is Different in Win 8.1 • Win 8.1: Must use SearchBox Class (in Win 8.0, had to use Search Charm) • SearchBox looks in Windows and on the Web • Must write custom code to search within your app The University of North Texas, ITDS Dept., Dr. Vedder

  15. SearchBox Class • Similar to a TextBox in appearance • Properties include: • PlaceholderText property for instructing / requesting from user • QueryText property for what user typed • FocusOnKeyboardInput property (bool) The University of North Texas, ITDS Dept., Dr. Vedder

  16. SearchBox Class, 2 • Events include: • QueryChanged event when text changes • QuerySubmitted event when user clicks search button (must have this handler!) • SuggestionsRequested event when text changes and app must offer new suggestions: <SearchBoxSuggestionsRequested=“someeventhandler"/> privatevoidSearchBox_SuggestionsRequested(object sender, SearchBoxSuggestionsRequestedEventArgs e) The University of North Texas, ITDS Dept., Dr. Vedder

  17. SearchBoxQuerySubmitted, part 1 The University of North Texas, ITDS Dept., Dr. Vedder

  18. SearchBoxQuerySubmitted, part 2 The University of North Texas, ITDS Dept., Dr. Vedder

  19. If Needed, Add a SearchResultsPage The University of North Texas, ITDS Dept., Dr. Vedder

  20. Suggestion Support for Querieshow you code determines the query Found in the namespace Windows.ApplicationModel.Search • Search History • Query (autocomplete) • Local content • Result The University of North Texas, ITDS Dept., Dr. Vedder

  21. Search History Suggestions • Is ON as default, even across sessions (SearchHistoryEnabled=True) • SearchHistoryContext property: use if more than one SB/app to set unique ID • To remove search history • Add the namespace Windows.ApplicationModel.Search.Core • SearchSuggestionManagermanager = new SearchSuggestionManager(); manager.ClearHistory(); The University of North Texas, ITDS Dept., Dr. Vedder

  22. Autocomplete Query Suggestionsbut you must create the suggestions The University of North Texas, ITDS Dept., Dr. Vedder

  23. Autocomplete Query in Action The University of North Texas, ITDS Dept., Dr. Vedder

  24. Local Content Suggestions • Use for, ex., looking for picture or music files on local device • Invoke SearchBoxmethod SetLocalContentSuggestionSettings • Must add local file search capability to app package manifest (double-click in Solution Explorer to open) The University of North Texas, ITDS Dept., Dr. Vedder

  25. Sample Requested Capabilities The University of North Texas, ITDS Dept., Dr. Vedder

  26. Advanced Query Syntax (AQS) • Is part of MS Windows Desktop Search • Use to define better and thus narrow file searches on local devices • Set value of AqsFilter property to this • Go here for syntax details: http://msdn.microsoft.com/en-us/library/windows/apps/aa965711.aspx The University of North Texas, ITDS Dept., Dr. Vedder

  27. Music Search Sampleor , ex., could use “ext:=.mp3” as AqsFilter value publicMainPage() { this.InitializeComponent(); // Let Windows provide suggestions from local files. varsettings = newWindows.ApplicationModel.Search.LocalContentSuggestionSettings(); settings.Enabled = true; // Access to the music library requires that the Music Library capability// be declared in the app manifest .settings.Locations.Add(Windows.Storage.KnownFolders.MusicLibrary); settings.AqsFilter = "kind:Music"; MySearchBox.SetLocalContentSuggestionSettings(settings); } The University of North Texas, ITDS Dept., Dr. Vedder

  28. Result: Comment on Search OutcomeSee Nathan, Chap. 15 Request = a property of SearchBoxSuggestionsRequestedEeventArgs that can hold the collection of suggestions you want to offer Tag = unqiue ID for each ResultSuggestion The University of North Texas, ITDS Dept., Dr. Vedder

  29. Contracts;The Share Contract

  30. What are Contracts & Extensions? • Software ‘agreements’ that regulate interactions between Win Store apps or between your app and other parts of the Windows OS • Package manifest for your app must contain the needed declarations The University of North Texas, ITDS Dept., Dr. Vedder

  31. What is a Contract? • An agreement between Win apps or Win OS governing their interaction • Examples— • Sharing content • Tracking file use to ensure user sees latest version • File open / save • Media play • Windows settings The University of North Texas, ITDS Dept., Dr. Vedder

  32. What is an Extension? • An agreement between a Win app and the Windows OS • Allows developers to customize standard Windows features for use by their app and possibly other apps The University of North Texas, ITDS Dept., Dr. Vedder

  33. Sample Extensions Include… • User account picture provider • Onboard camera settings • SSL / certificate installation The University of North Texas, ITDS Dept., Dr. Vedder

  34. The Share Contract

  35. Charms Bar Pop-from-right common task bar All charms have abilities/settings that are available to Windows 8 apps

  36. The Concept of Share • People want others to appreciate what they are passionate about. • People often want content from one app in another app. • Windows 8 Share provides a lightweight, in-context experience for app to app sharing.

  37. Share Source and Target ShareSource Windows SharePane ShareTarget (Receiver)

  38. Data Formats for Shareinclude Plain text Formatted (“rich”) text Images Files Uniform Resource Identifiers (URIs) HTML Custom data formats

  39. Your App as a Share Source No entry needed in App Manifest DataPackage is the core sharing object, and can hold more than one data format at the same time Useful to provide customer with a title, description, and a visual reference if appropriate (i.e., a thumbnail) You must figure out what to share

  40. 1. Add Namespace(s) w/using… • Windows.ApplicationModel.DataTransfer • Windows.Storage – for files • Windows.Storage.Pickers – for selecting images and files • Windows.Storage.Streams – for large or custom-format data The University of North Texas, ITDS Dept., Dr. Vedder

  41. 2. Get an Instance of DataTransferManager • Instantiate a DataTransferManager object; initialize it to object associated with the active window (i.e., clicking the Share Charm) • When user requests a share, fire an OnDataRequested event The University of North Texas, ITDS Dept., Dr. Vedder

  42. 3. Add the Sharable Content • What displays in the Share Pane • The actual DataPackage, in this case mixed format data • See Brown, Nathan for details The University of North Texas, ITDS Dept., Dr. Vedder

  43. The University of North Texas, ITDS Dept., Dr. Vedder

  44. Different Outcomes Depending on Share Target The University of North Texas, ITDS Dept., Dr. Vedder

  45. Your App as a Share Target • If your app manipulates or stores data, it could be a share target • Must declare app as a share target in the app package manifest; ID what’s sharable The University of North Texas, ITDS Dept., Dr. Vedder

  46. 1. Add a Share Target ContractAdd | New Item | Windows Store The University of North Texas, ITDS Dept., Dr. Vedder

  47. 2a. What will be Sharable?nothing specified yet, so errors The University of North Texas, ITDS Dept., Dr. Vedder

  48. 2b. What will be Sharable? The University of North Texas, ITDS Dept., Dr. Vedder

  49. 3. ShareTargetPage • Code automatically generated • Displays share details to user The University of North Texas, ITDS Dept., Dr. Vedder

  50. 4. Code Auto-Added to App.xaml The University of North Texas, ITDS Dept., Dr. Vedder

More Related