View Single Post
  #6 (permalink)  
Old 11-07-2009, 11:43 AM
Gorby's Avatar
Gorby
PPCGeeks Regular
Offline
Threadstarter
 
Join Date: Nov 2007
Posts: 234
Reputation: 415
Gorby is becoming a PPCGeeks regularGorby is becoming a PPCGeeks regularGorby is becoming a PPCGeeks regularGorby is becoming a PPCGeeks regularGorby is becoming a PPCGeeks regular
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Re: Questions to developers - accessing HTC sensors?

Good news! Jim (creator of the fantastic PocketShield and Volumex applications) pointed me in the right direction. The reversed engineered APIs that are already wrapped and ready to use in Visual Studio with C# examples are publicly available here:

http://sensorapi.codeplex.com/

They even have sample code there. Just download the solution, compile in VS, drop the exes and dlls on the PT2 and the samples work great! The NavSensor does not work since it is designed for the round center button that TP1 had for example; but G-sensor, light sensor, and stilus out APIs work great. I don't think there is anything for the proximity sensor or at least I couldn't find anything else.

There are more samples/discussions on xda and on http://www.basic4ppc.com/forum/index.php sites.

Cheers.

EDIT: Oh, and as one example of using a G-sensor API - this lightsaber application is hilarious and runs great on TP2!
__________________
If I helped you, I am not asking you to press any buttons to thank me. Just return a favor by helping someone too.

Last edited by Gorby; 11-07-2009 at 11:49 AM.
Reply With Quote
This post has been thanked 2 times.