TrekBuddy - Outdoor companion
Bílý vrch
icon TrekBuddy
www.trekbuddy.net
Outdoor companion.
  • internal / bluetooth / simulator GPS
  • offline raster maps
  • smart GPX / raw NMEA logs
  • waypoints and simple navigation
  • custom views
  • MIDP and Symbian phones
  • Blackberry
  • Android
Visit wiki to see all features, guides and howtos. Project tracker.

Partners:    (Polish/Polski)(Polski) Compass mapy      (Polish/Polski)(Polski) Galileos mapy      (Polish/Polski)(Polski) CartoMedia      (Czech/Èesky)(Èesky) Eaglesoft trasy      (Polish/Polski)(Polski) ExpressMap     

 FAQFAQ   SearchSearch   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
Easy user content distribution
Goto page 1, 2  Next
 
Post new topic   Reply to topic    TrekBuddy Forum Index -> WishList
View previous topic :: View next topic  
Author Message
kruch
Site Admin


Joined: 02 Jul 2006
Posts: 5658

PostPosted: Sat Mar 26, 2016 12:51 pm    Post subject: Easy user content distribution Reply with quote

[Android only (for now?)]

Experimental.

http://www.trekbuddy.net/dev/2016-03-26/trekbuddy.apk

You can pack all content (maps, waypoints, customs datums, CMS, etc) into a zip file and download it to your phone (from web, from PC). In TB, go to Info, open menu and select Import command.
Import will try to open a file browser in Download folder, its location is device and Android specific (you can check where TB thinks it is in Info->Technical->Fs->downloads). If have never download anything, Download folder may not exist. When I connect Xperia as mass storage device, I can see Download folder as one of the top level folders on the disk.

TB will import all it can into its datadir folder. Some content requirest TB restart (CMS, datums, ..), some does not (maps, wpts). When target file already exist, TB will overwrite it only if it is older.

It can be used to distribute, for example, custom datums definition, CMS, maps together with waypoints... You get the idea.

Example attached. Subject to change, some meta info may need to be encoded in package filename etc. As of now, there is a hidden file at the root of the zip (.content)



TB_package_test_cms.zip
 Description:

Download
 Filename:  TB_package_test_cms.zip
 Filesize:  10.55 KB
 Downloaded:  12 Time(s)

Back to top
View user's profile Send private message
kruch
Site Admin


Joined: 02 Jul 2006
Posts: 5658

PostPosted: Sat Mar 26, 2016 12:57 pm    Post subject: Reply with quote

Next is to make TB scan for packages during start and either automatically or with user confirmation import them.

There is also no reason why not support this for non-Android phones (if there is demand) other than that there is no ZIP format support in J2ME. But solution may be to repackage to TAR or ZIP without compression (which is the real problem with ZIP, not file structure itself).
Back to top
View user's profile Send private message
boowoo



Joined: 12 Jun 2013
Posts: 537
Location: France

PostPosted: Sat Mar 26, 2016 3:06 pm    Post subject: Reply with quote

Need to be tested a bit more, but great idea and very useful for distribute Trekbuddy. Smile
Very easy for me with Samsung xCover2, to find the "download" folder ... no problem.

In the same simplification way, is it possible to use android browser to point "data dir" and "Starting map" in Menu/Settings/Base, in place tapping the access way manualy ? Wink
Back to top
View user's profile Send private message
Ranger



Joined: 12 Dec 2006
Posts: 6027

PostPosted: Sat Mar 26, 2016 3:19 pm    Post subject: Reply with quote

Can info about package content be moved to decision point - load it or not ? Smile
For testers - try to rename TrekBuddy folder to ie TrekBuddy_backup before testing. App will create new empty set when started Wink
Question is - should content of resources, ui-profiles be replaced or just added as is ?



Packages_1.jpg
 Description:
 Filesize:  25.55 KB
 Viewed:  8717 Time(s)

Packages_1.jpg


Back to top
View user's profile Send private message
kruch
Site Admin


Joined: 02 Jul 2006
Posts: 5658

PostPosted: Sat Mar 26, 2016 3:59 pm    Post subject: Reply with quote

To show package info in decision point - can be done, in fact should be done to prevent importing resolution incompatible CMS.

Replace or not, don't know. Maybe replace everything, no timestamp checking, because files can have same name and may be newer in phone, but may contain something completely different.
Back to top
View user's profile Send private message
Ranger



Joined: 12 Dec 2006
Posts: 6027

PostPosted: Sat Mar 26, 2016 4:53 pm    Post subject: Reply with quote

I think that resources & ui-profiles content should be replaced from package, cause it changes app look & feel much.
Content for gc, maps, plugins, sounds, tracks-xx, wpts just could be added mostly; for example maps or wpts content can be placed in own subfolders, etc.
Yep, it is probably possible to include content suitable for different screens in one package (resources, ui-profiles), but just in next step Smile
Back to top
View user's profile Send private message
JNT



Joined: 10 Jan 2009
Posts: 409
Location: Sweden

PostPosted: Sat Mar 26, 2016 9:15 pm    Post subject: Reply with quote

This will be very convenient, but I would like to have more control over what is overwritten. At least have the choice of saying no or yes... (none, older, all?)
Back to top
View user's profile Send private message
boowoo



Joined: 12 Jun 2013
Posts: 537
Location: France

PostPosted: Mon Mar 28, 2016 8:22 am    Post subject: Reply with quote

Seems that this function is made firstly for recent users ... Good help for first installation/configuration. Smile

It should be useful to have possibility to return back for any reason or problem after import package ...

Maybe TB could create automaticaly a folder "TrekBuddy_Backup" before overwrite the folder "TrekBuddy" with new content ?
... Easy to go back with a command "Restore Backup folder" if needed !
If "all" is OK after testing new configuration, a other command 'Delete Backup folder" could be used ...
Back to top
View user's profile Send private message
kruch
Site Admin


Joined: 02 Jul 2006
Posts: 5658

PostPosted: Mon Mar 28, 2016 6:15 pm    Post subject: Reply with quote

It's getting complicated... Twisted Evil
Back to top
View user's profile Send private message
boowoo



Joined: 12 Jun 2013
Posts: 537
Location: France

PostPosted: Mon Mar 28, 2016 7:02 pm    Post subject: Reply with quote

Problem is because recent users dont know exactly what happen when import package ...
Import package could be a good help, but also could broke precedent configuration if the package is not correctly built !
Maybe there is other ways for security ?
Back to top
View user's profile Send private message
Ranger



Joined: 12 Dec 2006
Posts: 6027

PostPosted: Mon Mar 28, 2016 11:27 pm    Post subject: Reply with quote

Indeed recent users don't know how to manage data in app now ? Smile
Below are screenshots from sample package prepared. How many steps recent user needs now to have such sample working ?
Idea is simple - just reduce user steps needed, thats all.
When new users starts with app, simply scenario is to install it, create folders, and what next ?
Any data for backup ? But now user can simply load package and try app.
As Kruch said, additional conditions, ie what to load or not etc, makes such way more complicated.
Package designer knows what should be loaded in app and just can say some words about it.
I believe longer time users knows well how to manage app data.



Package_sample_1_3.jpg
 Description:
 Filesize:  82.08 KB
 Viewed:  8548 Time(s)

Package_sample_1_3.jpg



Package_sample_1_2.jpg
 Description:
 Filesize:  102.38 KB
 Viewed:  8548 Time(s)

Package_sample_1_2.jpg



Package_sample_1_1.jpg
 Description:
 Filesize:  42.19 KB
 Viewed:  8548 Time(s)

Package_sample_1_1.jpg


Back to top
View user's profile Send private message
boowoo



Joined: 12 Jun 2013
Posts: 537
Location: France

PostPosted: Tue Mar 29, 2016 4:47 am    Post subject: Reply with quote

You're right Ranger ... with your experience !
Maybe i remember too much my beginnings not easy with TB. Wink
In all cases, this is a really interesting function for all users.
Before "import", if someone is afraid (like me ), it's always possible to rename manualy the folder TrekBuddy to get a backup folder ... Not really difficult ! Smile
Back to top
View user's profile Send private message
kruch
Site Admin


Joined: 02 Jul 2006
Posts: 5658

PostPosted: Thu Mar 31, 2016 4:20 pm    Post subject: Reply with quote

First, I will implement a simple check: import will first check if any file already exists, and when detected, user will be prompted if import should overwrite any existing files.

But it should not happen often, I think, if package vendor uses wise filenaming (and subfolders where possible).

There are ways how to improve this feature. Eg. TB could import content in a separate vendor (sub)folders:
- tracks and waypoints in subfolders are already supported (accesible)
- maps folders structure is complete arbitrary
- CMS can be only one, so TB could create a subfolder and copy files there, and then just remember which package was imported last and use CMS in that subfolder.
- the same for datums.txt (merge content of all datums.txt found)
- the rest is some non-critical stuff (custom sounds, ...?) - some strategy can be developed too
There are some questions about this approach such as if the package vendor should already provider content in subfolders, or TB should handle it etc
Back to top
View user's profile Send private message
Ranger



Joined: 12 Dec 2006
Posts: 6027

PostPosted: Wed Apr 06, 2016 4:17 pm    Post subject: Reply with quote

One more package sample Smile


Package_3_3.jpg
 Description:
 Filesize:  19.38 KB
 Viewed:  8327 Time(s)

Package_3_3.jpg



Package_3_2.jpg
 Description:
 Filesize:  90.56 KB
 Viewed:  8327 Time(s)

Package_3_2.jpg



Package_3_1.jpg
 Description:
 Filesize:  29.45 KB
 Viewed:  8327 Time(s)

Package_3_1.jpg


Back to top
View user's profile Send private message
JNT



Joined: 10 Jan 2009
Posts: 409
Location: Sweden

PostPosted: Wed Apr 06, 2016 6:04 pm    Post subject: Reply with quote

Wish I had a plane like that... Cool
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    TrekBuddy Forum Index -> WishList All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group