title: Display Local Notifications In A NativeScript Application With Angular
body: <p>maybe someone knows how to display local notification only if the program is in the background, if my chat page is open then you do not need to display anything.
  This code works for me, but I need it if the chat page opens that no notification come. Someone can help? and is this behavior possible?</p>
  
  <pre><code> LocalNotifications.hasPermission().then(
          function (granted) {
              if(granted === true) {
                  LocalNotifications.schedule([{
                      id: 1,
                      title: 'Information',
                      body: 'Test',
                      badge: 1,
                      at: new Date(new Date().getTime() + (10 * 1000))
                  }]);
              } else {
                  dialogs.alert({
                      title: "Information",
                      message: "You need to give permission to notification",
                      okButtonText: "OK"
                  })
              }
          }
      );
  </code></pre>