Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do you have any demo app using it? #1

Open
dotnetwise opened this issue Oct 9, 2014 · 17 comments
Open

Do you have any demo app using it? #1

dotnetwise opened this issue Oct 9, 2014 · 17 comments

Comments

@dotnetwise
Copy link

A live example / perhaps published in appstore / google play would be wonderful.

@zeroasterisk
Copy link
Owner

Here's an Example app:
https://github.com/zeroasterisk/meteor-cordova-geolocation-example

It's very basic atm, but proves the concept.

I don't have a "published" version yet, nor any "apps" to show.

If you would like to "extend" or "improve" my Example app, pull-requests are very welcome!

If more interest in this, I may devote more time to building out examples.

@hems
Copy link

hems commented Mar 23, 2015

@zeroasterisk when running the demo app or trying to roll my own little one, i get an error on XCode

2015-03-23 00:28:01.840 app[447:85900] ERROR whitelist rejection: url='http://localhost:3000/sockjs/info?cb=o9tkdoh24a'

Any ideas of what might be the issue?

@zeroasterisk
Copy link
Owner

that's prob a new feature of Meteor+Cordova. You've gotta allow those URLs.
http://docs.meteor.com/#/full/App-accessRule

@hems
Copy link

hems commented Mar 24, 2015

@zeroasterisk perhaps you could add instructions on the readme file then ?

@hems
Copy link

hems commented Mar 24, 2015

Sorry i'm completely new to meteor, would be something like this ?
App.accessRule( 'http://mydomain.com', { external: true } );

@zeroasterisk
Copy link
Owner

probably just:

App.accessRule( 'http://mydomain.com');

Since you want it handled locally (by meteor), not externally (by the phone/other-apps).

Please let me know how it goes... I'll update the docs if this does fix it.

Also, just to be sure you know this, the above App config goes in <app-root>/mobile-config.js

http://docs.meteor.com/#/full/mobileconfigjs

@hems
Copy link

hems commented Mar 30, 2015

@zeroasterisk funny enough i tried your example now, and it runs on my phone without any errors on xCode.

But when navigating to: https://geolocationbackgroundexample.meteor.com i just see this:

screen shot 2015-03-30 at 00 52 00

My example ( i tried implementing something from "scratch" ) still have the problem with accessing localhost, and for some weird reason i can't get through the initial page.

I'll investigate more on my side, it seems that i have some weird problems.

Does running https://github.com/zeroasterisk/meteor-cordova-geolocation-example in your iphone yields perfect results?

@jeangui
Copy link

jeangui commented Mar 30, 2015

Hello @hems,

I have got the same problem as you and I post an issue on it.

zeroasterisk/meteor-cordova-geolocation-example#3

I think this is related to the data structure that is proposed by the iphone version of the background service. The location attribute is not located at the same level.
Depending on the running context (FG, BG, IOS, Android) the data structure is different. So the meteor server has to be able to transform the data on the fly.

I have been thinking to use matb33/meteor-collection-hooks.

Regards,
@jeangui

@christocracy
Copy link

Data structure difference: I did that.

On Monday, March 30, 2015, jeangui [email protected] wrote:

Hello @hems https://github.com/hems,

I have got the same problem as you and I post an issue on it.

zeroasterisk/meteor-cordova-geolocation-example#3
zeroasterisk/meteor-cordova-geolocation-example#3

I think this is related to the data structure that is proposed by the
iphone version of the background service. The location attribute is not
located at the same level.
Depending on the running context (FG, BG, IOS, Android) the data structure
is different. So the meteor server has to be able to transform the data on
the fly.

I have been thinking to use matb33/meteor-collection-hooks.

Regards,
@jeangui https://github.com/jeangui


Reply to this email directly or view it on GitHub
#1 (comment)
.

Snet from Gmail Mobile

@jeangui
Copy link

jeangui commented Mar 30, 2015

Hello @christocracy

thanks for your feedback.
I gonna use therefore the meteor package matb33/meteor-collection-hooks.

Best regards

@jeangui

@zeroasterisk
Copy link
Owner

I'd love to see your finished/fixed example.

@hems
Copy link

hems commented Mar 30, 2015

@christocracy sorry i got a bit confused, what you mean by "i did that" ?

Did you fix this issue on your package https://github.com/christocracy/cordova-plugin-background-geolocation ? If i'm not mistaken that is the package @zeroasterisk used under the hood here?

@christocracy
Copy link

I'm responsible for the difference in data-structure from Cordova's
Geolocation plugin (ie: location.coords)

On Monday, March 30, 2015, henrique matias [email protected] wrote:

@christocracy https://github.com/christocracy sorry i got a bit
confused, what you mean by "i did that" ?

Did you fix this issue on your package
https://github.com/christocracy/cordova-plugin-background-geolocation ?
If i'm not mistaken that is the package @zeroasterisk
https://github.com/zeroasterisk used under the hood here?


Reply to this email directly or view it on GitHub
#1 (comment)
.

Snet from Gmail Mobile

@hems
Copy link

hems commented Mar 30, 2015

@christocracy and you think would be a good idea to standardize this? any tips on how to get started "fixing" our issue ?

@zeroasterisk
Copy link
Owner

If we have to translate the data FROM this plugin, I think it would have to be on the AJAX receiver on the server... which is not currently implemented as part of this plugin, only as code examples, etc...

If you can give me what JSON we are getting across all possible versions of the plugin (as examples)?

I think making a basic translation method for easy inclusion on the AJAX receiver would be a good idea, and easy.

(If I'm misunderstanding the issue, please set me straight)

@jeangui
Copy link

jeangui commented Mar 31, 2015

Hello,

I have not any time to test it but in my mind the best way will be to use the matb33/meteor-collection-hook package with the function .before.insert.
Moreover it will be nice to have a flag on the object sent to the server with the context (FG, BG, android, ios, ...). By this way it will easier to do the transformation on the fly before inserting.

Cheers
@jeangui

@zeroasterisk
Copy link
Owner

I agree - I love the "hooks" approach... but if it's a common problem, I'd like to bundle a common solution with this package, or as an optional but easy secondary package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants