Create Pull Request
| Date | Scan | Status | Result |
|---|---|---|---|
| 2026-01-14 00:00 | #250 | in_progress |
Clean
|
| 2026-01-13 00:00 | #246 | completed |
Clean
|
| 2026-01-11 00:00 | #240 | completed |
Clean
|
| 2026-01-10 00:00 | #237 | completed |
Clean
|
| 2026-01-09 00:34 | #234 | completed |
Clean
|
| 2026-01-08 00:53 | #231 | completed |
Clean
|
| 2026-01-06 18:15 | #225 | cancelled |
Clean
|
| 2025-08-17 00:01 | #83 | cancelled |
Clean
|
| 2025-07-13 21:37 | #48 | completed |
Clean
|
| 2025-07-12 23:44 | #41 | cancelled |
Biased
|
using System;
using System.Threading.Tasks;
using Windows.Devices.Geolocation;
namespace NotificationHubs.Geofence.Core
{
public class LocationHelper
{
private static readonly uint AppDesiredAccuracyInMeters = 10;
public async static Task<Geoposition> GetCurrentLocation()
{
var accessStatus = await Geolocator.RequestAccessAsync();
switch (accessStatus)
{
case GeolocationAccessStatus.Allowed:
{
Geolocator geolocator = new Geolocator { DesiredAccuracyInMeters = AppDesiredAccuracyInMeters };
return await geolocator.GetGeopositionAsync();
}
default:
{
return null;
}
}
}
}
}
private async void MainPage_Loaded(object sender, RoutedEventArgs e)
{
var location = await LocationHelper.GetCurrentLocation();
if (location != null)
{
Debug.WriteLine(string.Concat(location.Coordinate.Longitude,
" ", location.Coordinate.Latitude));
}
}
private static async void Geolocator_PositionChanged(Geolocator sender, PositionChangedEventArgs args)
{
await CoreApplication.MainView.CoreWindow.Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () =>
{
Debug.WriteLine(string.Concat(args.Position.Coordinate.Longitude, " ", args.Position.Coordinate.Latitude));
});
}
if (ApiHelper.IsPointWithinBounds(longitude, latitude))
{
switch (pns.ToLower())
{
case "wns":
//// Windows 8.1 / Windows Phone 8.1
var toast = @"<toast><visual><binding template=""ToastText01""><text id=""1"">" +
"From " + user + ": " + message + "</text></binding></visual></toast>";
outcome = await Notifications.Instance.Hub.SendWindowsNativeNotificationAsync(toast, userTag);
// Windows 10 specific Action Center support
toast = @"<toast><visual><binding template=""ToastGeneric""><text id=""1"">" +
"From " + user + ": " + message + "</text></binding></visual></toast>";
outcome = await Notifications.Instance.Hub.SendWindowsNativeNotificationAsync(toast, userTag);
break;
}
}
var channel = await PushNotificationChannelManager.CreatePushNotificationChannelForApplicationAsync();
var hub = new NotificationHub("HUB_NAME", "HUB_LISTEN_CONNECTION_STRING");
var result = await hub.RegisterNativeAsync(channel.Uri);
// Displays the registration ID so you know it was successful
if (result.RegistrationId != null)
{
Debug.WriteLine("Reg successful.");
}