zeroasterisk / MeteorRider

PhoneGap/Cordova + Meteor integration approach "DOM hijacking", telling PhoneGap where to get content from, letting Meteor hijack your PhoneGap app's HTML/CSS/JS
MIT License
183 stars 28 forks source link

navigator.geolocation.getCurrentPosition inside MeteorRider #12

Open grigio opened 10 years ago

grigio commented 10 years ago

Hi I've a test webapp which use navigator.geolocation.getCurrentPosition it works inside the browser but it doesn't work inside a "cordova app with geolocation support"

cordova plugin add org.apache.cordova.geolocation

it seems the geolocation API isn't available inside the Cordova[MeteorApp], is possible to expose it in some way?

Here is the test app http://cordova-gps-test.meteor.com

zeroasterisk commented 10 years ago

If you "expose" it in PhoneGap and get it working on a demo index.html page, without MeteorRider... then it should work when you re-enable MeteorRider.

yes?

grigio commented 10 years ago

I did what you suggest, inside the index.html the geolocation works but after loading a Meteor app that remote app doesn't inherit that feature.

Is necessary an extra MeteorRider modification to pass Cordova plugin features to the Meteor apps loaded via url?

zeroasterisk commented 10 years ago

ah... yeah... there is some funky ?plugin js? needed and dynamically loaded inside of the PhoneGap HTML... yeah? can you replicate that statically?

grigio commented 10 years ago

I don't know what you mean. If you put http://cordova-gps-test.meteor.com in a you Cordova frame with org.apache.cordova.geolocation plugin are you able to see: "device: browser the a coordinates"?

manuelpaulo commented 10 years ago

@grigio I had a similar issue: was not able to access native when running meteor on my server, but worked fine when deployed to meteor.com. I wonder....

zeroasterisk commented 10 years ago

will be fixed in issue #27