Archive for January, 2009

Android Nekohtml – Project postponed

Saturday, January 31st, 2009

2Ch Android Logo

I am sorry to announce that the Html project is postponed to a later date.

Would like to complete the 2Chan browser as soon as possible, and although an Html parser would have been nice, it is not really necessary. For the 2chan browser, the parser required is quite simple and can be accomplished by a dedicated parser.

Again, sorry, and I do promise to continue this project at a later date.

One more comment on Nekohtml: If you are familiar with it, you know it requires Xerces, therefore the porting project should start from that. There is a guy who claimed he has done that, but I couldn’t find any link to the ported lib.

The Android Logo (AKA Droid Robot) was modified. Original logo is shared by Google and used according to terms described in the Creative Commons 2.5 Attribution License.

Android + Nekohtml – the Naive approach

Friday, January 30th, 2009

Nekohtml zip includes a JAR file.

Naive approach:

Add the JAR to the build path, and hope for the best.

How:

  1. Quite simple, create a lib directory under the project, copy the JAR file.
  2. Add code that access the nekohtml:
DOMParser parser = new DOMParser();

Result:

Failed!

W/dalvikvm(  170): Unable to resolve superclass of Lorg/cyberneko/html/parsers/DOMParser; (115)
W/dalvikvm(  170): Link of class 'Lorg/cyberneko/html/parsers/DOMParser;' failed
W/dalvikvm(  170): VFY: unable to resolve new-instance 196 (Lorg/cyberneko/html/parsers/DOMParser;)

Android HTML parser

Friday, January 30th, 2009

Android API has a SAX XML parser. But, what do you do when you want to parse HTML?

The SAX XML parser will work great till it encounters an XML error, a mismatched tag as an obvious example. The parser will throw an exception. You can implement the warning and error functions, but it will not help, the exception will still occur, halting the parsing process.

Therefore, the only solution is to import an external HTML parser to Android.

I have searched, read, compared and decided to use NekoHtml . Not sure how the programming team selected the name, but looks like a strong implementation.

I will document all the steps I take to include this library, until the hopefully succesful outcome.

Step 1: Download NekoHtml from sourceforge

Fujitsu to offer Android related services

Friday, January 30th, 2009

First read the news at AkihabaraNews, Fujitsu are going to offer Consulting, training, Engineering services.

The press release is here [JP], with two upcoming seminars in February. (Too bad I will arrive to Japan only at the end of February and will not be able to attend these seminars).

As Fujitsu market the Android, it is not only for Mobile phones, but as an embedded platform for several services:Point of Sale, Office equipment… almost everything ;)

Brochure [JP] is here

2 Channel browser basic design – Nichan

Wednesday, January 28th, 2009

Below the Nichan (2Chan browser) basic design:

nichan-design

MySQL Workbench on ubuntu AMD64

Wednesday, January 28th, 2009

MySQL workbench will help you design your MySQL Database.

The only problem is, binaries are not available for Linux amd64 machines. (Again, I kick myself for choosing amd64).
So, what a normal Linux guy does? – Obviously, download the source code, compile and try to run. I have done just that, created a debian package (after making sure all lib dependencies are met).

But, the workbench does not start. I get a very nice splash screen, but that’s it:

Mysql workbench

I must admit, after some more fiddling, trying, guessing, I started a Windows vitual machine (over Virtualbox) downloaded the windows installation, and it works perfectly.

Google Code Project

Tuesday, January 27th, 2009

Nothing much, but I have just created the Google Code Project for the 2Chan browser, located at: http://code.google.com/p/nichan-browser-android/

Still a mere place holder, but I hope to start Check-Ins in the next week.

Android 2Channel Browser

Tuesday, January 27th, 2009

Have just started developing a 2Channel browser for Google Android. This project will be developed as open source, and will be available at the Android Market for free.

The inspiration came from different Linux 2chan browsers as Kita2 and JD 2ch (both available for Ubuntu, using Synaptic), as well as Gikolet.(J2ME)

It is still not decided if I will reuse any of the code mentioned above. Kita2 was written in Ruby, Gikolet in Java but looks like the porting effort will be more difficult than rewriting it.

Stay tuned for this project progress as I expect I can provide a prototype in a few weeks.

Android View API inconsistency

Sunday, January 25th, 2009

Have just noticed that View.invalidate API is different than View.postInvalidate.

If I understand this correctly, functions should be very similar as they have the same goal of invalidating the view or a region, so how come invalidate can accept a Rect while postInvalidate doesn’t?

SIP stack for Android

Thursday, January 22nd, 2009

HSC has ported several communications stacks for Android:

  1. A SIP UA stack – MJSIP port
  2. RTP – jlibRTP port
  3. STUN – from jSTUN

Embedding SIP functionality into your Andoird application is now easier.

Link to HSC download page