-
Notifications
You must be signed in to change notification settings - Fork 237
Add essentials content #536
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
114 commits
Select commit
Hold shift + click to select a range
e483f1a
Initial articles
Thraka d4f5d76
Update include format/path
Thraka 924e691
Merge pull request #75 from dotnet/adegeo-essentials-1
adegeo 1efa438
First two articles ported
Thraka 0065756
Feedback
Thraka f0c1c3d
Fix includes
Thraka 8b7bb30
Remove xamarin vid include & vid sections
Thraka fd0b964
Add new include 4 essentials namespace
Thraka dc8fca0
Article updates
Thraka c3f8859
Merge pull request #76 from dotnet/adegeo-essentials-1
davidbritch e90285c
Merge pull request #80 from dotnet/adegeo-essentials-2
davidbritch 85c72ff
Merge pull request #81 from dotnet/adegeo-essentials-3
davidbritch 2f95dbf
Feedback
Thraka 11916a9
Two docs; del color convert, n/a
Thraka f9a93e8
Mass find/replace on common problems
Thraka 93faa42
Replace yes/no/warn with emoji
Thraka edaf576
Merge pull request #87 from dotnet/adegeo-essentials-4
adegeo 26c4b23
Port sensor related essentials to sensor.md
adegeo d052df5
Updates to latex;intro
adegeo cf1042d
add description
adegeo 5192be2
Fix copy\paste errors+more
adegeo e6e026d
more feedback
adegeo 8048f54
Merge pull request #90 from dotnet/adegeo-essentials-sensors
davidbritch 7ade130
Fix TOC
adegeo 3810de9
Move essentials
adegeo 4f91351
Merge pull request #106 from dotnet/adegeo-essentials-a
adegeo fca778a
Another set of migrated
adegeo e3b7d68
Merge pull request #109 from dotnet/adegeo-essentials-a
davidbritch 5a53c56
Feedback from previous PR
adegeo 9109d5c
Process more articles
adegeo 793f840
Merge pull request #116 from dotnet/adegeo-essentials-a
adegeo c19ac78
Merge pull request #117 from dotnet/adegeo-essentials-b
davidbritch 5f50822
handle feedback
adegeo bad8a48
Merge pull request #119 from dotnet/adegeo-essentials-feed
adegeo 07d1b0c
More items for review
adegeo 1945426
Merge pull request #120 from dotnet/adegeo-essentials-a
davidbritch f3b6433
feedback
adegeo 3627bd5
Merge pull request #123 from dotnet/adegeo-essentials-feedback
adegeo f52e05f
Lots of updates
adegeo 6781670
More fixes
adegeo ff3fe18
Merge pull request #127 from dotnet/adegeo-essentials-a
davidbritch 18a54ed
Feedback
adegeo 2ec586c
Merge pull request #131 from dotnet/adegeo-essentials-feedback
adegeo d0efd0b
Another set
adegeo cd8a3dd
Merge pull request #144 from dotnet/adegeo-essentials-a
davidbritch 8ad448b
temp
adegeo d4b1670
temp
adegeo 9c466a0
99% finished
adegeo 0fba329
final article
adegeo 1dfad97
Merge pull request #163 from dotnet/adegeo-essentials-a
davidbritch 041514a
Handled feedback
adegeo b3c3320
Remove troubleshooting article
adegeo 13c890e
SemanticScreenReader (#177)
davidbritch f083cc7
Merge branch 'main' of github.adegeo:dotnet/docs-maui into adegeo-ess…
adegeo 62cc892
essentials restructure 1
adegeo a5c0696
Ported sensors and added code
adegeo 7918d99
minor adjustments
adegeo 940e1cb
add namespace note; under construction note
adegeo 6fb2cee
fix sensors
adegeo 1f606f0
link fixes
adegeo 4331c0d
fix essentialsindex
adegeo 3d8ba50
fix links to includes that will go away
adegeo f174701
move images
adegeo 8b7b1ed
more include bugs
adegeo f674235
move includes to shared area
adegeo 18ccff8
fix last errors hopefully!
adegeo 216cebe
add battery
adegeo c49aea1
Minor
adegeo 37cb852
more code
adegeo 3ac24b6
Add more device features
adegeo fc7fd1e
fix toc
adegeo f4f0a20
Update code
adegeo 29d76cf
updated more articles
adegeo 3bdc9ad
toc
adegeo 7278165
fix code snippet
adegeo 14ff098
fix code snippet
adegeo 64c2151
Add app info
adegeo 85b6df3
more ported articles
adegeo 32a8707
remove ref to source code
adegeo 01286f7
Comms
adegeo 0f930b7
reader
adegeo bf980fe
fixes
adegeo 756ac51
moar!!!!
adegeo 633ff2d
Toc; file rename
adegeo 09c35a3
web auth
adegeo bdf63ff
storage area
adegeo 7563717
networking
adegeo 745a288
lint
adegeo 232388c
remove old namespace
adegeo 82db011
build fixes
adegeo 21287e9
fix the snippet links
adegeo 693f302
in progress 1
adegeo 20578aa
in progress 2
adegeo 84db9da
in progress 3
adegeo a6b2955
in progress 4
adegeo 19b6b73
Update app-startup to talk about essentials
adegeo fccbbb0
in progress 5
adegeo b0156f0
more app startup updates
adegeo 5df7813
handle build errors
adegeo f4a8e56
fix link
adegeo 8dfb0e7
Merge branch 'main' of github.adegeo:dotnet/docs-maui into adegeo-ess…
adegeo e187bfa
Feedback fixes
adegeo 91f0997
secure storage update
adegeo 66af5d5
try fix build errs
adegeo 74f3027
restore file
adegeo fe02dce
redirects
adegeo 35721d3
Version tracking > geocoding.
davidbritch 995975c
Android differences update.
davidbritch 4f9b297
Update dates.
davidbritch 98fc5d9
Comment out UWP API doc links for now.
davidbritch 9967c62
Revert "redirects"
davidbritch 225c707
Restore supported platforms.
davidbritch 602f10d
Rearrange TOC.
davidbritch ddf1724
Edits.
davidbritch File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,11 @@ | ||
| log/ | ||
| bin/ | ||
| obj/ | ||
| _site/ | ||
| .optemp/ | ||
| _themes*/ | ||
| _repo.*/ | ||
| .vs/ | ||
|
|
||
| .openpublishing.buildcore.ps1 | ||
| .DS_Store |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,88 @@ | ||
| --- | ||
| title: "App actions (shortcuts)" | ||
| description: "Describes the IAppActions interface in the Microsoft.Maui.ApplicationModel namespace, which lets you create and respond to app shortcuts from the app icon." | ||
| ms.date: 05/23/2022 | ||
| no-loc: ["Microsoft.Maui", "Microsoft.Maui.ApplicationModel", "AppDelegate.cs", "AppActions", "Platforms/Android/MainActivity.cs", "Platforms/iOS/AppDelegate.cs", "Platforms/Windows/App.xaml.cs", "Id", "Title", "Subtitle", "Icon"] | ||
| --- | ||
|
|
||
| # App actions | ||
|
|
||
| This article describes how you can use the .NET Multi-platform App UI (.NET MAUI) `IAppActions` interface, which lets you create and respond to app shortcuts. App shortcuts are helpful to users because they allow you, as the app developer, to present them with extra ways of starting your app. For example, if you were developing an email and calendar app, you could present two different app actions, one to open the app directly to the current day of the calendar, and another to open to the email inbox folder. | ||
|
|
||
| [!INCLUDE [docs under construction](~/includes/preview-note.md)] | ||
|
|
||
| The `IAppActions` interface is exposed through the `AppActions.Current` property, and is available in the `Microsoft.Maui.ApplicationModel` namespace. | ||
|
|
||
| ## Get started | ||
|
|
||
| To access the `AppActions` functionality, the following platform specific setup is required. | ||
|
|
||
| <!-- markdownlint-disable MD025 --> | ||
|
|
||
| # [Android](#tab/android) | ||
|
|
||
| In the _Platforms/Android/MainActivity.cs_ file, add the following `IntentFilter` attribute to the `MainActivity` class: | ||
|
|
||
| :::code language="csharp" source="../snippets/shared_2/Platforms/Android/MainActivity.cs" id="intent_filter_1"::: | ||
|
|
||
| # [iOS](#tab/ios) | ||
|
|
||
| No setup is required. | ||
|
|
||
| # [Windows](#tab/windows) | ||
|
|
||
| No setup is required. | ||
|
|
||
| ----- | ||
|
|
||
| <!-- markdownlint-enable MD025 --> | ||
|
|
||
| ## Create actions | ||
|
|
||
| App actions can be created at any time, but are often created when an app starts. To configure app actions, add the `ConfigureEssentials` step to the `CreateMauiApp` bootstrap code. The app startup code is configured in the _MauiProgram.cs_ file. There are two methods you must call to enable an app action: | ||
|
|
||
| 01. `AddAppAction` | ||
|
|
||
| This method creates an action. It takes an `id` string to uniquely identify the action, and a `title` string that's displayed to the user. You can optionally provide a subtitle and an icon. | ||
|
|
||
| 01. `OnAppAction` | ||
|
|
||
| The delegate passed to this method is called when the user invokes an app action, provided the app action instance. Check the `Id` property of the action to determine which app action was started by the user. | ||
|
|
||
| The following code demonstrates how to configure the app actions at app startup: | ||
|
|
||
| :::code language="csharp" source="../snippets/shared_1/MauiProgram.cs" id="bootstrap_appaction" highlight="12-18"::: | ||
|
|
||
| ## Responding to actions | ||
|
|
||
| After app actions [have been configured](#create-actions), the `OnAppAction` method is called for all app actions invoked by the user. Use the `Id` property to differentiate them. The following code demonstrates handling an app action: | ||
|
|
||
| :::code language="csharp" source="../snippets/shared_1/App.xaml.cs" id="appaction_handle"::: | ||
|
|
||
| ### Check if app actions are supported | ||
|
|
||
| When you create an app action, either at app startup or while the app is being used, check to see if app actions are supported by reading the `AppActions.Current.IsSupported` property. | ||
|
|
||
| ### Create an app action outside of the startup bootstrap | ||
|
|
||
| To create app actions, call the `SetAsync` method: | ||
|
|
||
| :::code language="csharp" source="../snippets/shared_2/MainPage.xaml.cs" id="app_actions"::: | ||
|
|
||
| ### More information about app actions | ||
|
|
||
| If app actions aren't supported on the specific version of the operating system, a `FeatureNotSupportedException` will be thrown. | ||
|
|
||
| The following properties can be set on an `AppAction`: | ||
|
|
||
| - **Id**: A unique identifier used to respond to the action tap. | ||
| - **Title**: the visible title to display. | ||
| - **Subtitle**: If supported a subtitle to display under the title. | ||
| - **Icon**: Must match icons in the corresponding resources directory on each platform. | ||
|
|
||
| <!-- TODO icon in image needs update --> | ||
| :::image type="content" source="media/app-actions/appactions.png" alt-text="App actions on home screen."::: | ||
adegeo marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| ## Get actions | ||
|
|
||
| You can get the current list of app actions by calling `AppActions.Current.GetAsync()`. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,104 @@ | ||
| --- | ||
| title: "App Information" | ||
| description: "Describes the IAppInfo interface in the Microsoft.Maui.ApplicationModel namespace, which provides information about your application. For example, it exposes the app name and version." | ||
| ms.date: 05/23/2022 | ||
| no-loc: ["Microsoft.Maui", "Microsoft.Maui.ApplicationModel"] | ||
| --- | ||
|
|
||
| # App information | ||
|
|
||
| This article describes how you can use the .NET Multi-platform App UI (.NET MAUI) `IAppInfo` interface, which provides information about your application. The `IAppInfo` interface is exposed through the `AppInfo.Current` property. | ||
|
|
||
| [!INCLUDE [docs under construction](~/includes/preview-note.md)] | ||
|
|
||
| The `AppInfo` and `IAppInfo` types are available in the `Microsoft.Maui.ApplicationModel` namespace. | ||
|
|
||
| ## Read the app information | ||
|
|
||
| There are four properties exposed by the `IAppInfo` interface: | ||
|
|
||
| - `IAppInfo.Name` — The application name | ||
| - `IAppInfo.PackageName` — The package name or application identifier, such as `com.microsoft.myapp`. | ||
| - `IAppInfo.VersionString` — The application version, such as `1.0.0`. | ||
| - `IAppInfo.BuildString` — The build number of the version, such as `1000`. | ||
|
|
||
| The following code example demonstrates accessing these properties: | ||
|
|
||
| :::code language="csharp" source="../snippets/shared_1/AppModelPage.xaml.cs" id="read_info"::: | ||
|
|
||
| ## Read the current theme | ||
|
|
||
| The `RequestedTheme` property provides the current requested theme by the system for your application. One of the following values is returned: | ||
|
|
||
| - `Unspecified` | ||
| - `Light` | ||
| - `Dark` | ||
|
|
||
| `Unspecified` is returned when the operating system doesn't have a specific user interface style. An example of this is on devices running versions of iOS older than 13.0. | ||
|
|
||
| The following code example demonstrates reading the theme: | ||
|
|
||
| :::code language="csharp" source="../snippets/shared_1/AppModelPage.xaml.cs" id="read_theme"::: | ||
|
|
||
| ## Display app settings | ||
|
|
||
| The `IAppInfo` class can also display a page of settings maintained by the operating system for the application: | ||
|
|
||
| :::code language="csharp" source="../snippets/shared_1/AppModelPage.xaml.cs" id="show_settings"::: | ||
|
|
||
| This settings page allows the user to change application permissions and perform other platform-specific tasks. | ||
|
|
||
| ## Platform implementation specifics | ||
|
|
||
| This section describes platform-specific implementation details related to the `IAppInfo` interface. | ||
|
|
||
| <!-- markdownlint-disable MD025 --> | ||
|
|
||
| # [Android](#tab/android) | ||
|
|
||
| App information is taken from the _AndroidManifest.xml_ for the following fields: | ||
|
|
||
| - **Build** — `android:versionCode` in `manifest` node | ||
| - **Name** — `android:label` in the `application` node | ||
| - **PackageName** — `package` in the `manifest` node | ||
| - **VersionString** — `android:versionName` in the `application` node | ||
|
|
||
| ### Requested theme | ||
|
|
||
| Android uses configuration modes to specify the type of theme to request from the user. Based on the version of Android, it can be changed by the user or may be changed when battery saver mode is enabled. | ||
|
|
||
| You can read more on the official [Android documentation for Dark Theme](https://developer.android.com/guide/topics/ui/look-and-feel/darktheme). | ||
|
|
||
| # [iOS](#tab/ios) | ||
|
|
||
| App information is taken from the _Info.plist_ for the following fields: | ||
|
|
||
| - **Build** — `CFBundleVersion` | ||
| - **Name** — `CFBundleDisplayName` if set, else `CFBundleName` | ||
| - **PackageName** — `CFBundleIdentifier` | ||
| - **VersionString** — `CFBundleShortVersionString` | ||
|
|
||
| ### Requested theme | ||
|
|
||
| _Unspecified_ is always returned on versions of iOS older than 13.0 | ||
|
|
||
| # [Windows](#tab/windows) | ||
|
|
||
| App information is taken from the _Package.appxmanifest_ for the following fields: | ||
|
|
||
| - **Build** — Uses the `Build` from the `Version` on the `Identity` node | ||
| - **Name** — `DisplayName` on the `Properties` node | ||
| - **PackageName** — `Name` on the `Identity` node | ||
| - **VersionString** — `Version` on the `Identity` node | ||
|
|
||
| ### Requested theme | ||
|
|
||
| Code that accesses the `IAppInfo.RequestedTheme` property must be called on the UI thread or an exception will be thrown. | ||
|
|
||
| Windows applications respect the `RequestedTheme` property setting in the Windows _App.xaml_. If it's set to a specific theme, this API always returns this setting. To use the dynamic theme of the OS, remove this property from your application. When your app is run, it returns the theme set by the user in Windows settings: **Settings** > **Personalization** > **Colors** > **Choose your default app mode**. | ||
|
|
||
| <!-- TODO: You can read more on the [Windows Requested Theme Documentation](/uwp/api/windows.ui.xaml.application.requestedtheme). --> | ||
|
|
||
| -------------- | ||
|
|
||
| <!-- markdownlint-enable MD025 --> |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.