Forum Xamarin Xamarin.Android

Using information off local database to display notification information

joonjangjoonjang Member ✭✭
Hello I have a repeating notification. I would like the information displayed on the notification to be of a new element off of my local database every time it is called.

For example I would have a table in my database with 5 elements containing a unique string of titles and messages. Every time the notification is called a new index of the database is called to bring forward a new element.

First notification: First element from database
Second notification: second element from database
And so on

How do I trigger a cross platform method everytime an android notification is called? How do I keep track of what the next notification will be in the background?

Answers

  • jezhjezh Member, Xamarin Team Xamurai

    How do I keep track of what the next notification will be in the background?

    You can add a new column in your table to indicate whether the element has been notified.

    For example: a variable which type is bool:

        bool isNotified; 
    

    How do I trigger a cross platform method everytime an android notification is called?

    Does your app is a xamarin form app or a xamarin android app?

Sign In or Register to comment.