Software Archive
Read-only legacy content
17061 Discussions

Gyroscope function?

Cooper_M_
Beginner
551 Views

I'm currently trying to learn how to use gyroscope aspect of iOS. I searched for accelerometer and such - but it seems to not work currently? I used this: https://software.intel.com/en-us/xdk/article/intel-xdk-simple-accelerometer-sample - this is very recent and I haven't used it yet but is this deprecated or just not fully working yet? Because I searched through github for some samples and those are also failing in building too. 

Also the link is broken so I can't download a sample to experiment with it. Can anyone help me with this? 

0 Kudos
3 Replies
Swati_S_Intel1
Employee
551 Views

The intel.xdk accelerometer plugin has been deprecated (the one shown in the article you mentioned). Please use Cordova Accelermeter plugin instead. Try the Rolling Can Accelerometer sample app, it uses Cordova accelerometer plugin. The article associated with it, however, is old, we are in the process of updating it.

Hope this helps.

Swati

0 Kudos
Cooper_M_
Beginner
551 Views

Okay. I suspected that. I had trouble finding something that works with XDK. I will try that. Thank you. 

Edit: When trying to use Cordova plugin under hybrid mobile app settings - it says that custom cordova plugin is deprecated. And suggests that I uses https://github.com/apache/cordova-plugin-device-motion instead. How do I include this plugin? I'm not familiar with adding plugins to XDK yet. And I believe this is same link I posted in earlier comment. I'm not really sure because I'm confused. 

Thanks. 

Edit 2: I think I figured out how to use third party plugin. Not sure if I did it right. I'm experimenting as I go along. 

Edit 3: I didn't realize I could download the files from github and read the code in sample and play with the demo. This works too. Thank you! 

0 Kudos
Swati_S_Intel1
Employee
551 Views

Glad you figured things out, third-party plugin is the way to go!

0 Kudos
Reply