Tell me more ×
Android Enthusiasts Stack Exchange is a question and answer site for enthusiasts and power users of the Android operating system. It's 100% free, no registration required.

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:

  1. BGService intercepts event "saying" that the phone is in "call position"
  2. BGService checks if the foreground app is either "Contacts" or "Messaging"
  3. If it is, BGService checks if there is any opened sms or contact
  4. 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

share|improve this question
I think this isn't possible the way you described it. However it would be possible to write a contact/SMS app that does this. – Richard Borcsik Jul 18 '12 at 19:52

closed as off topic by onik, Flow, Richard Borcsik, Al Everett, eldarerathis Aug 14 '12 at 13:47

Questions on Android Enthusiasts Stack Exchange are expected to relate to Android within the scope defined in the FAQ. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about closed questions here.

Browse other questions tagged or ask your own question.