Page 1 of 1

About android devices (not a port request)

Posted: Sun Jun 15, 2014 11:14 pm
by garynunes
As stated in the subject title this is not a request to port Xxxpedia to the android (or any other) platform. As a developer myself I can well understand the desire to focus and the lack of necessary resources.

That said, I'd like to (at least) look at some Bookpedia data on an android device.

Why? Well, sad story (short form): my wife had an iPhone and used Bookpedia/Pocketpedia. The iPhone "walked away". My wife needed a phone (now, not months from now) and wanted a bigger screen (couldn't wait for the, still mythical, large iPhone 6). She now has an HTC One M8 (android phone, much bigger screen ... actually a pretty nice phone).

So, how to get Bookpedia data to display on her android phone?

What I'm trying now is to export the Bookpedia data in an HTML iPhone format. I take the resulting folder (let's call it Books) and put it onto Dropbox. If I then use my Mac computer's Safari browser and open <user>/Dropbox/Books/index.html I get a reasonably nice set of linked html files of her Bookpedia data.

However, if I try to access the above on my iPhone (which I'm using to test this stuff) the result is not so pretty. In the Dropbox App I can follow the index.html link but the resultant display does not show the book pictures nor do the other links work (touch a link and it turns red but doesn't do anything else). If I share the Books folder (in Dropbox) and try and use a shared link in the Safari App I can navigate into the Books sub-folders and see, for example, the book pictures but if I try to follow the index.html link I get almost the same behavior as in the Dropbox App (with a few extra complications).

Any advice on how to get the above to work (if possible) would be appreciated.

Another possibility would be to try and download the entire Books folder onto her android phone and see if I can browse it with an appropriate android app (I have not tested this yet and I'm not even sure whether it can be done so ... maybe later).

Still another possibility would be the one discussed in the "Gamepedia Viewer" post:
http://bruji.com/forum/viewtopic.php?f= ... oid#p23304

but, again, a bit too "techy" so not yet.


Finally, to change the subject slightly but, hopefully, remain germane:

Since you've stated elsewhere that there will never be ports to non-apple devices you might consider publishing the details of the pedia database structures thus allowing non-apple device applications to access the pedia data structures directly. Of course I'm assuming that you use some kind of standard database, e.g., SQL. Failing that you might consider documenting the XML export format (please excuse my ignorance if that's already the case) or even making the XML reading part of the pedia codebase open source so that it can be translated into a non-objective-C language (Java, for instance, is incredibly good for writing XML based applications ... and it happens to be the language of android ... how convenient).

Anyway, thanks for listening and any help will be appreciated.

Regards,
Gary Nunes

Re: About android devices (not a port request)

Posted: Mon Jun 16, 2014 8:53 am
by Conor
Thank you for the detailed explanation. Sorry to hear about the iPhone and that find my phone did not come to the rescue in this case.

For the Dropbox solution you have to set it up as a web page as that is what the original iPhone HTML export is meant to do. You can't use it a regular Dropbox file as when navigating within Dropbox it will render the HTML but will not link to images or other pages as you have found out. To have Dropbox activate the links you must put the folder "books" in the Dropbox "Public" folder. After it has synced you need to control click the "index.html" file and select the "Copy public link" option. This will be the URL that you can then bookmark on your wife's Android so that you will be visiting as a webpage and all the links will work. Mac Life has a tutorial with pictures.

A local copy of the folder when viewed through the web browser will also work and will allow your wife to not need internet access to view the books. Another option is to turn the exported HTML into a PDF with Print as PDF. You would then want to go with one of the exports that list everything on a single page. Harder to navigate, but there are several PDF viewers for Android that also include search options.

The Pedia database and all the formats it uses are open and pretty standard. The database is SQL as you guessed and the above Gamepedia Viewer links to the database file directly. Hence why it requires a server lightly more powerful than Dropbox with PHP access to manipulate this file and change it into a viewable HTML on the fly, instead of relying on the Pedia export feature. The .bookpedia is also an XML file and quite standard, specially in the Mac community as it's follows the convention of the plist (property lists format that preference files use). So much so that it's one single line of code to read and import the file and a second line to map everything one to one to the SQL.

There is no specific page with the details as both are self documenting due to the long attribute names. The SQL is a bit more complex then the XML, but most of the tables can be ignored. The important table is zentry with all the item details. The database is SQLite so for those wanting to peak at the structure "sqlite3 .schema" will do the trick. For those looking for an online listing of all the attributes it can be found here in the form of the template creation tag system.

The default database on Android is SQLite. So anyone that wants to play around with the Pedia database can copy the file Database.bookpd file over to Android and start reading it with the internal API.

Re: About android devices (not a port request)

Posted: Mon Jun 16, 2014 11:03 am
by garynunes
Conor,

Thanks very much for your reply.

I will start trying things out, probably Dropbox first (which seems the simpliest) and maybe some other stuff later, depending on results.

Regards,
Gary Nunes

Re: About android devices (not a port request)

Posted: Thu Jun 26, 2014 4:22 am
by Alex
Hi Gary,

While not exactly what you're after, we've just rolled out (in beta) a feature called Online Library for all our users, it gives you a unique link where you can see all your pedia library online and that URL is visible by anyone on any device with an internet connection.

Intructiones here: http://bruji.com/howto/online_library/

Re: About android devices (not a port request)

Posted: Fri Jun 27, 2014 10:09 pm
by garynunes
Thanks Alex. I will look into it.

Also, once I figure out what to do I'll post the results here in case it can be of help to someone else.

Regards,
Gary