Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

Background thread / timer thread / service thread

Hello there,

I'm absolutlly new around, but have been developing an app for Android (strugling to…) and just found Appcelerator and think might help me speed up the development process & include iPhone for a fraction of the effort.

The app I want to build needs to have a thread in the background that keeps posting and pulling info from a webservice.
Depending on the response from the service, the app will wake a view thread, or just update the already running one.

I saw in the docs that there are the classic JS methods (setInterval & setTimeout), but I'm not sure that will keep running if the main view thread is stopped.

So, I have 2 questions…
1) You think Titanium & SDK for mobile could help me/has the mobile APIs the methods and objects I need?
2) Do setInterval and/or setTimeout keep ticking if the thread they were constructed from is stopped?

Thanks in advanced!

— asked October 7th 2010 by Loco Vich
  • android
  • background
  • iphone
  • mobile
  • service
  • setinterval
  • settimeout
  • webservice

2 Answers

  • Hello Dan,

    Where can I find more about background threads in 1.5?


    — answered February 4th 2011 by Vassilis Papakonstantinou
  • You'll need a service to accomplish that. We're planning on releasing service support in 1.5.

    — answered October 7th 2010 by Don Thorp
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.