02-01-2014 12:51 AM
I am trying to use long running headless app concept for my project.
My application need to send some logs to the server even if application is forcefully closed.
My project is already develop and now I want to add headless concept in application. Do I need to modify my current project structure to implement headless application.
I got long running headless app permission from RIM. Now want to use it. But not able to understand how.
Please help me....
02-01-2014 08:21 AM
02-02-2014 01:57 PM
In my opinion, I don't think the requirement to send logs is a great use case for creating a long running headless app. While your app is running, you have the opportunity to send logs as you need to make sure at any point there is not too much to send. Then you have a few seconds (which can be extended) when your app is closed to clear the rest. Creating a headless app to detect a force close of your application and then send logs seems to be a sledgehammer to crach a nut, at least to me.
If you are concerned about this sort of thing, you need to also think about what would happen if the user pulled the battery out of the device?
Perhaps another option is to log the outstanding data to be sent, and not let the user restart your application until this is cleared.
02-03-2014 09:42 AM
Peter is correct, having a headless app does not guaruntee that the app will be running. The user can also just close them from the Device Monitor app if they like. Or uninstall.
Another option to send the logs would be to send them in an email and let the system handle the delivery.