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
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 »

KuroiHikari wrote:I did some messing about, but what do you think these:
http://www.baka-tsuki.org/project/api.p ... lade_Dance
http://www.baka-tsuki.org/project/api.p ... &section=7
That looks really good so far. I can look into it more and let you know if I have any more suggestions about the XML, but even something like that would make things a lot more organized than having to parse HTML in the application. What are you using to populate that XML, some default XML plugin in the wiki, or something you threw together?

-God Ginrai
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 »

@KuroiHikari
The original plan is to create a new version of the BakaReader and implement new ideas of the comunity, while fixing/avoiding the bugs that exist on the current version.
This project is created from scratch, and Initially will contain very basic options, but in time it will become a full fledged application, and if requested, we may implement other features.
Just in case, the resulting application is intended to and will allways be free.
The project source code can be viewed at https://github.com/calvinaquino/LNReader-Android
If you have any ideas and/or advices, feel free to post/request a commit.

Currently there are Me and Nandaka working on it whenever we can =D

Expect an alpha (with basic funcionality only) to be released soon.

@Nandaka - when you can, take a look at the pageModel, it might be picking every volume of the novel instead of picking per volume. =P

I fixed the ExpandableListView problem. Well, i changed the layout because scrollView as a parent to ExpdListView wont work, and putting it inside a Relative/Linear AND outside the basic Layout only makes them overlap.

LongClick on novel opens menu and you can view synopsys there.
In theory, practice and theory are the same.
but, practically, they arent.
KuroiHikari
Fish Miner
Posts: 822
Joined: Fri Apr 16, 2010 1:01 am
Favourite Light Novel:

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

Post by KuroiHikari »

God Ginrai wrote:That looks really good so far. I can look into it more and let you know if I have any more suggestions about the XML, but even something like that would make things a lot more organized than having to parse HTML in the application. What are you using to populate that XML, some default XML plugin in the wiki, or something you threw together?

-God Ginrai
It's the standard mediawiki stuff. http://www.baka-tsuki.org/project/api.php?
I have no access to the server or anything like that.

@Erakk
Oh, I actually meant what's the original design plan, since you faced a problem and was asking for ideas.
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: @Nandaka - when you can, take a look at the pageModel, it might be picking every volume of the novel instead of picking per volume. =P
What do you mean by that? you need to use dao.getNovelDetails() to get NovelCollectionModel which containing ArrayList<BookModel> bookCollections.

This will list all the book/volume it have. For getting the list of chapters per book, you can use ArrayList<PageModel> getChapterCollection().

so it linked like this NovelCollectionModel -> ArrayList<BookModel> bookCollections -> ArrayList<PageModel> getChapterCollection()

btw you can set a view as header/footer to ExpandableListView, maybe you can create a custom view only containing image and text box, then attach it onCreate?
Last edited by Nandaka on Thu Aug 16, 2012 10:37 pm, edited 1 time in total.
Visit my blog for other applications.
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 »

KuroiHikari wrote:
God Ginrai wrote:That looks really good so far. I can look into it more and let you know if I have any more suggestions about the XML, but even something like that would make things a lot more organized than having to parse HTML in the application. What are you using to populate that XML, some default XML plugin in the wiki, or something you threw together?

-God Ginrai
It's the standard mediawiki stuff. http://www.baka-tsuki.org/project/api.php?
I have no access to the server or anything like that.

@Erakk
Oh, I actually meant what's the original design plan, since you faced a problem and was asking for ideas.
Interesting. I'll look into it. Btw, once I finally get around to starting my BakaReader app, I'll be sure to host it on github so you guys can take a look. This'll be my first foray into WebOS development, but since I'm probably going to use the Enyo framework, this application should hopefully be able to be made cross-platform pretty easily.

-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 »

@Erakk:
- Readded the title, synopsis, and image cover back to the chapter list. Now use addHeaderView(), so it won't be overlaid.
- Fix the chapter list generation, you forgot to create a new list2 for each volume, see diff for more details : :P
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:@Erakk:
- Readded the title, synopsis, and image cover back to the chapter list. Now use addHeaderView(), so it won't be overlaid.
- Fix the chapter list generation, you forgot to create a new list2 for each volume, see diff for more details : :P
I`m such an airHead()...
nice one then =D
I almost exploded my self in trying to fix it. I tried the headerView but only got headaches. I normally tend to make some obvious simple mistakes and take hours untill i realize how stupid it was...

BTW is the line ending UTF-8/Unix problem still existing?
Did you linked the database to the checkBox of the novelActivity? =P

Now to the watchList.
I think we are close...

@KuroiHikari: oh. well atleast i gave the general idea/plan =D
The original plan was to make like Nandaka just did: have synopsys info (title/cover/info) above the list of volumes.

BTW2 @Nandaka: is it possible to also save the last viewed chapter? i want to implement a "Go to last chapter/novel read" on the main menu so you can go back to the action in maybe 2 clicks? (i think using SharedPreferences is good? since i dont think a table layout (database) will be good to store such small info)
On the WatchList... should we also have the header of synopsys on the volumeList or not? (i dont know)
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:
- line ending/UTF-8: from your last commit to my commit, I see the diff only replace the changed line. btw I'm using git bash, not the ui client from github.
- Watch List ==> haven't yet, now testing for displaying the content of the chapters :)
- Last Viewed Chapter => Better use SharedPreferences, auto save every time the user open and close the chapter content view?
- Header of synopsys on the volumeList on Watch list => Maybe only the snippet? 1/2 lines appended with elipsis (...) in the sub-text? If you can, why not?

EDIT: Now showing the contents and save it to DB, including images! Need to know override the link handling so it can show the big images when click the link.
EDIT2: Now watch list 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 »

hmm, seems its not populating the novelList properlly (its repeating items)
and volumeList (expandableListView) children are all the same =D
Ill take a look when i get back

@watchlist synopsys for the moment ill leave it as that since we are showing the image and all
I'm gonna also implement the lastChapter read LockOrientation options soon.
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:hmm, seems its not populating the novelList properlly (its repeating items)
and volumeList (expandableListView) children are all the same =D
.
should be fixed by now.
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:should be fixed by now.
SICK.
EDIT: I'm gonna also implement the lastChapter read LockOrientation options soon. AND make so you know what chapters you dled.
And fix the reading layout.
EDIT2: i implemented all the options and context menus after some consideration and planning, discardint some that i found uneeded (duplicates).
But the contextMenu for the ExpandList is not functional (F*CKING EXPANDLIST SERIOUSLLY i cant seem to register that for contextMenu)
And it Sometimes throws CalledFromWrongThreadException when entering the activities...(Novel, chapterList)
I think this exception *might* be my fault (i said might because on the first time i ran the app it didnt happened, then i added the options and it started happening but not all the time) but i was unable to verify the cause.
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 »

>> context menu for expand list
probably because you need to setup the long click listener on the child, like for the click is ExpandList.setOnChildClickListener(new OnChildClickListener() {..});
maybe you can see this: http://stackoverflow.com/questions/2353 ... lelistview on the second answer?
EDIT: implemented it :) only need you to call the menu

>> CalledFromWrongThreadException
probably because the UI elements is being modified directly is AsyncTask.doInBackground
EDIT: now the progress bar is called from onPreExecute, which running on UI Thread.

EDIT2: Implemented DisplayImageActivity for showing big image from novel content
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 »

finished adding menus, and refresh/change color functionality.
IF you have any idea to change the preferences color, the way it is now, (its not complete) the code is gigantic lol
currently im in the middle of implementing the color change in the novelChapters and making the contextMenu work (thanks for the code, now i gotta find a way to launch that from there).

Other than that is basically functional, if someone wants to test i might put the link for the apk later (if you know how to install manually, or i might write a small how-to).
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 »

add function to save last zoom, scroll x, and scroll y in content. the values are saved and loaded properly from db, but somehow the image loading is deferred, so the scrolling cannot work, the zoom is ok.

EDIT: use setPictureListener to adjust the scrolling.
EDIT2: add finish read if the pages was scrolled until bottom.
EDIT3: add login for prev/next chapter when reading
EDIT4: Add callback for showing progress when loading, currently only in DisplayImageActivity to show the download %, need handler to push the message to the text box.
EDIT5: Moved ICallbackNotifier to AsyncTask, no need to use handler but need to wire onCallback with publishProgress.
EDIT6: Add download by chapter and by volume.
Visit my blog for other applications.
User avatar
acolyte
Kyonite - The Haruhi Pacifier
Posts: 140
Joined: Fri Aug 10, 2012 10:09 am
Favourite Light Novel:

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

Post by acolyte »

Hello, so I've seen some translations which uses hyperlinks in their text.
This is fine and dandy on a desktop. However, it screws up display in BakaReader, because all the text after the first hyperlink becomes blue, as if there's a <a> tag without </a>
Is this a fix needed for the app or can something be done on the wikitext side?
Example is Infinite Stratos, Golden Time, which the translator uses a lot of external links.
Last edited by acolyte on Wed Aug 22, 2012 6:03 am, edited 1 time in total.
Post Reply

Return to “Developers and Code”