How to create inbuilt notification or alerts in ionic app


#1

I want to add alert message in my app,this alert message should work as soon as the condition is true,
In my case I have created a checkbook like app,so in this we have different accounts,and we have total budget of all the accounts,I had created a notify option,that asks the minimum balance the users wants,and if the user is below that then the alert message should be sent…

I tried using the push notification of phonegap–push,but that creates a notification only when the message is sent through firebase notification,can we achieved that this notification should be sent always when the condition is true…

Any suggestions to how to achieve this are welcomed…
Thanks


#2

Use Toast


#3

Thats right ,but how to create that toast only when the condition is true…i.e in my case I have added a notify section ,where I am asking users min balance,and this balances changes after transactions,so how to add the toast pop up as soon as the balance is low,

 notifyme()
  {
    if(this.notify.value.minbalance=="")
    {
      alert("Please enter the value");
    }
    else 
    {
       alert("you will be notified when your reach your minimum balance");
   
    }

#4

I think you need to do some homework before you start write your code.


#5

I did lot of search,like in java ,there is a push notification,on click of a button without firebase or any library,when the condition is true,I wanted to do same in ionic…


#6

Create an AlertHandler provider that subscribes to an Ionic Event. Whenever the condition is true, publish that event.