title: How long are local push messages stored |ionic|cordova|angularjs|android
body: <p>I'm making a timed push notification to remind customers of their service date.
  (2 years from their purchase date)</p>
  
  <p>I made a script where users can fill in their purchase date:</p>
  
  <pre><code>&lt;input type="date" ng-model="data.userDate" ng-change="test()"&gt;
  $scope.test = function() {
            var myDate = $scope.data.userDate;
            var notify = new Date(myDate);
            notify.setYear(myDate.getFullYear()+2);
            $scope.data.notify = notify;
          };
  </code></pre>
  
  <p>And let them ask for push messages using a button:</p>
  
  <pre><code>&lt;button class="button button-full button-positive cta" ng-click="nextpage()"&gt;
  $scope.nextpage = function(){
            if ($scope.data.notify &gt; null){
              $state.go("app.notifysuccess"); 
              if ($scope.data.notify &gt; null){
                cordova.plugins.notification.local.schedule({
                  id: 10,
                  title: "Minnesma app",
                  text: "Bel ons nu voor een onderhoudsbeurt!",
                  at: $scope.data.notify,
                  icon: "http://jurjenfolkertsma.nl/icon.png",
                  data: { meetingId:"red" }
                });
              }
            }
            else {
              if($scope.data.notify == null){
                $scope.data.message = "Please vul eerst uw aankoopdatum in";
              }
              else{
                $scope.data.notify = "";
              }
            }
          }
  </code></pre>
  
  <p>It works with a delay of 1 day:</p>
  
  <p><a href="https://i.stack.imgur.com/Fgr4T.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Fgr4T.png" alt="enter image description here"></a></p>
  
  <p>But now I'm wondering... would it still be stored after 1 year? Or after 2 years? Can I use this system for this? Or should I use another system to send custom timed push messages?</p>