I'm programming an application for the Samsung Galaxy, using **flash**. I'd like to access the **digital compass**, but I can't with Actionscript. :(

So I was wondering: Is it possible to use an **android api** that checks the digital compass and writes the data to an XML-file? This API should run in the background while the flash-application is in front. …

Do you know any API that does this? 
Or some API that could be easily modified to work this way?

I don't know much about Java-programming or programming for Android, unfortunately.

Thanks for all your hints or ideas ...
Claudia.