Skip to content

A Xamarin.Android Library for persistent and time based notifications. Port of

License

Notifications You must be signed in to change notification settings

wcoder/NotifyMeBinding

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

NotifyMe version

Port of NotifyMe for Xamarin.Android.


A Android Library for simple notifications. Very easily set a delay or time when you want the notification to popup. Notification will popup through system reboots.

Setup

TODO

Dependencies

Install NuGet to the target Android application project:

  • Xamarin.Android.Support.v4

The native library still uses support libraries instead of AndroidX.

Modify AndroidManifest.xml

Permission:

<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />

<application>:

    <receiver android:name="com.allyants.notifyme.NotificationPublisher" />
    <receiver android:name="com.allyants.notifyme.BootNotifyMe">
        <intent-filter>
            <action android:name="android.intent.action.BOOT_COMPLETED" />

            <category android:name="android.intent.category.HOME" />
        </intent-filter>
    </receiver>

Example

Create a NotifyMe Builder Object

var notifyMe = new NotifyMe.Builder(ApplicationContext);

Then set the fields you want.

notifyMe.Title(String title);
notifyMe.Content(String content);
notifyMe.Color(Int red,Int green,Int blue,Int alpha);//Color of notification header
notifyMe.led_color(Int red,Int green,Int blue,Int alpha);//Color of LED when notification pops up
notifyMe.Time(Calendar time);//The time to popup notification
notifyMe.Delay(Int delay);//Delay in ms
notifyMe.Large_icon(Int resource);//Icon resource by ID
notifyMe.Rrule("FREQ=MINUTELY;INTERVAL=5;COUNT=2")//RRULE for frequency of notification
notifyMe.AddAction(Intent intent,String text); //The action will call the intent when pressed

After all the fields that you want are set just call build()!

notifyMe.Build();

 


© 2020

Releases

No releases published

Languages