开发者

Phone slope Android

开发者 https://www.devze.com 2023-01-17 23:39 出处:网络
I want to write game for Android and I need to use inside AI phone slope in some way ( in degree or any other measure). Can anybody tell me how to 开发者_开发百科do that(link or code sample) ?Did you

I want to write game for Android and I need to use inside AI phone slope in some way ( in degree or any other measure). Can anybody tell me how to 开发者_开发百科do that(link or code sample) ?


Did you mean to use phone's movement sensors (ie. accelerator, orientation)? APIDemos from Android SDK are always a good start:

http://developer.android.com/resources/samples/ApiDemos/index.html

Code example on how to use phone's sensor:

http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/os/Sensors.html

0

精彩评论

暂无评论...
验证码 换一张
取 消