- This topic has 7 replies, 4 voices, and was last updated 11 years, 4 months ago by SKnoxmn.
-
AuthorPosts
-
SKnoxmnMemberI’d like to be able to capture the device orientation, meaning the azimuth and inclination. Not the typical landscape or portrait setting of the windows.
I have looked over the forums and I have done searches and advanced searches and it would see that I am about the only one on here that ever posted anything about capturing this data. And those posts were with regard to me asking this “How to”.
Searching for Compass, heading, navigation, azimuth, direction…. and the like.
So does anyone know how one would for example, click a button on the device and grab the azimuth and angle to the device without having to use a web app to do so….?
SKnox
BrandonMemberCheck out the phone gap docs:
http://docs.phonegap.com/en/3.0.0/cordova_accelerometer_accelerometer.md.html#Accelerometer
http://docs.phonegap.com/en/3.0.0/cordova_compass_compass.md.html#CompassThey should have the info you need.
support-michaelKeymasterSee this example mobione compass project:
http://www.genuitec.com/support-genuitec/viewtopic.php?f=14&t=6009It demonstrates simple use of the cordova/phonegap compass.watchHeading() as well as shows use of the MobiOne 2.5 Mobile Simulator with cordova api emulation.
SKnoxmnMemberI appreciate the guidance, I was getting errors like “Heading” not defined in “Start.html”. My project name is “Start”
So I have downloaded the Compass Demo and opened it in my MobiOne Design Center (v. 2.3.2(hot-fix 1, 20130425) to take a look at it.
I uploaded via the cloud so I could get a view of it on my iPhone 4s. What I get back is a black screen that reads “Heading:” on a black square sitting over a grey to white gradientscreen fade (North to South).
Question: Is there likely something I’m missing in some setting on my actual device that needs to be enabled? I’m wondering because I do have other apps on the phone that do pull all of the lat/lon/azimuth/cant/pitch/roll/yaw/angle/incline yada yada yada
What I haven’t been able to do is to get any of these functions to work on my phone when running through MobiOne. So thinking its not the software, leaves me to the phone or I’m missing something in these JS files
No images files were uploaded.
Any guidance is appreciated,
SKnox
support-michaelKeymasterSKnox
>I uploaded via the cloud so I could get a view of it on my iPhone 4s
I assume this means you used the “Publish as Mobile Web Application”?
The compass example uses the Cordova/PhoneGap compass api which only works in an app, not a webapp. You can test that app directly in the new MobiOne 2.5 milestone-1 Mobile Simulator or it must be built as an iOS or Android app and installed on a respective device to test.
SKnoxmnMember@support-wayne wrote:
SKnox
>I uploaded via the cloud so I could get a view of it on my iPhone 4s
I assume this means you used the “Publish as Mobile Web Application”?
The compass example uses the Cordova/PhoneGap compass api which only works in an app, not a webapp. You can test that app directly in the new MobiOne 2.5 milestone-1 Mobile Simulator or it must be built as an iOS or Android app and installed on a respective device to test.
Yes, updated via the cloud=publish as mobile web app.
Where can I get this new MobiOne 2.5 Milestone-1 Mobile Simulator?
and lastly, Does MobiOne only do Web applications? or will it also do iOS and Android apps?SKnox
support-octavioMemberHi SKnoxmn,
>Where can I get this new MobiOne 2.5 Milestone-1 Mobile Simulator?
See MobiOne 2.5 milestone-1 announcement: http://www.genuitec.com/support-genuitec/viewtopic.php?f=2&t=5826>and lastly, Does MobiOne only do Web applications? or will it also do iOS and Android apps?
No, you can also build native apps with Mobione. See:
Building & Distributing an iOS Application
Building & Distributing an Android Application
SKnoxmnMemberOk, so really no way to test if this will function then since the particular source will only run in the Milestone app and this wont run in the design center when created and published as a web app….
and I have a web app that will publish fine from the DC that gives me lat / lon and alt. but I can’t get those to function in the Milestone.
I’m confused which only means I’m missing something somewhere. I want to believe this can be done and tested somehow prior to spending more money with Apple and waiting out a few weeks for a build to test.
SKnox
-
AuthorPosts