Introduction
As some of you might know, the new Samsung Galaxy S3 have some cool motion features that can be used for making some "tasks" easier. For those who don't, here is the link for the explanation
Motivation
I want to write an background service to act as this Touchwizz-exclusive set of features
.
What its possible
According to the android documentation about sensor providers and background-services, and the useful information found at this link (provided by @Michal K), it is possible to intercept those sensor events, from a background service. Even tho it would be very battery expensive, it is still possible.
What i'm not sure it's possible
I am not sure if interacting with the foreground app (be it "Contacts", or "Messaging", or w.e) is possible using a background service or any other way.
By interacting, i mean, be able to do something like this, for instance:
- BGService intercepts event "saying" that the phone is in "call position"
- BGService checks if the foreground app is either "Contacts" or "Messaging"
- If it is, BGService checks if there is any opened sms or contact
- If there is a opened (focused) contact or sms thread, the BgService starts a call for that contact (or sender of the sms).
This is the core idea of what i am trying to achieve, is this possible or such integration between apps and events is only possible because all of them are bundled in a single framework (which is Touchwizz, in this case) ?
If it is possible, any tip is welcome.
Thanks in advance