Is it possible to write a none ui native script app that can always live in the background? The app should be able to stop/start network access globally? Is that even allowed in android?
That was a wise question, yes it’s possible in Android so should be possible in NativeScript too. You can modify your
AndroidManifest.xml to not have any launcher which means user will not an icon in his dashboard to launch your app. Register your background service in AndroidManifest and have whatever you may want in there. You may also need a BroadCastReceiver to listen for network events and start / stop your service.
I never tried having an app without launcher, so may be @Pete.K can confirm this.