Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-13424] Android: Created service does not retain objects

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionInvalid
Resolution Date2017-05-02T22:05:04.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsAndroid
Labelsandroid, service
ReporterPerminder Singh Bhatia
AssigneeEric Merriman
Created2012-11-16T12:26:36.000+0000
Updated2017-05-02T22:05:04.000+0000

Description

Introduction

There is a third party Android SDK which internally runs a service which invokes events to be listened by the native developer using listener methods exposed in the SDK. If a developer is using this SDK then these listeners needs to be added in a Service in the Native Application created so that if the application terminates listeners remain active and listens to the events and can notify the device owner in case event is raised. We created a module around this SDK to use it in Titanium Application.

Issue

In titanium application we created an interval service and declared listeners in the .js file of that interval service. Now the problem is that after execution of .js file by Native service created by Titanium application all the listener objects declared in the .js file are either lost or are garbage collected.As a result listeners does not get called by the third party SDK. Is there any provision in Titanium so that if an object is created in .js file of service it gets retained till the time service is running? We referred following resources on appcelerator/github site to create and use service, but our issue is not addressed by these resources: 1. http://docs.appcelerator.com/titanium/2.1/index.html#!/guide/Simple_Android_Services_in_Titanium 2. http://github.com/appcelerator/titanium_mobile/blob/master/demos/KitchenSink/Resources/examples/android_services.js 3. http://docs.appcelerator.com/titanium/2.1/index.html#!/api/Titanium.Android.Service Please help us on priority as this is affecting our product delivery.

Comments

  1. Lee Morris 2017-05-02

    Resolving ticket as Invalid as there is now a new version of Kitchen Sink available and we no longer support the version which relates to this ticket.

JSON Source