yashsingh1/xdaforums huggingface dataset:
[Nook Color Themes and Apps] Delvorak:
I'm currently working on adding support to FBSync to use only Dropbox for all of the data. This will give you all the option to sync without being dependent on my server.

I'm also trying to get FBSync to work as a plugin for FBReader with the goal of automatically syncing the book positions as you close a book or fbreader. I'm not certain yet if this is going to be possible with the existing FBReader API, but if it is, I'll do it.

I hope to have an update available within the week.

Thanks,

Scott Adkins
[Nook Color Themes and Apps] sensboston:
It's such a great news, Scott, thanks a lot! Plugin - is what we really need.

I believe, current FBReaderJ API (https://github.com/geometer/FBReaderJ/blob/master/src/org/geometerplus/android/fbreader/api) has everything you need (not 100% sure 'cause I can't find book loading/opening/closing events but it should be tested). BTW, app is under intense development and (probably, he has a little strange attitude) FBReader author will help you by extending API.

Good luck!
[Nook Color Themes and Apps] Delvorak:
I have finished adding the ability to sync book positions to Dropbox, and I have added an "Automatic Sync" feature that uses the FBReader API to plug-in and get notifications when you start or finish reading a book (The automatic sync currently does not support the dropbox syncing, there are some problems I need to work out).

However, both of these features are rather raw, and I'd like to get some testers for them before I release it on the market. I'd also welcome input from said testers on how I'm handling the automatic syncs..

Any takers? PM or email me (adkins software design at gmail dot com) to get the APK.

Thanks,

Scott
[Nook Color Themes and Apps] Delvorak:
Also, I reworked the program so that I should be able to easily make it support multiple languages. I have someone currently working on translating it to Russian.

If anyone out there is capable of translating english into any other languages that they would like FBSync to support, please PM or email me (adkins software design at gmail dot com).

Thanks,

Scott
[Nook Color Themes and Apps] wanderfowl:
This is absolutely wonderful software, and I can't wait for the update. I've just emailed you with my contact information.
[Nook Color Themes and Apps] jhoward15:
1.0.23 beta results

So, I downloaded the latest beta today to test the automatic sync. On my ICS devices (2 Transformer Primes), the sync works great. I tested saving the position on exit as well as devices standby then opened on the other prime. Both cases worked.

Now on my CM7 Gingerbread Nook Color, things didn't work so well. Positions set on the ICS tablets sync to the Nook properly. But changes to the Nook did not get sent elsewhere (the sync did run). In fact, Fbreader on the Nook kept on going back to the positions sent from the ICS tablets no matter what - even if I changed the page on the Nook. Specifically, I would change the page on the Nook, return home on the launcher to make sure the sync ran, then when I opened fbreader again, it would go back to the original page. Strange.

In your sync app, I do see multiple entries for each book for some reason. For this particular book, there were 3. One would be different after I close fbreader, but it looks like it uses one of the other records when I open it back up. Eventually they all end up matching, but they always revert back to the earlier page number. I even tried a different account in your sync app, one that only exists on the Nook. Same issue.

I did notice that if I did a manual sync in your app in between the close and the open, the issue did not happen. In fact, if I simply force close fbreader in between close and open, everything works ok. Maybe the issue only happens if the open happens when the task is already running. Again, this only happens on my gingerbread nook. The ICS machines are finedoing the same sequence.

Anything I can do to help debug?
[Nook Color Themes and Apps] Delvorak:
Unfortunately as I tried to implement the plug in to FBReader, I found that the API was sorely lacking in information that I need to perform the syncs reliably. I"ve pretty much given up on getting it to work correctly.

One of the big problems is that I can only get the book's filename, but not it's path. This is causing your problem.

This is one reason why I never released this version on the Play Store, the automatic sync just doesn't work well enough.

I'll look into it and see if FBReader has released a new API that fixes the problem..

Thanks,

Scott
[Nook Color Themes and Apps] Delvorak:
As of the latest FBReader code on Github, the getBookFilePath method still isn't implemented, which means I probably can't fix this problem because FBReader stores all of it's book with absolute paths, and without the ability to discern which path the book is stored in, I may not be able to sync it properly.

I'll put some thinking into it. Maybe I'll be able to come up with something.

Scott
[Nook Color Themes and Apps] afainber:
Hi Scott,

I am using FBReader on my ICS Galaxy Nexus and I suddenly realized that I can upgrade my Sony Reader PRS-650 to a Nook Simple Touch and use your software to synchronize between the two.

Before buying the Nook, downloaded the 1.0.23 version to my phone to make sure it has all the features I'd need.

The problem is that the "Auto Sync" feature does not work well for me. Every time I open a book, it jumps to the last position it was in at the time of the last manual sync. I flip a couple of pages, leave FBReader and when I open FBReader again, it jumps to the old position once more.

Is there something I'm doing wrong?

I'd appreciate your advice.

Leonid
[Nook Color Themes and Apps] Delvorak:
Add I mentioned two posts above, due to limitations in the fbreader API, the automatic sync does not work very well. I would recommend that it not be used.

If the fbreader API is updated to support the functions I need to make the automatic sync work properly, I will update fbsync.

Thanks,

Scott
[Nook Color Themes and Apps] Delvorak:
Please try installing the new v1.0.24 version (see the first post in this thread), I think I may have this particular Auto-Sync problem fixed. It looks like FBReader changed the return value of an API call and it broke this functionality.

Thanks,

Scott
[Nook Color Themes and Apps] jhoward15:
New version autosync works well for me

The 1.0.24 version sync seems to be working well for me between all devices. The issue where my Book color could never leave a page with autosync turned on has gone away as well. Well done - this is a truly useful app.
[Nook Color Themes and Apps] afainber:
Unfortunately, for me the behavior is still the same :(

However, this time, it may be related to the fact that when I'm trying to "sync" manually, it's getting stuck on one of the books (I have no idea which) and the task is being timed out.

Any suggestions how to fix/debug this? Maybe after I fix this, the auto-sync will work for me in 1.0.24...

Thanks,

Leonid
[Nook Color Themes and Apps] afainber:
OK, at least part of the mystery is solved. 1.0.24 broke the Dropbox support, so first time I run this, instead of asking for Dropbox permissions, it is just stuck at the end of the position sync (I'm using Dropbox to sync only the books themselves, not the positions).
[Nook Color Themes and Apps] Delvorak:
There does indeed appear to be some problem with dropbox in 1.0.24... I will look into it right now and see if I can figure out what's going wrong.

Thanks

Scott
[Nook Color Themes and Apps] Delvorak:
I'm curious, do you get prompted to allow FBSync access to your dropbox?

Scott
[Nook Color Themes and Apps] Delvorak:
Here, give this version a try. It passed all the tests I threw at it, it should work for you. If it does, let me know and I'll update the first post.

Thanks,

Scott
[Nook Color Themes and Apps] KeiranSolaris:
Noticed that when using auto-sync the table of contents no longer works.

Whenever you open the ToC from inside a book, the sync runs and messes things up.

If I'm at the beginning of chapter 4 and then I open the ToC and select chapter 10 the app quickly skips to chapter 10 and then right back to chapter 4, almost too fast to take note of.

If I don't have autosync enabled then I have no issues.

Is there a way that you can change the autosync to not automatically run when you open the ToC?

Semi-related question.

Can you put a sync button in the menu as well?

Trying to automate syncs with Tasker so that I have finer control over exactly when syncs happen.

I can open the menu, navigate around it, and press buttons but I cannot simulate a touch screen click through tasker (which would currently be needed to initiate a sync).
[Nook Color Themes and Apps] mtz_ro_2003:
For me 1.0.25 is working: when I close FBReader the positions are synchronized.

I close FBReader on the tablet, I open it on the phone, click "Sync" on the phone and the positions are updated.

The only draw-back (for me) is that you have to exit FBReader for the auto-sync to work. But if I forget to close FBReader on the tablet (and I don't take it with me)...? The positions are not auto-sync'ed...

So... would be possible to auto-sync when the device goes on stand-by (turns off the screen)?
[Nook Color Themes and Apps] Delvorak:
I'll see if there's anything that I can do about the ToC problem. The FBReader API isn't very robust, it may not give me enough information to determine if ToC was pulled up versus closing the app.

Yes, I can add a sync menu option to FBSync. It should be in the next version I release.

Scott
[Nook Color Themes and Apps] Delvorak:
Good catch. I'll look into it.

Thanks,

Scott
[Nook Color Themes and Apps] jrob007:
I am having an issue with the dropbox sync where it won't download.

I have two devices, GNex LTE and a Nexus 7.

I have tried versions 1.0.23, 1.0.24, 1.0.25.

I have added files on both the GNex and N7 and they both upload.

I have verified that the files are going up to dropbox from both devices.

Neither device will download files.

Any ideas?
[Nook Color Themes and Apps] Delvorak:
Apologies for the delay.

So they both upload files to dropbox, but won't download them? Are you using Dropbox to sync the positions as well? If so, is that part working?

Are the books in different folder locations on the two devices? The book syncing is folder specific... so if on one device the books are in

/mnt/sdcard/books

and on another it's

/mnt/external_sd/books

And neither device has the other devices paths (the one with sdcard doesn't have a mount of external_sd, and vice versa), that would explain it..

If that's true, could you (temporarily) try to get them in a common location on both devices?

I can probably change FBSync so you can tell it where you store your books (relative to each device), and then it can sync to that folder...

Scott
[Nook Color Themes and Apps] Nilsb7:
Which files are the ones getting synced to backup the FBreader database?

I thinking about making a Tasker/Foldersync profile to simply sync the whole database to my Google Drive account.
[Nook Color Themes and Apps] Delvorak:
FBReader stores all of it's book data in a database located in the following directory:

/data/data/org.geometerplus.zlibrary.ui.android/databases

Hope that helps,

Scott
[Nook Color Themes and Apps] Nilsb7:
Yes thank you! Could you maybe explain in what file the reading locations are stored exactly? or maybe instructions on how to read the database files? just linking to explanation is fine to, I wasn't able to find anything useful.
[Nook Color Themes and Apps] Delvorak:
It's a SQLite database. A quick search on google should show you everything you'll need to know on how to access it. I use SQLite Editor app on my device to browse the database. The data is in the Books.db (any files starting with Books is part of that database). The actual book position data is in the BookState table, but you'll also have to look at the Books and Files tables to figure out which BookState is for which book.

Scott
[Nook Color Themes and Apps] Nilsb7:
Thank you very much kind sir.
[Nook Color Themes and Apps] huladaddy:
It appears that the dropbox book syncing is a one way street. New books are added to my dropbox account but I haven't been able to figure out how to delete books. Whenever I delete a book from fbreader, it gets re-downloaded again from dropbox the next time I sync.
[Nook Color Themes and Apps] danam:
I am having trouble with dropbox because, I think, the books file on my phone and tablet are in different paths. Phone is /sdcard-ext and tablet is mnt/extsd.

I tried renaming the the tab's but it won't let me (using es file explorer, rooted obviously). Any other ideas? Do I have to move all my books on both devices to internal sdcard? Any other fix? Any help appreciated.
[Nook Color Themes and Apps] Delvorak:
The book sync always replaces missing files. If the book is on dropbox, but not in your device, it downloads it. If it's on your device, and not on dropbox, it uploads it. You have to delete the book from all devices and dropbox to prevent it from syncing again.

That's just the way it works, sorry if it isn't ideal for you.

Scott
[Nook Color Themes and Apps] Delvorak:
Yes, this problem has been cropping up more and more lately.

I'm trying to think of a way around it.

Scott
[Nook Color Themes and Apps] huladaddy:
Thanks. That helps me understand how it is supposed to work. I have been using AldikoSync and it works slightly differently.
[Nook Color Themes and Apps] KeiranSolaris:
Saw that you updated today and added the Sync option to the menu.

Using Tasker I can now set a task to open the app at 1AM, hit menu, click left, then press the button. Can now automatically sync my books on all my devices every night.

Thanks a bunch!
[Nook Color Themes and Apps] Nacky1911:
nothing works

Ive checket too meny version to remember their numbers, but nothing works in any. On my tf101 im doing sync via dropbox, it syncs, my books are listed.. then am doing resync (on tf101) and many books desappear from list, in fbreader they are still in libraru, but any progress is lost, syncing on my xperia p also lesds to destroying all my progress. So in any order syncing and resyncing leadst to fbreader manual to open. When i use your service, my books even dont appear in list, also if i select clear all internet data, and enter my pin like in settings, it writes me "wrong pin".(ROOT presents on both devices). Sory my bad English, im russian.
[Nook Color Themes and Apps] chenchen:
So after using fbsync for no problems for quite sometime, I've noticed that it's not syncing books that are in folders. I've reset data, re-installed all to no avail. any help you can provide with this would be wonderful
[Nook Color Themes and Apps] Delvorak:
Did it used to sync the books in folders and now isn't, or has it never worked?

Could you give me an example of the folder and file layout so I can try to test it?

Thanks,

Scott
[Nook Color Themes and Apps] Delvorak:
Can you give me the absolute folder paths on both devices where your books are stored?

Scott
[Nook Color Themes and Apps] zelch:
PC Client. (With some questions.)

So, I found FBSync last night, and aside from the lack of PC syncing, it is something that I have wanted for quite some time.

With that in mind, I've been writing a quick and dirty PC client in perl, currently targeted at the web server API and Linux users.

(Windows users wouldn't be especially _hard_, aside from needing to know what paths to look in, and it being strictly command line at this time, I just don't actually own, or care to own, a Windows box to play with this.)

I'll post it shortly after it no longer has things like my private sync URL and PIN hard coded.

Dropbox support also probably wouldn't be hard, but at the moment I don't have a dropbox account and Net::Dropbox::API seems to be geared a lot more towards web clients with callback URLs then command line clients on someone's system. (Well, that, and I don't even know what the file format fbsync is using on it.)

Again, probably not hard, but less likely to actually happen unless someone else takes an interest.

Currently there are some minor issues with the file name conversion happening differently from FBSync in some cases, and it ignores the path so if you have two different books, in two different directories, with the same file name, it will get Confused.

(Could be fixed, OTOH, the path on my phone line device is different from the path on my tablet, and both are quite different then the path on my computer.)

This brings me to my question, what is the canonical method for converting the file name from the raw name on the system to what fbsync is sending over the network? It's not a straight uri_escape because spaces are becoming raw + symbols, not %20 and definitely not a raw %2B.

And how does FBSync handle the same file name with different directories case?

Thanks,

Mercury.
[Nook Color Themes and Apps] Delvorak:
All of the data transmitted to the PHP pages use the URLEncoder for encoding:

http://developer.android.com/reference/java/net/URLEncoder.html

FBSync really doesn't handle the same filenames in multiple directories. It assumes that the filenames are pretty much unique, and if you happen to have the same book in multiple directories, it will use the same positions for all of them.

Scott
[Nook Color Themes and Apps] zelch:
Ahh, alright.

The description on that is a great deal more helpful.

I may switch the logic around to match fbsync, right now if there are multiple copies of the same filename in multiple directories one of them gets updated and the rest ignored.

(The most common name is content.opf for when I'm fixing up an ebook and don't want to repack it before seeing if it worked.)

I also need to consider if I want to try and handle the horrid config.changes thing that it does at runtime instead of keeping the database up to date. Either that, or get them to accept a patch to actually save stuff to the DB more often.

So what can you tell me about the file format you use with dropbox? :)

(And would you be open to adding other sync methods, like say, sftp with an RSA key for auth? :))

Mercury.
[Nook Color Themes and Apps] Delvorak:
I'm assuming you mean for the book positions file, encodedBookData.dat?

Each record is made up of 10 fields, seperated by carats (^). Each record is seperated by a pipe (|). The 10 fields are:

1) Book Filename (no path)

2) Paragraph Index

3) Word Index

4) Character Index

5) Recent Index (no longer used. It was used to update the "Recent Books" in FBReader, but I kept running into problems where it was wrong and couldn't be corrected (fbreader doesn't keep track of WHEN you opened books, so I have no clue as to WHEN it happened))

6) Encoding

7) Language

8) Title of the book

9) File size

10) Parent name (the path of the file)

When syncing, if the book already exists in the fbreader database, only the first 4 fields are used. The rest are only used if it has to insert a new record into the database for a book that hasn't yet been opened on that device. When that happens there can sometimes be problems with the parent name (10), because that path may not exist on the new device. I haven't really solved that yet.

I might be interested in adding other syncing options. There would have to be a few people interested in a new option before I'd do it. I've tried getting Google Drive to work, and utterly failed. It's incredible how little useful documentation exists for it.

Scott
[Nook Color Themes and Apps] zelch:
I'm not currently _quite_ brave enough to try and insert new entries into the DB, largely because of the issue with the paths being almost guarenteed to be different.

(I organise things on my computer, the Android devices just have a Books directory, and my tablet uses a different path for the internal data storage then my A43it.)

Are you doing the same encoding on the strings as you do for the web interface?

(This is just the data= value for each book, but line separated instead of | separated, correct?)

Mercury.
[Nook Color Themes and Apps] Delvorak:
Yes, the same encoding is used for both the web and dropbox.

No, the data= value is slightly different. It's

1) Title

2) Filename

3) Paragraph Index

4) Word Index

5) Character Index

6) Recent Index

7) File size

8) Encoding

9) Language

10) Parent Name (Path)

And it should also be pipe delimited.

Scott
[Nook Color Themes and Apps] zelch:
Ahh, alright.

Why the different ordering?

Mercury.
[Nook Color Themes and Apps] Delvorak:
I'm absolutely positive I had a good reason for it at the time. Now, not so sure.

Scott
[Nook Color Themes and Apps] zelch:
Fair enough.

Would you consider syncing with a local file on the device?

(Easier testing in the short term for me, and it would allow people to use other syncing clients of their choice. Not ideal, but...)

Mercury.
[Nook Color Themes and Apps] zelch:
Whoops, double post, ignore this one.
[Nook Color Themes and Apps] zelch:
So, hopefully just a few final questions before I post code somewhere:

First, any naming suggestions? fbsync for desktop tends to imply a connection to the author of fbsync that he may not want, so, I'm open to suggestions. :)

Second, is there any interest in Windows support?

Third, is there any interest in DropBox support?

Thanks,

Mercury.
[Nook Color Themes and Apps] Delvorak:
Technically the dropbox sync does sync to a local file on the device. The webEncoded.dat file is created in /data/data/com.asd.fbsync/files (I think that's right). It still has to sync with dropbox to do it, but it's an option. I'm not really interested in adding a real sync to local file, because it wouldn't be useful to anyone else..

I'm not opposed to your naming it after my app. Completely up to you. I won't sue you ;)

I've received a number of requests for windows support, so yes, I 'd say there is quite a bit of interest.

Not sure if there is dropbox support. Seems like a lot of people are moving from dropbox to Google Drive or other services. I probably wouldn't spend the time on it until someone requests it.

Scott
[Nook Color Themes and Apps] zelch:
Ahh, handy.

Note, I do actually have a non-dev case for it, though I don't know how often even I'd be using it.

Multiple devices somewhere without internet connectivity, and wanting to move between them. With a file sync on the SD side it's easy.

(_Really_ easy if you can easily move the SD card between devices.)

FBSync for PC it is, it might get a Desktop label instead, but the complete lack of a GUI makes me wonder. :)

Mercury.
[Nook Color Themes and Apps] zelch:
FBSyncPC

And the very very first public version is up as of now:

https://github.com/zelch/FBSyncPC

Please, give feedback, even if it's just to say that you're using it, or that installation is too hard and I suck. :)

Mercury.
[Nook Color Themes and Apps] zelch:
As a note, it _should_ work on Windows and OS X as well, but it has not been tested on either.

It works with fbreader 0.12.x and the 0.99.4 beta under Linux.
[Nook Color Themes and Apps] kris00:
Hi,

I've just got your latest APKs and trying to use it between an atrix and nook simple touch, but it doesn't seem to sync last pages read. Is there a way I can debug/look into what's not working?

Thanks in advance
[Nook Color Themes and Apps] huladaddy:
Fabrik

Anyone else think Fabrik might make this irrelevant?
[Nook Color Themes and Apps] zelch:
Not for me at least, for oh so many reasons.
[Nook Color Themes and Apps] huladaddy:
Don't leave a comment like that without further explanation. I would like to know your reasons.