• Mobile
  • Extensions
  • Releases
  • GitHub
  • Blog
  • Sponsor
Show / Hide Table of Contents
  • Home
  • Quick Start
  • Setup
    • Dependency Injection
    • Startup
    • Static Instances
    • iOS
    • Android
  • Configuration Extensions
  • Jobs
    • Setup
    • Create a Job
    • Querying, Cancelling, and Adhoc
    • Frequently Asked Questions
  • Bluetooth LE Client
    • Setup
    • Scanning
    • Peripheral
    • Best Practices
    • Manged Scanning
    • Managed Peripheral
  • Bluetooth LE Hosting
    • Setup
    • GATT
    • Advertising
  • Geofencing
  • GPS
    • Setup
  • Motion Activity
  • Local Notifications
    • Getting Started
    • Channels
  • Push Notifications
    • Getting Started
    • Native
    • Azure Notification Hubs
    • Firebase Messaging
    • One Signal
  • Beacons
    • Ranging
    • Monitoring (Background)
  • HTTP Transfers
    • Getting Started
    • Advanced
  • Framework
    • Getting Started
    • ViewModel
  • Sensors
    • Getting Started
    • Accelerometer
    • Ambient Light
    • Barometer
    • Compass
    • Gyroscope
    • Humidity
    • Magnetometer
    • Pedometer
    • Proximity
    • Temperature

Title: Getting Started

Order: 1

You may ask "what does local notifications" have to do with device or background services? Well.... turns out quite a bit. You need a way of letting your users know that you've done something in the background. Maybe your job ran and determined that you need to do something OR you connected to a BLE peripheral... who knows, but you'll definitely need local notifications at some point well using Shiny

<?! PackageInfo "Shiny.Notifications" /?>

iOS Specifics

There isn't anything specific to setting up local notifications on iOS. However, iOS has one specific rule - While the application is running in the FOREGROUND, notifications will not be displayed. You are responsible for notifying your users of actions happening while your app is running.

Android Specifics

Android has many different customization points - please review the Android Specifics Documentation

Notifications

First rule, as with any Shiny service. Run RequestAccess

var result = await ShinyHost.Resolve<INotificationManager>().RequestAccess();
if (result == PermissionState.Available) {
    // ... do something
}

Send a Notification

Scheduling a Notification

Getting A List of Pending Notifications

Cancelling Individual or All Pending Notifications

Notification Responses

using System.Threading.Tasks;
using Shiny.Notifications;

public class NotificationDelegate : INotificationDelegate
{
    public async Task OnEntry(NotificationResponse response)
    {
    }
}
  • Improve this Doc
In This Article
Back to top Generated by DocFX