New Baka-Tsuki Android App: Development
Moderators: thelastguardian, Fringe Security Bureau, Senior Editors, Senior Translators, Alt. Language Translator/Editor, Executive Council, Project Translators, Project Editors
- Erakk
- Digitalizer Editor
- Posts: 152
- Joined: Sat Jan 21, 2012 3:12 am
- Favourite Light Novel:
Re: New Light Novel Reader Android App (In the works)
I created a placeholder.
It's better than nothing =)
I'll try a pool.
By the way, im reading some docs on intentService, but some tutorials just vomit the code all over my face.
I got the hang of it but got some stupid issue
It's not clarified the extact time the service starts, or if it requires the app launch to start. (and the context to instantiate it):
My head is full of Objective C so i keep thinking iPhone all over the place... sorry, jobs being a Mikuru.
EDIT: i just grabbed the new apk (cannot get it on the job...) and on initial test... the landscape problem doesn't occurs anymore.
It's better than nothing =)
I'll try a pool.
By the way, im reading some docs on intentService, but some tutorials just vomit the code all over my face.
I got the hang of it but got some stupid issue
It's not clarified the extact time the service starts, or if it requires the app launch to start. (and the context to instantiate it):
My head is full of Objective C so i keep thinking iPhone all over the place... sorry, jobs being a Mikuru.
EDIT: i just grabbed the new apk (cannot get it on the job...) and on initial test... the landscape problem doesn't occurs anymore.
In theory, practice and theory are the same.
but, practically, they arent.
but, practically, they arent.
- Nandaka
- Digitalizer Editor
- Posts: 535
- Joined: Thu Aug 09, 2012 9:46 am
- Favourite Light Novel: Ahouka!
- Location: Singapore
- Contact:
Re: New Light Novel Reader Android App (In the works)
See here: http://developer.android.com/reference/ ... rvice.html
IntentService is a base class for Services that handle asynchronous requests (expressed as Intents) on demand.
Also see: http://developer.android.com/guide/comp ... vices.html for comparison between unbound and bound service (on bottom page).
I prefer to use IntentService because only one application using it. Maybe can use the main page as trigger: start service if there is no running one. Then in the service, just loop using while(true) and put Thread.Sleep(checkInterval) at the end of the loop. Probably add check to manually stop the service?

IntentService is a base class for Services that handle asynchronous requests (expressed as Intents) on demand.
Also see: http://developer.android.com/guide/comp ... vices.html for comparison between unbound and bound service (on bottom page).
I prefer to use IntentService because only one application using it. Maybe can use the main page as trigger: start service if there is no running one. Then in the service, just loop using while(true) and put Thread.Sleep(checkInterval) at the end of the loop. Probably add check to manually stop the service?
Erakk wrote:EDIT: i just grabbed the new apk (cannot get it on the job...) and on initial test... the landscape problem doesn't occurs anymore.

Visit my blog for other applications.
- Erakk
- Digitalizer Editor
- Posts: 152
- Joined: Sat Jan 21, 2012 3:12 am
- Favourite Light Novel:
Re: New Light Novel Reader Android App (In the works)
You make it much more simple...
By the way i dont know how "Mikuru" ended up there.
In the end i can ditch Alarm and BroadCastReceiver then? (Since this guy waits for a internal timer set by the AlarmManager...)
By the way i dont know how "Mikuru" ended up there.
In the end i can ditch Alarm and BroadCastReceiver then? (Since this guy waits for a internal timer set by the AlarmManager...)
In theory, practice and theory are the same.
but, practically, they arent.
but, practically, they arent.
- Nandaka
- Digitalizer Editor
- Posts: 535
- Joined: Thu Aug 09, 2012 9:46 am
- Favourite Light Novel: Ahouka!
- Location: Singapore
- Contact:
Re: New Light Novel Reader Android App (In the works)
Not sure which one is the better approach as I'm also new in Android development 
I just read http://developer.android.com/reference/ ... nager.html quickly, I think your approach is better.
Probably we can schedule an alarm (non-repeating) for running the job and keep the reference in case we want to cancel/modify the interval. After the update job is complete running, we set up the alarm again.
I'll handle the update logic, maybe you can put Thread.sleep(random) as placeholder
EDIT: See http://www.vogella.com/articles/Android ... ownservice for reference

Spoiler! :
Probably we can schedule an alarm (non-repeating) for running the job and keep the reference in case we want to cancel/modify the interval. After the update job is complete running, we set up the alarm again.
I'll handle the update logic, maybe you can put Thread.sleep(random) as placeholder

EDIT: See http://www.vogella.com/articles/Android ... ownservice for reference

Visit my blog for other applications.
- Erakk
- Digitalizer Editor
- Posts: 152
- Joined: Sat Jan 21, 2012 3:12 am
- Favourite Light Novel:
Re: New Light Novel Reader Android App (In the works)
In theory, Using an AlarmManager and the BroadcastReceiver will just tell the system "Hey, set an alarm to run this service at xx:xx"
That means, only run the service when the system tells you to.
The cool thing i noticed reading is that, i don't need to check if the service is already running, it will not start a new service (intentService).
By the way: I noticed some novels not showing the volumes, two of them being
Heavy Object
Mahouka Koukou no Rettousei =P
is it the project format on BT?
EDIT: your reference (last link) is Sick/awesome =O
That means, only run the service when the system tells you to.
The cool thing i noticed reading is that, i don't need to check if the service is already running, it will not start a new service (intentService).
By the way: I noticed some novels not showing the volumes, two of them being
Heavy Object
Mahouka Koukou no Rettousei =P
is it the project format on BT?
EDIT: your reference (last link) is Sick/awesome =O
In theory, practice and theory are the same.
but, practically, they arent.
but, practically, they arent.
- Nandaka
- Digitalizer Editor
- Posts: 535
- Joined: Thu Aug 09, 2012 9:46 am
- Favourite Light Novel: Ahouka!
- Location: Singapore
- Contact:
Re: New Light Novel Reader Android App (In the works)
Those novels are using different format for marking the chapter list section.
1. The parser detect the start of chapter list by finding a span with id containing "_by" or 'Full_Text' or start with Page Name
1. The parser detect the start of chapter list by finding a span with id containing "_by" or 'Full_Text' or start with Page Name
- Heavy Object => The "HEAVY OBJECT" Series <= doesn't matches the rule 1, either they change the section title to add by, or I need to update the parser to also check if the section have Page Title in the id.
- Mahouka Koukou no Rettousei => The Mahouka Koukou no Rettousei series by Sato Tsutomu <= matches rule 1, should calling parseBooksMethod1(). Must check the log file, probably because of the book cover for each chapter?
Visit my blog for other applications.
- Erakk
- Digitalizer Editor
- Posts: 152
- Joined: Sat Jan 21, 2012 3:12 am
- Favourite Light Novel:
Re: New Light Novel Reader Android App (In the works)
Either we ask the editors to normalize the format or we modify and hope they keep it constant.
Small update:
- Fixed an annoying Orientation Lock problem
- Reduced some code
- Placeholder Icon
- Removed Preference Screen "menu". That was useless.
Apk: http://www.mediafire.com/?6qsp67669nslk8r
Small update:
- Fixed an annoying Orientation Lock problem
- Reduced some code
- Placeholder Icon
- Removed Preference Screen "menu". That was useless.
Apk: http://www.mediafire.com/?6qsp67669nslk8r
In theory, practice and theory are the same.
but, practically, they arent.
but, practically, they arent.
- Nandaka
- Digitalizer Editor
- Posts: 535
- Joined: Thu Aug 09, 2012 9:46 am
- Favourite Light Novel: Ahouka!
- Location: Singapore
- Contact:
Re: New Light Novel Reader Android App (In the works)
Change Log:
EDIT: Found a bug for the external storage, apparently I must store the folder in /"external_storage"/Android/data/<package_name>/files/, if not the gallery will parse the files and also the size won't be counted in the application page (http://developer.android.com/guide/topi ... esExternal)
- Update small screen detection to include the display density in calculation
- Update parser to handle double chapter listing, ex: Mahouka_Koukou_no_Rettousei
- Update parser, change startWith(page title) to contains(page title) ex: HEAVY_OBJECT + add contains(Side_Stor*) ex: Infinite_Stratos's side story
EDIT: Found a bug for the external storage, apparently I must store the folder in /"external_storage"/Android/data/<package_name>/files/, if not the gallery will parse the files and also the size won't be counted in the application page (http://developer.android.com/guide/topi ... esExternal)
Visit my blog for other applications.
- Erakk
- Digitalizer Editor
- Posts: 152
- Joined: Sat Jan 21, 2012 3:12 am
- Favourite Light Novel:
Re: New Light Novel Reader Android App (In the works)
And all the pictures will be detected by the Pictures app and you will have 700+ pictures there =D
I just noticed.
I just noticed.
In theory, practice and theory are the same.
but, practically, they arent.
but, practically, they arent.
- Nandaka
- Digitalizer Editor
- Posts: 535
- Joined: Thu Aug 09, 2012 9:46 am
- Favourite Light Novel: Ahouka!
- Location: Singapore
- Contact:
Re: New Light Novel Reader Android App (In the works)
... and my friend just told me that when I use his phone as guinea pig 
EDIT: Update the file path to the proper folder, you might need to move the old folder "/sdcard/lnreader_cache" to "/sdcard/Android/data/com.erakk.lnreader/files" and refresh the chapters.
Trying to play with Service, but still not working. @erakk: Can u follow the tutorial from http://www.vogella.com/articles/Android ... ownservice? Remove the intentService and just use format from the tutorial.

EDIT: Update the file path to the proper folder, you might need to move the old folder "/sdcard/lnreader_cache" to "/sdcard/Android/data/com.erakk.lnreader/files" and refresh the chapters.
Trying to play with Service, but still not working. @erakk: Can u follow the tutorial from http://www.vogella.com/articles/Android ... ownservice? Remove the intentService and just use format from the tutorial.
Visit my blog for other applications.
- Erakk
- Digitalizer Editor
- Posts: 152
- Joined: Sat Jan 21, 2012 3:12 am
- Favourite Light Novel:
Re: New Light Novel Reader Android App (In the works)
AcknowledgedNandaka wrote:Trying to play with Service, but still not working. @erakk: Can u follow the tutorial from http://www.vogella.com/articles/Android ... ownservice? Remove the intentService and just use format from the tutorial.
Just let me get home =D
In theory, practice and theory are the same.
but, practically, they arent.
but, practically, they arent.
- Nandaka
- Digitalizer Editor
- Posts: 535
- Joined: Thu Aug 09, 2012 9:46 am
- Favourite Light Novel: Ahouka!
- Location: Singapore
- Contact:
Re: New Light Novel Reader Android App (In the works)
Change Log:
- Refactor ToggleColorPref to UIHelper
- Moved preferences key to use Constants
- Change Recreate to be only triggered if there is changes in the invertColor properties (might have some bugs)
- Remove more useless Toast
- Update Logging message
- Update parser: fix null pointer exception when reach the end of page
Visit my blog for other applications.
- Koakuma
- Mikuru's Master
- Posts: 21
- Joined: Thu Sep 06, 2012 12:33 am
- Favourite Light Novel: Ahouka!
- Location: Voile, the Magical Library inside the Scarlet Devil Mansion
- Nandaka
- Digitalizer Editor
- Posts: 535
- Joined: Thu Aug 09, 2012 9:46 am
- Favourite Light Novel: Ahouka!
- Location: Singapore
- Contact:
Re: New Light Novel Reader Android App (In the works)
Koakuma wrote:Might I ask how you install this? =\
- Enable Installation from Unknown Places/non-Market Apps. Go to Settings > Security > Tick Unknown Sources.
- Download the APK to your device.
- Run/Open the APK, it will ask for installation and permission.
- Click OK, the app will be installed in your device.
Visit my blog for other applications.
- ben1234
- Lord Temporal Duke
- Posts: 3928
- Joined: Wed Jan 10, 2007 12:03 pm
- Favourite Light Novel: Ahouka!
- Location: Vancouver, B.C. Canada
Re: New Light Novel Reader Android App (In the works)
Instructions for dummies:
- Download the apk anywhere on your computer, preferably some place you can quickly get to (ie. desktop). The apk should be named "LNReader-signed-nandaka" or something similar.
- Turn on USB storage on your phone. The option should automatically pop up on the notifications after plugging in the USB cable.
- Bring up your 'My Computer' folder and open up your phone's removable storage folder. In the case that you have more than one folder, pick whichever one you want as long as you can remember which one it is.
- Drag and drop the apk from wherever you put it in your computer to the removable storage folder. When that's done, turn off USB storage from your phone.
- Download an install app or a file explorer app from the Play Store if you didn't already have one. Like this one
- Before we do anything though, you'll have to enable installing from unknown sources in the settings:
Android 2.3 and below:
Settings -> Applications -> Make sure the check box next to 'Unknown Sources' is on. It should be at the top of the list.
Android 3.0 and above:
Settings -> Security -> Scroll down to 'Unknown Sources' and make sure the box next to it is on. - Open up the app you just downloaded and look for LNReader-signed-nandaka. If you don't see it, you might have put it in your SD card so check the external_sd folder.
- Open LNReader-signed-nandaka and click on install.
- You're done!
