Posts Tagged ‘Android’

Android Developers Group Japan

Sunday, February 15th, 2009

Android Japan Continuing my Android Books in Japan post, would like to report additional Android related activities and Groups in Japan.

Android Group Japan website and Google Group are trying to bring together Japanese developers and support each other.

Twitters use the acronymos #agj for Android Related Discussions, and there many of them. 

Android books available in Japanese

Sunday, February 15th, 2009

Although Google Android phones are not available in Japan (commercially), the race to develop applications has started.

Several books are already available:

Android books Amazon

Google Android Plaform Group is being Spammed

Monday, February 9th, 2009

It appears that  Google Android Group is being spammed. Took me by surprise as I expected Google to be able to block such trivial spams.

android-platform-group

Barcodes and QR Codes for Android

Thursday, February 5th, 2009

Android Zxing

Just bumped into zxing project, and wanted to share.

According the Project Home page:

ZXing (pronounced “zebra crossing”) is an open-source, multi-format 1D/2D barcode image processing library implemented in Java. Our focus is on using the built-in camera on mobile phones to photograph and decode barcodes on the device, without communicating with a server. We currently have production-quality support for:

Now I have to think of an implementation that will use QR Codes…

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

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: Getting ARGB from a JPEG

Thursday, January 15th, 2009

With J2ME, “Opening” a JPEG into an ARGB array may look like:

Image jpegImage = Image.createImage( jpegByteArray, 0, arrayLength );
if (jpegImage == null) {
//ERROR
} else {
jpegImage.getRGB (argbArray, 0, jpegWidth, 0, 0, jpegWidth, jpegHeight);
}

Since Android does not have an Image class, the following code will produce the same results (Please note the similar API):

Bitmap jpegBitmap = BitmapFactory.decodeByteArray(jpegByteArray, 0, arrayLength);
if (jpegBitmap == null) {
//ERROR
} else {
decodedBitmap.getPixels(argbArray, 0, jpegWidth, 0, 0, jpegWidth, jpegHeight);
}

Not that different, isn’t it?

(And I know I need a better blockquote for code… working on it)

Android Activity and Networking

Wednesday, January 14th, 2009

Google has selected a new model for the Android User Interface: The Activity, which is tied to User-Interface.

Now, when someone (like me) intends to implement a UI with some  networking threads and processing, the two options are:

1) Running the Networking as a Service

2) Spawaning threads from the UI activity.

The two options are not that bad, it is just that using a Service model is an overkill for most applications, and having one activity which manages everything – UI as well as tasks seems like the easier solution.

When I started, I assumed an Activity can be anything, but as clearly stated:

(an activity that is not visible to the user and has been paused) is no longer critical, so the system may safely kill its process to reclaim memory for other foreground or visible processes

Sorry for not posting code, but this project is not an Open Source.