background service?
hi, would it be possible to create a background service with native script?
thx, dan
Yes same question
:+1:
I need to know the same thing, anybody? ;-)
Currently, NativeScript for Android does not support this scenario (at least we haven't tested it). However, this is technically possible and we will provide support for it.
Please use this issue: https://github.com/NativeScript/NativeScript/issues/85
There are 2 thread referencing each other ... is this ticket issues/2 the main one for commenting on background threads, or is this?: https://github.com/NativeScript/NativeScript/issues/85
As @enchev said, #85 should be used as the main one, I think.
+1 If "Native"script can not even create a simple background service, it should not be called "native".
Just to clarify for any new people coming to this issue. This is a different request than #85, 85 is to allow background processing as a new thread. This one is to create a Service which they typically run all the time. Now maybe this is dependent on #85, but they are different requests.
@NathanaelA this issue looks closed however. @slavchev would it be possible to re-open this? Or is there a general ticket covering this issue for IOS and Android? Thanks.
Is it possible that the service is in a library / jar and running the service from ns?
Currently NativeScript runtime for Android (you mentioned jar library) does not support this scenario though it is technically possible. I would suggest to keep this issue closed as there are other issues on this topic, for example https://github.com/NativeScript/NativeScript/issues/85, with active discussion.
OK, since its quite different, we must solve these 2 problems I think . notifications is quite important as responsiveness of the ux . thanks
+1 this is essential for apps that incorporate functionality like geo-fencing and event reminders. We need to be able to have a background service running.
+1 i wish if there any way to make background service with nativescript
+1 Need this for a simple app that reports the users location periodically even in the background. This requires a service for Android as best I can tell
+1 I also need this, somehow we need to report user location at all times (private app)
When does NativeScript plans to implement background services? We need to show reminders to users when they are not using the application.
@erkanarslan I think you can use local notifications for this, I haven't used it but that is my understanding.
I wondered if it's possible to create service in Android studio then call the nativescript app?