New Baka-Tsuki Android App: Development

Forum for volunteer developers working on Baka-Tsuki related applications (Baka-Reader, BTprince, etc).

Moderators: thelastguardian, Fringe Security Bureau, Senior Editors, Senior Translators, Alt. Language Translator/Editor, Executive Council, Project Translators, Project Editors

Post Reply
User avatar
Nandaka
Astral Realm

Re: Official Baka-Tsuki Android App: BakaReader Available no

Post by Nandaka »

>> https://gist.github.com/3294821

I can't do any Objective-C/iPhone development, so cannot help you there. I do know Java and have done a little bit programming for android, but not for the UI :P
User avatar
Erakk
Digitalizer Editor
Posts: 152
Joined: Sat Jan 21, 2012 3:12 am
Favourite Light Novel:

Re: Official Baka-Tsuki Android App: BakaReader Available no

Post by Erakk »

Well, thats good, since i just set up eclispe and the android SDK at home, and created a very simple UI (baka-reader style)
Today i might give it a go more.
Maybe we should discuss if we should design it with the baka-reader in mind or try a new Interface approach?
Ill post pics later and the code on github too.
What i might need help is getting the web info and parsing data.
As for caching the data, maybe ill use sqlite3
In theory, practice and theory are the same.
but, practically, they arent.
User avatar
Azaana
Astral Realm

Re: Official Baka-Tsuki Android App: BakaReader Available no

Post by Azaana »

Used this app to read most of sword art online and it as a great program. Thank you for making it and the translation work.

One problem I found with it was that due to chapter updates I had 3 volume 4 entries all with different parts of it in, so it was hard to see what I should be reading when. It was under my watch list if this has any bearing on the problem, I just uninstalled and reinstalled the app and it has all been sorted.

Just want to say thank you for the app and continue the good work, it made it much nicer to read and keep track of where I was than on the computer.
User avatar
Nandaka
Astral Realm

Re: Official Baka-Tsuki Android App: BakaReader Available no

Post by Nandaka »

Erakk wrote:Well, thats good, since i just set up eclispe and the android SDK at home, and created a very simple UI (baka-reader style)
Today i might give it a go more.
Maybe we should discuss if we should design it with the baka-reader in mind or try a new Interface approach?
Ill post pics later and the code on github too.
What i might need help is getting the web info and parsing data.
As for caching the data, maybe ill use sqlite3
https://github.com/Nandaka/BakaReaderClone

Just learning for android UI programming, currently only parsing the novel list :)
User avatar
blindbox
Astral Realm

Re: Official Baka-Tsuki Android App: BakaReader Available no

Post by blindbox »

andyrobo123, I have a problem with battery drain. Whenever I'm using this app, the battery goes from full to 10% in 2 hours. The Android battery stats show that Android OS is taking up all the battery, more than the screen itself!

Could you look into this? I also wanted to add that if we were to check using BetterBatteryStats, there's EventX-XXXX (X representing any number) that has been calling partial wakelocks repeatedly. I saw the count go to 40000. I use 'Night Mode' by toggling colours, if that matters.
EDIT: Just realized the developer went MIA. Then again, I checked his last visited date, pretty recently.
User avatar
Nandaka
Digitalizer Editor
Posts: 535
Joined: Thu Aug 09, 2012 9:46 am
Favourite Light Novel: Ahouka!
Location: Singapore
Contact:

Re: Official Baka-Tsuki Android App: BakaReader Available no

Post by Nandaka »

welp, my post is not yet approved so registering :)
Erakk wrote:Well, thats good, since i just set up eclispe and the android SDK at home, and created a very simple UI (baka-reader style)
Today i might give it a go more.
Maybe we should discuss if we should design it with the baka-reader in mind or try a new Interface approach?
Ill post pics later and the code on github too.
What i might need help is getting the web info and parsing data.
As for caching the data, maybe ill use sqlite3
Already created project in https://github.com/Nandaka/BakaReaderClone. Only parsing the light novel list and caching it to sqlite is working. :)
Visit my blog for other applications.
User avatar
Erakk
Digitalizer Editor
Posts: 152
Joined: Sat Jan 21, 2012 3:12 am
Favourite Light Novel:

Re: Official Baka-Tsuki Android App: BakaReader Available no

Post by Erakk »

I had to merge your files with mine. But this is just a test.
I tested in my Galaxy S2 and it worked perfectly.
i attached some pics, and heres the link to my Git with our merged files:
https://github.com/calvinaquino/LNReader-Android

The UI is VERY bland. we just gotta discuss the design and go.
You do not have the required permissions to view the files attached to this post.
In theory, practice and theory are the same.
but, practically, they arent.
God Ginrai
Haruhiist Disciple
Posts: 65
Joined: Sat Dec 10, 2011 3:03 am
Favourite Light Novel:

Re: Official Baka-Tsuki Android App: BakaReader Available no

Post by God Ginrai »

I just got a webOS phone, and was wanting to build a Baka-Tsuki app for my phone, so I was going to take a look at this sooner or later. Is it possible to talk the admins into allowing an XML feed of some sort for each novel? It shouldn't be too hard to do, and would make developing readers much more organized. I can go into detail about my ideas for such a format if anyone is interested.

-God Ginrai
User avatar
Nandaka
Digitalizer Editor
Posts: 535
Joined: Thu Aug 09, 2012 9:46 am
Favourite Light Novel: Ahouka!
Location: Singapore
Contact:

Re: Official Baka-Tsuki Android App: BakaReader Available no

Post by Nandaka »

EusthEnoptEron wrote:
Nice, prefer application though, so I can download and read it offline.
It may or may not be possible to simulate that behavior using the Offline API, which however seems to be rather inconsistent in terms of support and difficult to customize. I guess I'll look into it, but before that, I have to translate Hakomari. :D
btw, is there any API you use for getting the novel list and the contents? I know there is MediaWiki API, but somehow when I tried to fetch the links, they sort the order by alphabet. (like this: http://www.baka-tsuki.org/project/api.p ... splaytitle)
Sadly, no. The only reliable representation of volumes/chapters can be found on the project pages, which can vary largely in format. Thus, I'm using a HTML parser against them at the moment.
What is the keyword to parse the light novel page, or how do you parse the page and construct the volume list? I notice I can use the 'Volume' as the basic keyword to parse as they don't have specific id, but how you parse the Baccano page or Tabi ni Deyou, Horobiyuku Sekai no Hate Made (or any page without 'Volume' marker).
Visit my blog for other applications.
User avatar
EusthEnoptEron
Project Translator
Posts: 836
Joined: Mon Jul 13, 2009 10:39 am
Favourite Light Novel: Ahouka!
Location: Switzerland

Re: Official Baka-Tsuki Android App: BakaReader Available no

Post by EusthEnoptEron »

Nandaka wrote:What is the keyword to parse the light novel page, or how do you parse the page and construct the volume list? I notice I can use the 'Volume' as the basic keyword to parse as they don't have specific id, but how you parse the Baccano page or Tabi ni Deyou, Horobiyuku Sekai no Hate Made (or any page without 'Volume' marker).
I'm speaking off the top of my head here, but I'm doing it like this:

1. Find all <h2> nodes on the page that either contain a " by " (for most cases) or the name of the project (like for Gekkou) or /Full Text/i (like for Tabi ni Deyou).
2. Save the name (after cutting down some slack) into a variable X
3. Loop through all nodes that follow after the <h2> until the next <h2> or the end of the page
3.a If tag name ~= (ul|dl|div), scan for categorized links and consider them chapters of X
3.b If tag name = h3, update X with the (sanitized) text of the node.

This way, you can cover both projects that have a <h3> level and those that don't, though it's a dirty approach. I haven't tested if the results are accurate enough, though.
User avatar
Erakk
Digitalizer Editor
Posts: 152
Joined: Sat Jan 21, 2012 3:12 am
Favourite Light Novel:

Re: Official Baka-Tsuki Android App: BakaReader Available no

Post by Erakk »

What kind of options would be interesting to implement?
I`ll see to a "low light" mode or something like that (wich inverts the background and font colors)
maybe some options to manage the cache.

Btw Nandaka, im passing only the novel name to the chapters activity, but if you need anything else (but i guess you know how)

For others, you can allways access the Git link, download the apk manually and install to see what is going on (indirect alpha testing =D)
In theory, practice and theory are the same.
but, practically, they arent.
User avatar
Nandaka
Digitalizer Editor
Posts: 535
Joined: Thu Aug 09, 2012 9:46 am
Favourite Light Novel: Ahouka!
Location: Singapore
Contact:

Re: Official Baka-Tsuki Android App: BakaReader Available no

Post by Nandaka »

Erakk wrote:What kind of options would be interesting to implement?
Btw Nandaka, im passing only the novel name to the chapters activity, but if you need anything else (but i guess you know how)
yup, updated the parser so it can fetch the novel synopsis and the cover page :)

later on I will try to implement the parser for chapter list.
Visit my blog for other applications.
User avatar
Erakk
Digitalizer Editor
Posts: 152
Joined: Sat Jan 21, 2012 3:12 am
Favourite Light Novel:

Re: Official Baka-Tsuki Android App: BakaReader Available no

Post by Erakk »

Nandaka wrote:yup, updated the parser so it can fetch the novel synopsis and the cover page :)
later on I will try to implement the parser for chapter list.
What will be the "synopsys" page layout?
Theres the tittle (currently displaying name+" chapter")
then the image and then synopsys... but

About the Images:
Are we going to download them, store them, and load form resources?
are we going to download them directly from the web when we load the page?

I think i'll add an option to "store images" (default TRUE) so
if its true, then, download, store, then show.
if false, download directly and show.
And a button to clear image cache (like the novel cache)
In theory, practice and theory are the same.
but, practically, they arent.
User avatar
Erakk
Digitalizer Editor
Posts: 152
Joined: Sat Jan 21, 2012 3:12 am
Favourite Light Novel:

Re: Official Baka-Tsuki Android App: BakaReader Available no

Post by Erakk »

Some Images for the Settings screen+
Invert image functionality for low luminosity:
(BakaTest example)
Images too Big. click Spoiler tag to see.

Settings Screen
Spoiler! :
settings screen.png
IF you have any ideas for the settings name/description or
new settings, just post.

Normal text colors
Spoiler! :
synopsys normal colors.png
Inverted colors
Spoiler! :
synopsys inverted colors.png
You do not have the required permissions to view the files attached to this post.
In theory, practice and theory are the same.
but, practically, they arent.
User avatar
Nandaka
Digitalizer Editor
Posts: 535
Joined: Thu Aug 09, 2012 9:46 am
Favourite Light Novel: Ahouka!
Location: Singapore
Contact:

Re: Official Baka-Tsuki Android App: BakaReader Available no

Post by Nandaka »

>> About the Images:
>> Are we going to download them, store them, and load form resources?
>> are we going to download them directly from the web when we load the page?

@Erakk: I'm planning to always cache the downloaded images to db or external storage like the current implementation of bakareader, so yeah, download -> save the file and store the reference -> load from resource when the image is downloaded for the first time, next time just load from storage using reference from db

EDIT: now the cover image will be saved to disk for the first time downloaded, the resource loading is from the local file. Add the permission to use external storage for saving the file. The images is saved to /sdcard/.cache/ + the path from baka-tsuki. Also create the table for saving novel synopsis and chapter list, might have bugs :p
Visit my blog for other applications.
Post Reply

Return to “Developers and Code”