Skip to content

Commit

Permalink
documentation update
Browse files Browse the repository at this point in the history
  • Loading branch information
thudugala authored Sep 26, 2018
1 parent fa121cb commit ea12ac1
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ The local notification plugin provides a way to show local notifications from Xa

# Usage

## Send local notification
### Send local notification

```csharp
var notificationService = DependencyService.Get<ILocalNotificationService>();
Expand All @@ -30,14 +30,14 @@ var notification = new Plugin.LocalNotification.LocalNotification
notificationService.Send(notification);
```

## Cancel a local notification
### Cancel a local notification

```csharp
var notificationService = DependencyService.Get<ILocalNotificationService>();
notificationService.Cancel(100);
```

## Receive local notification tap event
### Receive local notification tap event

```csharp
public partial class App : Application
Expand All @@ -54,7 +54,7 @@ public partial class App : Application
}

private void OnLocalNotificationTapped(LocalNotificationTappedEvent e)
{
{
// your code goes here
}
}
Expand All @@ -78,7 +78,7 @@ By adding icon.png to Resources\drawable

<img src="Screenshots/AndroidNotificationIcon.png" alt="Android Notification Icon" >

##### Setup
#### Setup

To receive Local Notification tap event.
Include the following code in the OnNewIntent() method of MainActivity:
Expand All @@ -96,7 +96,7 @@ public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsAppCompa

### iOS

##### Setup
#### Setup

You must get permission from the user to allow the app to show local notifications.
Also, To receive Local Notification tap event.
Expand Down Expand Up @@ -129,4 +129,4 @@ Contributions are welcome. Feel free to file issues and pull requests on the re

## Icon

Thank you for the Icon by DinosoftLabs (https://www.iconfinder.com/dinosoftlabs)
Thank you for the Icon by DinosoftLabs (https://www.iconfinder.com/dinosoftlabs)

0 comments on commit ea12ac1

Please sign in to comment.