webOS Nation Forums >  Homebrew >  webOS patches > Patch BFGmaps and klicktel to support Navit for routing
Patch BFGmaps and klicktel to support Navit for routing

  Reply
 
LinkBack Thread Tools Display Modes
Old 02/12/2011, 10:57 AM   #1 (permalink)
Homebrew Developer

 
HaPe's Avatar
 
Join Date: Jun 2009
Location: Gremany, Frankfurt am Main
Posts: 520
Likes Received: 11
Thanks: 130
Thanked 182 Times in 77 Posts
Default Patch BFGmaps and klicktel to support Navit for routing

Hi all,

here are two patches for BFGmaps BFG Maps | PreCentral.net | The #1 Palm Pre and Pixi Community and klicktel klickTel | PreCentral.net | The #1 Palm Pre and Pixi Community to support Navit for routing.

Both patches add an additional entry to use Navit for routing where you normally can select google maps.

You need to have Navit and the fileMgr FileMgr Service | PreCentral.net | The #1 Palm Pre and Pixi Community service installed. You can install both from Preware.

Please post your feedback here. I will submit them to Preware if they are working for others too.

Here is the code to launch Navit for routing. For all developers how like to add Navit routing support.
Code:
 	new Mojo.Service.Request('palm://ca.canucksoftware.filemgr', {
 		method: 'write',
 		parameters: {
 			file: "/media/internal/appdata/org.webosinternals.navit/destination.txt",
 			str: 'type=former_destination label="'+ name +'"\nmg: ' + lat + " " + lng + "\n",
 			append: true
 		},
 		onSuccess: function(payload) {
 			new Mojo.Service.Request('palm://com.palm.applicationManager', {
 				method: 'open',
 				parameters: {
 					id: 'org.webosinternals.navit',
 					params: {}
 				}
 			});
 		},
 		onFailure: function(err) {
 			Mojo.Controller.errorDialog('Set destination failed');
 		}
 	});
HaPe
Attached Images
File Type: png bfgmaps_2011-13-02_104328.png (111.3 KB, 87 views) Email Attachment
File Type: png bfgmaps_2011-13-02_104608.png (70.1 KB, 71 views) Email Attachment
File Type: png klicktel_2011-13-02_121804.png (47.4 KB, 97 views) Email Attachment
Attached Files
File Type: patch BFGmaps.patch (6.1 KB, 95 views) Email Attachment
File Type: patch klicktel.patch (5.7 KB, 83 views) Email Attachment

Last edited by HaPe; 02/13/2011 at 05:21 AM.
HaPe is offline   Reply With Quote
Thanked By: chris234
Old 02/12/2011, 11:27 AM   #2 (permalink)
Member
 
MetaView's Avatar
 
Join Date: Mar 2006
Location: Berlin, Germany, Europe
Posts: 1,457
Likes Received: 50
Thanks: 85
Thanked 608 Times in 256 Posts
Default

This will not work in the appcatalog. They scan for such APIs. I had a call to filemgr inside MapTool and it was refused after they enhanced their scanner.
A legal way would a kind of echo server where you post the data to and receive an ID which you can use to download a file.
__________________
Paid Apps: UberRadio, Match This! Pro, TravelGuide, Wikay and more.
Grab ImageWorker Pro while it's on sale!
MetaView is offline   Reply With Quote
Old 02/12/2011, 01:17 PM   #3 (permalink)
Homebrew Developer

 
HaPe's Avatar
 
Join Date: Jun 2009
Location: Gremany, Frankfurt am Main
Posts: 520
Likes Received: 11
Thanks: 130
Thanked 182 Times in 77 Posts
Default

I had that idea too, but you would need to have a service somewhere. I would prefer to hand the information over to Navit without using some web-service.

That are the ideas I had:
1) use mojo startup parameter. Not possible as a PDK app can not access them
2) use mojo startup parameter an convert Navit to a Plugin in a mojo app. Currently we can not run Navit as a plugin. The screen Init API call fails. Wy? Not idea.
3) create a cookie and read that in the PDK app or the startup shell script. I did not find a way until now to access the copy
4) write the parameter to /var/log/messages by a mojo debug statement. Not possible as a jailed PDK app can not access /var/lo/messages

If someone have a good idea post it here.

HaPe
HaPe is offline   Reply With Quote
Old 02/12/2011, 02:45 PM   #4 (permalink)
Member
 
MetaView's Avatar
 
Join Date: Mar 2006
Location: Berlin, Germany, Europe
Posts: 1,457
Likes Received: 50
Thanks: 85
Thanked 608 Times in 256 Posts
Default

What about something which is in /media/internal? The external db is there, or?
__________________
Paid Apps: UberRadio, Match This! Pro, TravelGuide, Wikay and more.
Grab ImageWorker Pro while it's on sale!
MetaView is offline   Reply With Quote
Old 02/12/2011, 05:53 PM   #5 (permalink)
Homebrew Developer

 
HaPe's Avatar
 
Join Date: Jun 2009
Location: Gremany, Frankfurt am Main
Posts: 520
Likes Received: 11
Thanks: 130
Thanked 182 Times in 77 Posts
Default

Yes I can access all files from /media/internal, but how to get the data there from mojo?
Can a mojo app place something there at a special place that I can check when Navit starts?

All I found is that mojo apps can write cookies and to there one sqlite db. Are the any other options.

HaPe
HaPe is offline   Reply With Quote
Old 02/13/2011, 03:52 AM   #6 (permalink)
Homebrew Developer

 
HaPe's Avatar
 
Join Date: Jun 2009
Location: Gremany, Frankfurt am Main
Posts: 520
Likes Received: 11
Thanks: 130
Thanked 182 Times in 77 Posts
Default

Quote:
Originally Posted by PreRunr View Post
Installed using webosquickinstall for patch, Pre rebooted by itself, checked webosquickinstall for patch (it was listed), started bfgmaps went to directions, entered location and destination, got google directions but saw no button for NAVIT. Can you show a screen picture?
Ok, sorry for that. You need to find your Target by the normal search function (the magnifying glass).
Then tap on the house icon that is shown at the found position.
You will see a pop-up Menu with some entries, including the "Route with Navit" Entry.
This will work the same way in the BFGMaps favorites screen.

If you search for "hamburg hotel" you will get small icons on the screen. When you tap them you have a "Directions to" entry. If you select it you will get a Dialog asking if you want to use Navit or Google.
That one is not fully working for me as the entries seem to have no coordinate values.

HaPe.
HaPe is offline   Reply With Quote
Old 02/13/2011, 04:15 AM   #7 (permalink)
Homebrew Developer

 
PreRunr's Avatar
 
Join Date: Oct 2009
Location: Adelaide, Australia
Posts: 330
Likes Received: 6
Thanks: 26
Thanked 41 Times in 39 Posts
Default

OK it worked.
PreRunr is offline   Reply With Quote
Old 03/14/2011, 03:57 PM   #8 (permalink)
Member
 
sethron's Avatar
 
Join Date: Mar 2007
Posts: 46
Likes Received: 3
Thanks: 27
Thanked 4 Times in 3 Posts
Default

Does this actually work to 'send' a destination from BFGMaps to Navit? I have successfully installed the patch from this thread, but I am not sure how to get Navit to see the destination after selecting 'Route with Navit' from BFGmaps' home icon.
sethron is offline   Reply With Quote
Old 03/15/2011, 06:49 AM   #9 (permalink)
Homebrew Developer

 
HaPe's Avatar
 
Join Date: Jun 2009
Location: Gremany, Frankfurt am Main
Posts: 520
Likes Received: 11
Thanks: 130
Thanked 182 Times in 77 Posts
Default

Quote:
Originally Posted by sethron View Post
Does this actually work to 'send' a destination from BFGMaps to Navit? I have successfully installed the patch from this thread, but I am not sure how to get Navit to see the destination after selecting 'Route with Navit' from BFGmaps' home icon.
You only need to wait. The routing will start in Navit as soon as Navit is started from BFGmaps. It can take some time until you see the rout as navit needs to calculate it.

If you open the menu in Navit and see a button 'sto navigation' then the route is in calculation.

HaPe
HaPe is offline   Reply With Quote
Old 03/15/2011, 01:11 PM   #10 (permalink)
Member
 
sethron's Avatar
 
Join Date: Mar 2007
Posts: 46
Likes Received: 3
Thanks: 27
Thanked 4 Times in 3 Posts
Default

Quote:
Originally Posted by HaPe View Post
You only need to wait. The routing will start in Navit as soon as Navit is started from BFGmaps. It can take some time until you see the rout as navit needs to calculate it.

If you open the menu in Navit and see a button 'sto navigation' then the route is in calculation.

HaPe
Ah, yes, patience. Thank you.
sethron is offline   Reply With Quote
Old 03/23/2011, 03:12 PM   #11 (permalink)
Member
 
sethron's Avatar
 
Join Date: Mar 2007
Posts: 46
Likes Received: 3
Thanks: 27
Thanked 4 Times in 3 Posts
Default

HaPe, is there a way to add the calculated destination as a Bookmark? I am confused by the menu choices once Navit routes it. (v0.5.0.4353-1)
sethron is offline   Reply With Quote
Old 03/23/2011, 08:20 PM   #12 (permalink)
Member
 
NickVTPre's Avatar
 
Join Date: Nov 2010
Posts: 1,008
Likes Received: 9
Thanks: 149
Thanked 113 Times in 95 Posts
Default

Quote:
Originally Posted by HaPe View Post
I had that idea too, but you would need to have a service somewhere. I would prefer to hand the information over to Navit without using some web-service.

...
This looks to be possible with the new HomeBrew Gate app: http://forums.precentral.net/homebre...brew-gate.html
NickVTPre is offline   Reply With Quote
Old 03/24/2011, 02:15 AM   #13 (permalink)
Homebrew Developer

 
HaPe's Avatar
 
Join Date: Jun 2009
Location: Gremany, Frankfurt am Main
Posts: 520
Likes Received: 11
Thanks: 130
Thanked 182 Times in 77 Posts
Default

Quote:
Originally Posted by NickVTPre View Post
This looks to be possible with the new HomeBrew Gate app: http://forums.precentral.net/homebre...brew-gate.html
Hi, thanks for that info.

Currently we work into a different direction. Last weekend Noradtux was able to get Navit started a hybrid app.
This is a big step forward for many plans. One of them is that we now can add launch parameter support in Navit. So we can add the same launch parameter as GoogleMaps support.

All apps can then call Navit for routing as they now can do it with GoogleMaps. So no need for an Patches anymore.
The big target is to be able to get Navit show up in the menu of webos for your preferred routing app. If we get this working then you would even be possible to call Navit when you select an address in your contact.

Don't expect this to happen tomorrow, but that is the target direction.

HaPe
HaPe is offline   Reply With Quote
Old 09/13/2011, 12:19 PM   #14 (permalink)
Member
 
Unclevanya's Avatar
 
Join Date: Aug 2010
Location: Charlotte, NC
Posts: 1,483
Likes Received: 27
Thanks: 322
Thanked 203 Times in 168 Posts
Default

Quote:
Originally Posted by HaPe View Post
Currently we work into a different direction. Last weekend Noradtux was able to get Navit started a hybrid app.
This is a big step forward for many plans. One of them is that we now can add launch parameter support in Navit. So we can add the same launch parameter as GoogleMaps support.

All apps can then call Navit for routing as they now can do it with GoogleMaps. So no need for an Patches anymore.
The big target is to be able to get Navit show up in the menu of webos for your preferred routing app. If we get this working then you would even be possible to call Navit when you select an address in your contact.

Don't expect this to happen tomorrow, but that is the target direction.

HaPe
Any updates?
Unclevanya is offline   Reply With Quote
Old 09/13/2011, 04:24 PM   #15 (permalink)
Homebrew Developer

 
HaPe's Avatar
 
Join Date: Jun 2009
Location: Gremany, Frankfurt am Main
Posts: 520
Likes Received: 11
Thanks: 130
Thanked 182 Times in 77 Posts
Default

Quote:
Originally Posted by Unclevanya View Post
Any updates?
Yes, you can find Navit-Maps in the testing feed. It is a helper app for Navit and fulfills the tasks that we was talking about.

Later on Navit-Maps and Navit will be merged into one application.

There is a special thread in the forum for Navit-Maps.

Hape
HaPe is offline   Reply With Quote
Old 12/22/2011, 09:12 AM   #16 (permalink)
Homebrew Developer
 
SmartKidsOnTheRun's Avatar
 
Join Date: Jan 2011
Location: Alabama
Posts: 86
Likes Received: 18
Thanks: 31
Thanked 8 Times in 7 Posts
Default

This is great news. I'd like to add Navit to DataJog so that users can send directly from their desktop and launch navit.

App review from webos-blog.
__________________
DataJog - Ingeniously Moving Data From Your Desktop to ANY webOS or Android Device

ABC Trace - Teaches kids the ABC's
SmartKidsOnTheRun is offline   Reply With Quote
Old 12/22/2011, 01:54 PM   #17 (permalink)
Homebrew Developer

 
HaPe's Avatar
 
Join Date: Jun 2009
Location: Gremany, Frankfurt am Main
Posts: 520
Likes Received: 11
Thanks: 130
Thanked 182 Times in 77 Posts
Default

Quote:
This is great news. I'd like to add Navit to DataJog so that users can send directly from their desktop and launch navit.

App review from webos-blog.
your welcome. Contact me if you have any questions.

HaPe
HaPe is offline   Reply With Quote
Reply

 

Thread Tools
Display Modes



 


Content Relevant URLs by vBSEO 3.6.0