webOS Nation Forums >  webOS apps and software >  webOS development > GPS and open source wrapper
GPS and open source wrapper

  Reply
 
LinkBack Thread Tools Display Modes
Old 07/10/2009, 10:59 AM   #1 (permalink)
Member
 
Join Date: Jul 2009
Posts: 3
Likes Received: 0
Thanks: 3
Thanked 0 Times in 0 Posts
Default GPS and open source wrapper

Hey

I am working on a wrapper library for GPS web access.

code.google.com/p/geo-location-javascript/

I would like to add webOS to the list of supported platforms, it looks fairly easy to do that in the webOS, but i don't have access to a SDK to develop taht part. Is that somebody interested in helping.

One question I got: Can I go to a website in the browser and use javascript to get GPS access or does this have to be an application? Either case, still want it.

Best,
Stan
whoisstan is offline   Reply With Quote
Old 07/10/2009, 11:15 AM   #2 (permalink)
Legend
 
Jason Robitaille's Avatar
 
Join Date: May 2005
Location: Winnipeg, MB, Canada
Posts: 3,883
Likes Received: 496
Thanks: 801
Thanked 12,956 Times in 1,495 Posts
Default

Quote:
Originally Posted by whoisstan View Post
One question I got: Can I go to a website in the browser and use javascript to get GPS access or does this have to be an application? Either case, still want it.
Pretty sure the system calls can be done in any javascript file, not just an app's one.
Jason Robitaille is offline   Reply With Quote
Old 07/10/2009, 11:25 AM   #3 (permalink)
Member
 
sacherjj's Avatar
 
Join Date: Jun 2009
Location: Indianapolis, IN
Posts: 1,686
Likes Received: 0
Thanks: 41
Thanked 365 Times in 215 Posts
Default

Unless you are running as an App started up on the device, I don't think you will have access to the Mojo.Services.Request to call on the palm:// bus. Otherwise, this is a glaring security hole for initiating Contact entries, Setting up emails for sending, etc.
sacherjj is offline   Reply With Quote
Thanked By: whoisstan
Old 07/10/2009, 11:48 AM   #4 (permalink)
Legend
 
Jason Robitaille's Avatar
 
Join Date: May 2005
Location: Winnipeg, MB, Canada
Posts: 3,883
Likes Received: 496
Thanks: 801
Thanked 12,956 Times in 1,495 Posts
Default

Quote:
Originally Posted by sacherjj View Post
Unless you are running as an App started up on the device, I don't think you will have access to the Mojo.Services.Request to call on the palm:// bus. Otherwise, this is a glaring security hole for initiating Contact entries, Setting up emails for sending, etc.
Lol, completely forgot about that. Though wouldn't simply having
Code:
<script src="file:///usr/palm/frameworks/mojo/mojo.js" type="text/javascript" x-mojo-version="1"></script>
get around that problem?

Last edited by Jason Robitaille; 07/10/2009 at 01:16 PM.
Jason Robitaille is offline   Reply With Quote
Thanked By: whoisstan
Old 07/10/2009, 12:28 PM   #5 (permalink)
Member
 
sacherjj's Avatar
 
Join Date: Jun 2009
Location: Indianapolis, IN
Posts: 1,686
Likes Received: 0
Thanks: 41
Thanked 365 Times in 215 Posts
Default

Using a relative path like that will reference the WEB SERVER, not local storage. This is a fundamental security principle for web browsers.
sacherjj is offline   Reply With Quote
Old 07/10/2009, 12:29 PM   #6 (permalink)
Member
 
Join Date: Jul 2009
Posts: 3
Likes Received: 0
Thanks: 3
Thanked 0 Times in 0 Posts
Default

Is there a request for permission from the user when requesting the location? That way the security problem could be handled.

So I want to include that in the project, but don't know how since i can't get my hands on a Simulator and don't have a device. Where would i find Documnentation regarding that part of the API. Sorry for all those obvious questions, but i couldn't find a simulator or the API doc even with device already on the market??
whoisstan is offline   Reply With Quote
Old 07/10/2009, 01:17 PM   #7 (permalink)
Legend
 
Jason Robitaille's Avatar
 
Join Date: May 2005
Location: Winnipeg, MB, Canada
Posts: 3,883
Likes Received: 496
Thanks: 801
Thanked 12,956 Times in 1,495 Posts
Default

Quote:
Originally Posted by sacherjj View Post
Using a relative path like that will reference the WEB SERVER, not local storage. This is a fundamental security principle for web browsers.
lol, I need sleep. forgot "file://". That better?

Quote:
Originally Posted by whoisstan View Post
So I want to include that in the project, but don't know how since i can't get my hands on a Simulator and don't have a device. Where would i find Documnentation regarding that part of the API. Sorry for all those obvious questions, but i couldn't find a simulator or the API doc even with device already on the market??
Full API and documentation is not released except privately in the Early Access Program, though I'd recommend trying webOS tutorials, forums and resources for developers

Last edited by Jason Robitaille; 07/10/2009 at 01:23 PM.
Jason Robitaille is offline   Reply With Quote
Old 07/10/2009, 03:04 PM   #8 (permalink)
Member
 
sacherjj's Avatar
 
Join Date: Jun 2009
Location: Indianapolis, IN
Posts: 1,686
Likes Received: 0
Thanks: 41
Thanked 365 Times in 215 Posts
Default

Quote:
Originally Posted by Jason Robitaille View Post
lol, I need sleep. forgot "file://". That better?
Most browsers won't allow this unless you have a VERY lax security profile. Unless things have changed terribly since my last trying it a while ago.
sacherjj is offline   Reply With Quote
Old 07/10/2009, 03:06 PM   #9 (permalink)
Member
 
sacherjj's Avatar
 
Join Date: Jun 2009
Location: Indianapolis, IN
Posts: 1,686
Likes Received: 0
Thanks: 41
Thanked 365 Times in 215 Posts
Default

Quote:
Originally Posted by whoisstan View Post
Is there a request for permission from the user when requesting the location? That way the security problem could be handled.

So I want to include that in the project, but don't know how since i can't get my hands on a Simulator and don't have a device. Where would i find Documnentation regarding that part of the API. Sorry for all those obvious questions, but i couldn't find a simulator or the API doc even with device already on the market??
Do a search for the Leaked SDK. It has an emulator that allows you to load web sites. Unfortunately, you will get an error with a getCurrentPosition call. However, if you get that error, you know that you called into the right code.
sacherjj is offline   Reply With Quote
Thanked By: whoisstan
Reply

 

Tags
gps, javascript

Thread Tools
Display Modes



 


Content Relevant URLs by vBSEO 3.6.0