• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps services and call backs

Hello,

I have a program that I wrote that detects motion via the sensors, and I am having trouble finding tutorials on how to go about this - namely sending data to and from and service.

I found some tutorials that looked promising - IF I target 1.5, as it uses AIDL, and for some reason eclipse throws errors such as :
Code:
Syntax error on token "Stub", static expected
and
Code:
Type mismatch: cannot convert from Stub to IBinder
Can anyone help?

Regards,
GIR
 
Thanks for getting back.
Im trying to teach myself about services.
I have a motion sensing block of code that needs to go into a service (so i can sample the sensors once every few seconds to save battery) and that service needs to send data back , im not fussed how, either an int value, a string or a boolean will do, and the service needs to recieve a values (sensitivy) so it can adjust the threshold value if needed.

Ive looked for almost a week now, but finding a tutorial for services with bi-directional communication or call backs for api 7 (2.1) is prooving fruitless!

I think I've made so many changes to the project that raised that issues that i need to scub it and start again.

GIR
 
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones