Is that possible to build a background service using TypeScript?

First of all, I’m using Ionic 2 and I want to build a background service so that even user has quitted my application, I can still send notifications.

But actually I’m not really familiar with native Android in Ionic, so the problem would be:

Is that possible to call functions that are written in TypeScript by background service?

I found this https://github.com/Red-Folder/bgs-core plugin, but seems I have to write in Java and do everything in background in Java.

Emphasizing:

  1. Ionic 2
  2. Has quitted
  3. Call TypeScript functions from background service

You can always send notifications for Android, no need to run the app as background service,
Only when a user kills the app (from app manager) you aren’t able to send notifications but this is the same with any other app (tried it with WhatsApp)

No, I need to monitor bluetooth even though the app has quitted

It’s possible to send notifications according to background service.