Skip to main content
Participant
June 3, 2015
Question

How to create a background service to read read a XML every 5 minutes and conditionally play a alert sound like a WhatsApp ?

  • June 3, 2015
  • 1 reply
  • 363 views

How to create a background service to read read a XML every 5 minutes and conditionally play a alert sound like a WhatsApp in AS3 for Android ?

ive done all the App interface and i just want to know how to make this service to run when i use the DEACTIVE event on my App.

Can anyone help me please ?

This topic has been closed for replies.

1 reply

kglad
Community Expert
Community Expert
June 3, 2015

you want your app to execute code when it's deactivated on a mobile?

Participant
June 3, 2015

Yeah, My app is very simple ( almost )

Goal: Make a AS3 Android App that read a XML from web every 5 minutes and show the data on the Grid.

Step 1: Make the interface and objects. // Done ( Working 100% ).

Step 2: Make the Datagrid receive and refresh the Datagrid everytime that comes a NEW information from the XML. // Done ( Working 100% ).

Step 3: i Want to continue to check if its a NEW information when my app is CLOSED and if it is NEW, send me a Alert sound and a Alert icon on the phone like when i get a new Email, so i know that i have a NEW information to READ if i want, and if i want to read this information right now, i just need to open my APP already done

Well, im lost on the step 3, just dont have idea how to build this part that runs like a background service and send alerts

kglad
Community Expert
Community Expert
June 3, 2015

you can use an actionscript timer to check every 5 minutes (though that is pretty abusive of someones phone and you should probably inform the user or, even better, allow them to set the frequency), and you can use android push notification to notify the user of your change event when appropriate.