Skip to main content
Participant
Jan 10, 2012 5:39 PM UTC
Question

Timer event when App is not active

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 is closed to new replies. Start a new post to keep the conversation going.

4 replies

ArikmAuthor
Participant
Jan 14, 2012 3:03 AM UTC

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.

Translate
ArikmAuthor
Participant
Jan 15, 2012 3:45 PM UTC

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?

Translate
ArikmAuthor
Participant
Feb 15, 2012 6:40 PM UTC

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..

Translate