title: How to create a foreground service in NativeScript
body: <p>A background service might not be working in real-time if the App turned background when Android SDK > 26 (Android OS 8.0 later), but a foreground service may work according to Ref1 &amp; Ref2(Codes in Native Java), I'm no idea how translate it in NativeScript, could somebody make it? thanks!</p>
  
  <ul>
  <li>Ref1: <a href="https://hackernoon.com/android-location-tracking-with-a-service-80940218f561" rel="nofollow noreferrer">https://hackernoon.com/android-location-tracking-with-a-service-80940218f561</a></li>
  <li>Ref2: <a href="https://bitbucket.org/tiitha/backgroundserviceexample/branches/" rel="nofollow noreferrer">https://bitbucket.org/tiitha/backgroundserviceexample/branches/</a></li>
  </ul>