Sinhala Fonts for Your Android App

When you are going to develop a localized app in Sinhala the biggest problem you are facing is Sinhala support for android. So here you can find simple example how to use Sinhala fonts with your android app. For the coding example I am using Amal Sinhla font,

First start a new Android project( In Eclipse go to New -> Other -> Android -> Android Project ). Then place your Sinhla font TTF file (Amal.TTF) in the ./assets directory. Create it if it doesn’t exist. Following figure show you how it looks after you add it.

Continue Reading

How to Create a HTTP Client

In this tutorial I am going to tell you how to access HTTP resources from a java class. I am using apache HTTP Client 4.2 libraries. I have developed a simple demo web app using HTTP GET method. In that application when you pass a sentence as parameter it gives how many words are in that sentence. You can check that web app following URL.

First you need to download the required library files from click on this link. Download the HttpClient 4.1.2(GA) binary file according to your operating system. If you are using linux machine download 4.1.2.tar.gz or if you are using windows machine download 4.1.2.zip file.  Then extract the zip file and go to lib folder. In there add httpclient and httpcore jar files to your libry path.

Continue Reading