-
Notifications
You must be signed in to change notification settings - Fork 750
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
122 changed files
with
1,691 additions
and
1,770 deletions.
There are no files selected for viewing
This file contains 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 was deleted.
Oops, something went wrong.
This file contains 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,22 @@ | ||
name: Success Story | ||
description: If you are using Uno in production, we would love to hear about it | ||
labels: [kind/consumer-experience, kind/documentation, triage/untriaged] | ||
body: | ||
- type: markdown | ||
attributes: | ||
value: | | ||
**STOP ⛔ -- PLEASE READ!** | ||
We 💖 to hear about how, where and what you're doing with Uno. Sharing this information is one of the kindest things you can do in open-source and the maintainers love hearing about success stories. Instead of raising a new GitHub issue could you please comment in the existing thread? | ||
[Uno in Production](https://github.com/unoplatform/uno/discussions/5012) | ||
If you're feeling extra generous, how about writing a blog post and then letting us know about it? That way, we can retweet it. | ||
Thank you! | ||
- type: textarea | ||
id: success-story-text | ||
attributes: | ||
label: What is your success story? | ||
description: If you still want to use GitHub Issues for sharing your Success story, you can do so bellow |
This file contains 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,24 @@ | ||
name: Support Request | ||
description: Support request or question relating to Uno | ||
labels: [triage/support] | ||
body: | ||
- type: markdown | ||
attributes: | ||
value: | | ||
**STOP ⛔ -- PLEASE READ!** | ||
GitHub is not the right place for support requests. | ||
If you're looking for help, check [Stack Overflow](https://stackoverflow.com/questions/tagged/uno-platform) and the [documentation](https://platform.uno/docs/). | ||
You can also post your question in [GitHub discussions](https://github.com/unoplatform/uno/discussions) or [on Twitter using the #unoplatform](https://twitter.com/search?q=%23unoplatform) hashtag. | ||
For organizations that want a deeper level of support beyond our community support, please [contact us](https://platform.uno/contact/). Our professional support is more than a contract – it is a shared responsibility for your project success. Our engineering team will collaborate with you to ensure the success of your projects, and our custom application development team at nventive is also available to lend its expertise. | ||
If the matter is security related, please disclose it privately via https://github.com/unoplatform/uno/security/ | ||
- type: textarea | ||
id: support-request-text | ||
attributes: | ||
label: What do you need help with? | ||
description: If you still want to use GitHub Issues for Support request, you can do so bellow |
This file was deleted.
Oops, something went wrong.
This file contains 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 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 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 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 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,60 @@ | ||
--- | ||
uid: Uno.Features.Compass | ||
--- | ||
|
||
# Compass | ||
|
||
> [!TIP] | ||
> This article covers Uno-specific information for `Compass`. For a full description of the feature and instructions on using it, consult the UWP documentation: https://docs.microsoft.com/en-us/uwp/api/windows.devices.sensors.Compass | ||
* The `Windows.Devices.Sensors.Compass` class returns a heading with respect to Magnetic North and, possibly, True North. | ||
|
||
## Supported features | ||
|
||
| Feature | Windows | Android | iOS | Web (WASM) | macOS | Linux (Skia) | Win 7 (Skia) | | ||
|---------------|-------|-------|-------|-------|-------|-------|-| | ||
| `GetDefault` | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | | ||
| `ReadingChanged` | ✔ | ✔ | ✔ | ✖ | ✖ | ✖ | ✖ | | ||
| `ReportInterval` | ✔ | ✔ | ✖ | ✖ | ✖ | ✖ | ✖ | | ||
|
||
## Using Compass with Uno | ||
|
||
* The `GetDefault` method is available on all targets and will return `null` on those which do not support `Compass` or devices that do not have such a sensor. | ||
* Ensure to unsubscribe from the `ReadingChanged` event when you no longer need the readings, so that the sensor is no longer active to avoid unnecessary battery consumption. | ||
|
||
## Platform-specific | ||
|
||
### Android | ||
|
||
If you are planning to use the `HeadingTrueNorth`, your app must declare `android.permission.ACCESS_FINE_LOCATION` permission, otherwise the value will return `null`: | ||
|
||
```csharp | ||
[assembly: UsesPermission("android.permission.ACCESS_FINE_LOCATION")] | ||
``` | ||
|
||
## Example | ||
|
||
### Capturing sensor readings | ||
|
||
```csharp | ||
var compass = Compass.GetDefault(); | ||
compass.ReadingChanged += Compass_ReadingChanged; | ||
|
||
private async void Compass_ReadingChanged(Compass sender, CompassReadingChangedEventArgs args) | ||
{ | ||
// If you want to update the UI in some way, ensure the Dispatcher is used, | ||
// as the ReadingChanged event handler does not run on the UI thread. | ||
await Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () => | ||
{ | ||
OutputTextBlock.Text = $"HeadingMagneticNorth in degrees = {args.Reading.HeadingMagneticNorth}, " + | ||
$"HeadingTrueNorth in degrees = {args.Reading.HeadingTrueNorth}, " | ||
$"timestamp = {args.Reading.Timestamp}"; | ||
}); | ||
} | ||
``` | ||
|
||
### Unsubscribing from the readings | ||
|
||
```csharp | ||
Compass.ReadingChanged -= Compass_ReadingChanged; | ||
``` |
This file contains 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 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
Oops, something went wrong.