Skip to main content
Participant
January 10, 2012
Question

Timer event when App is not active

  • January 10, 2012
  • 4 replies
  • 1168 views

In my App I need to check my location every 15 minutes.

I create a timer for 15 minutes but it seems the complete event is not dispatched when the app runs in the background.

Does the app terminate the timer or release it after a while? Can I control it?

Thanks.

* I'm using SDK 4.6 and currently test it on Android.

On iPhone i'm not sure if it even possible solving it with timer..?

This topic has been closed for replies.

4 replies

ArikmAuthor
Participant
January 14, 2012

I'm trying to implement this first on Android using native extensions.

I wrote an extension with a service that opens a timer and notify the activity.

However, I cant get the service to start. In the logcat I get this error:

W/ActivityManager( 2695): Unable to start service Intent { act=com.arikom.android.timer.extensions.TimerService (has extras) }: not found

I guess its an issue with the manifest but I don't know how excatly to add it right. anyone has an idea?

The problem can exist in the extension manifest or only the app manifest is important?

Thanks.

ArikmAuthor
Participant
January 15, 2012

I managed to create to service, but it still don't work propery, it seems the service also go to sleep.

Inside the service I tried using android Timer and then tried with android Handler.

All the blogs I read about this (android only) claims the service should run in the background properly. I don't know if its an air problem or my native extension code.

can any me tell me if it possible with the native extension? am I missing something?

ArikmAuthor
Participant
February 15, 2012

Adobe, is this issue can be solved?

My experience with flex mobile development is a bit frustrating.

Currently, my client already rejected the iOS version of the project since the app size it too big and can be downloaded only on WiFi.

If I cant solve the timer issue on Android the project would be useless on Android also.

That would make a 2 months work wasted for nothing..