Search This Blog

Tuesday, November 13, 2007

The Applicability for Arabizing Android

Peace be upon you

did you hear about the new Google framework for mobile, well there is something new called Android, this thing is really cool , I recommend that you read more about it

anyways , lets get back to out target , I was looking for something that make me able to show Arabic words on this device "right now it's Emulator", and ALLAH bless me to find away to do that, I wanna show you the sample of what I have got

as you can see

Fig.1 - show the sample without doing anything

Fig.2- show the sample after installing the Arabic font

Fig.3- show the sample with Arabic font and reshaped string

I will explain later the details of this operation and how to do it, as I am so busy delivering a very huge project I can't do anything right now, so please pray for me to have some free time, and isA I will do my best to help you all in this issue, thanks for your time

THANKS MOHAMED MOHSEN ( he told me that there is something called Android :D, which means that I am ignorant, he is really very smart guy and very knowledge rich ) again thanks to you Mohamed and I hope you have a huge progress in your career

Have a nice life :)


Amro said...

Asalamo alaykom...

Well done Ahmed ,it's always good to do something new that people haven't yet had hands on it, in other words to take the effort of being the first one to doing this ...

God bless you and your soulMate(wife) :)

MoMohsen said...
This comment has been removed by a blog administrator.
MoMohsen said...

Thanks Ahmed for your was really a good work to able to support Arabic for Android , i like this device and i think it will be a start of new generation of open source devices which will make it really a good competitor to all existed devices in market now...waiting for the full software of your Arabization software.

narnouri said...

Can you please guide me through step three, or give me hints at least (is it related to font, Android SDK , etc.)

Ahmed Essam Naiem (Neo_4583) said...

Peace be upon you

NarNouri, Welcome I am so happy that there is someone interacting with this post, anyways, you were asking about the 3rd step in writing something in Arabic

simple you will have to do some kind of Reshaping that's all, I have done this Functionality in the Open source project that I have done here is link for it
the project is written in C++, I think you will have to extract it and rewrite it in Java, or if you give me some time I could do it for you, the problem that I am so busy, anyways search for the reshape function and do as it is in Java also I have explained in more detail how Arabic works here is link for it

Please if you need more help don't hesitate to ask, also if you want to talk online put your Email and don't worry the comments are moderated and I will not publish yours :D, Thanks for your time

Ahmed Essam

Amr Ismail Gawish said...

well thats really great thing.

I wanted to do this thing to android, guess u headed before me...

Just need to provide applications for Hijri Dates which should support arabic u know...

So if possible to show me the steps to do this so, or send me email with code - if possible - I would be grateful we Rabena yegazek 3anha inshaAllah

Ahmed Essam said...

Peace be upon you

As I mentioned there is no big deal problem with the Arabic in Android, it is just reshaping.

Regading to the Hijri Calender check out this links

ALLAH bless you

Amr Ismail Gawish said...

thanks for the quick reply.

God bless you

Ahmed Essam said...

Regarding the font copying

in the newer version of the emulator I found that the ability to copy files to system folders has been locked

anyways, if you can copy font files to "/system/fonts" the arabic will appear

there is one issue, u have to rename the font files to

DroidSans.ttf and DroidSans-Bold.ttf

I suggest that you use "Tahoma" with Arabic support

Amr Ismail Gawish said...

Salamo Alikom

well i did that with the arabic transparent font type and it didn't work, anyway i found another way to do it without having to override the existing SDK fonts because that wont be something really available when it comes to a real android mobile phones.

Instead i copied the file to my assets folder and using the asset manager i had the .ttf as an inputstream and passed it to the font class...

And it WORKED, your java class worked but still there are some errors concerning the position of the letters, and the ALF-Lam thing also.

So if you don't mind i'll try to fix that, and if u have any tips concerning that, it'll be highly appreciated...

and thanks for that great blog :)

Ahmed Essam said...

Peace be upon you

I will be glad if you did modify it, and I will be much happier if you post the modification to the Source Forge project that has the class

also I hope to see your final application, it will be nice if you send some snapshots

Thanks for your time.

Amr Ismail Gawish said...

Salamo Alikum,

of course I'll post the modifications if anyone want to use it, and in sha2 Allah I'll give u a snapshot of the program and in sha2 Allah ur name will mentioned as a participant of honor, i hope you don't mind that... :)

ammora said...

salam alikum....
mashallah brothers great effort.. i just got the G1 and was looking for the arabic language support... how can i install the language.... hence i;m not a programer nor do i undrestand any..although i would love to learn how to program for mobile applications..

for now, will you guide me on how to install arabic to my mobile?


Amr Ismail Gawish said...

Salamu Alikom

well ammor i need a piece of device to test to get my first beta version and to give it a real live test.

If u tell me how to buy it online or where are you from, maybe i have friends in there to help me buying it, I'll appreciate it, and inshaAllah i'll inform you about the first arabic version [keyboard and arabic message support -at least- inshaAllah] as soon as possible

Ahmed Essam said...

Peace be upon you

First of all, it is very nice to see how much people active about something like Android.

Then, About the Arabic enabling I don't think that it will be Easy task, for many reasons, first you have to have the system to be able to copy your font files, I mean, if you want to do Arabic enabling for the whole system it will need something like that.

The issue with Android is not a big deal it is just matter of "Fonts and Reshaping", so I think may be in the next few releases it will has the Arabic Support.

If you want to get the Android Device you will have to get it from T-Mobile and as I think it is only in USA, and the device is sold with the Network bundle

the device name is G1, T-Mobile G1 it is produced by HTC and HTC call it "HTC Dream".

I am happy for what you are doing, for initial start I think you can do small application that reads and sends the Arabic SMS, isA it will be easy task.

for the whole system I don't think it will be easy, as I told you before, the system has been locked to copy files or delete files that is related to system,
but I think there is a back door for it.

I hope that you success on that you are doing.

ALLAH bless you all.

Ahmed Essam

Google Fan said...

Al Salam Alaykom,

Ahmed can you please share with us your progress on makiing the arabic software available for Android platform.

I have bought a number of G1 phones and i need arabic support urgently on these devices so please contact me on if you have anything ready.


Ahmed Essam said...

I have allowed to let others see your post, in case someone have ready solution for you.

I didn't understand what do you want exactly,
Do you want to have "Full Arabic Enabled System"?
OR you want certain application to support Arabic.

Anonymous said...

Well thank u ahmed for the effort uve been doing what we need is atleast to get the arabic font into our g1, to read sms even if the letters r saperated !

Anonymous said...

Well let's say you have root access if the system, if we copy the fonts it will only read seperated letters. What else to do to get full arabic word read?

Ahmed Essam said...

After copying the files you will just need to do reshape for the for the string, to look like regular Arabic, I have done small class that do that reshape, I think someone will use it in his application.

as recommendation, you can rebuild the browser and SMS reader to have the Arabic support on the open source parts of the system, I think Android is open source Operating System for devices, so you will be able to get this things and build it for the target devices.

Amr Ismail Gawish said...

Exactly Ahmed,
I already made an application that can read all sms's in arabic and write notes in arabic.

I'm also developing one for the hijri and Prayer times.

I just need to test them all on reality thats all :)

--note: i still have a problem in the lam alef

Ahmed Essam said...

Peace be upon you

How are you Amr? Please send me sample application with problem and I will fix the Lam Alf issue, I have fixed it in the C++ version of the library that I have put on the SourceForge.

Anyways, send me application that display Arabic word with the class and resources and I will fix it and send it to you,

I am so sorry but I am really busy and I will just fix it and send it back

if you would like to send to me please send to this mail

Mr. B said...

"Amr Ismail Gawish said...

Exactly Ahmed,
I already made an application that can read all sms's in arabic and write notes in arabic.

I'm also developing one for the hijri and Prayer times.

I just need to test them all on reality thats all :)

--note: i still have a problem in the lam alef
December 13, 2008 2:08 PM "

Asalamo alaykom...
first, it was so good to hear that there are people working on this. but about SMS and notes applications that you made, are they in the android market in HTC drea "G1" or are they for personal use??
Thank you very much for your effort. :)

muaz said...

Ma sha allah brothers if we can see this in the g1 that's will be realy great. But we realy needed
Thanx and allah yasheel

Ahmed Essam said...

The point of doing Notes application is to add the Arabic support as reading and writing, I doubt that there is any Arabic enabled Notes or SMS Reader.

Regarding Adding Arabic Support to the base ROM of the Android, I think it will be hard for the reason of that the device is Locked in manner of reinstalling anther OS,
If you want to do such thing you will have first to let the device warranty and start doing some reverse engineering

Amr, I am sorry for latency I have some exams this days and I can't work right now in the Alf Lam issue, but I promise I will do it for you as soon as possible

Mr. B said...

if you are talking about getting access to the phone system files to modify them and add certing things to the system in order to make it compatible with teh arabic layout, then you can do this in the G1. You can get root access to the system files on the G1 to modify the OS without creating a new one. Will that help?

Ahmed Essam said...

Of course it will help, I don't know if the file system are open or not on the G1 but on the emulator it is closed and I can't copy files to the system folders

other point, I mean by hardware lock is I can't change the whole OS, anther ROM this what I mean

if you have some way it will be nice if you share it

Amr Ismail Gawish said...

Salamo Alikom
Mr.B: I already a registered developer in android market, but i didn't publish my applications yet, As I said before i need to give it a real Time action Test.

As for adding Arabic Support fonts to the Android System, It's not needed, I made my whole applications without needing to access the system in anything at all..

ps: Ahmed sorry for the late response about the لا إله إلا الله Application, I'm just busy myself :\, bas isA when i'm free enough i'll send it to you.

Abdullah said...


i am not sure how far are you Amr from completing your apps, i have a G1 with RC-28, any build less than RC-30 would allow root access! i could test your app on my phone if you want.

on the other hand, here is a modified rom of the G1
you can edit change then zip and sign it, then you can upgrade. playing with the current system file will brick the phone, unless you reinstall.. hope this would help someone.

God job everyone, Allah bless u all

Mohammed said...

Salaam All,
Wow its realy great to know that all of you are trying your best for to suport Arabic for G1, well I will be very greatful if some one can help me in this, please let me know how to do it as well.
Please don't forget to email me for Arabic SMS for G1 my email is:
May Allah Bless you all.

Anonymous said...

alsalam alykom

Ahmed, would you please explain how were you able to apply it to the whole android system, where do you use the rearranging class and which function, i am able to add the the fonts but characters are separated but readable! how did you do it with the simulator?

thank you

my email is

Ahmed Essam said...

I didn't get your question right.

If you are asking about the sequence of doing the Arabic, I think I have said it many times in the comments and the post, other wise, please clarify to me what you are asking about

Abdullah said...

Thanks for getting back to me, my questions is: after adding the new fonts, how can i use the your class to reshape?
what function do i call, ArabicReshaper(String UnshapedAra) has no return! i am sorry if this sounds stupid, but would you elaborate?

thank you

Ahmed Essam said...

I am the one who should be sorry, the class is not very complete, so the result will be in the _RetString member variable, so all u have to do is change the ArabicReshaper signture to

public String ArabicReshaper(String UnshapedAra)

and return thr variable "_RetString"

Or you can add funtion named "GetResultString" like this

public String GetResultString()
return _RetString;

Thanks for your time and I am sorry again that it is not completed.

Amr Ismail Gawish said...

Salamo Alikom,

I should apologize on the behalf of Ahmad Essa, I said i should give a full demonstration but i've been lately busy, but isA i'll do it asap.

Amr Ismail Gawish said...

Dear All,

Here is an article on how to make the Arabic work in android, with help of your Reshaper file Ahmed.

Will upload the whole solution as soon as I prepare it isA.


Ahmad said...

alsalam alaykom

can i have copy of the if possible my email is, just to contribute writing some useful applications for arabic speaking ppl.

Ahmed Essam said...

You can find the class here in this link

Amr Ismail Gawish said...

Dear Ahmed,

I just felt like i need to say Thank you for your effort with me, as now I introduced my First Arabic SMS Reader to the Market you can check it in :

Thank you so much, and God bless you inshaAllah in your work

Ahmed Essam said...

Did u put it on Android Market?
it will be better to put it there, by the way it will be better if you u replaces the orginal inbox application, I think it can be done, but it needs user to do that, so u can put instruction in the application to do something like that

Thanks for your time.
Ahmed Essam

Amr Ismail Gawish said...

Yes I actually posted it in the market.

And isA i'll be replacing the actual Inbox or at least to override the Reading functionality of the original Inbox

Ahmed Essam said...

I recommend you to get the orginal SMS and contacts source code application and add the ArbaicReshaper Class and glu them together.
u can find the source code as u know Google Android is open source I have downloaded the soruce code recenlty and I saw that it has everything you will need

by the way I decided to enhance the perfromance of the Arabic Reshaper to make it work much faster with less memory, pray for me to have some extra time to do it.
thanks for your time.
Ahmed Essam

Amr Ismail Gawish said...

Thats a great news to hear.

Waiting to see your work :)

Ahmed Essam said...

Here is some interesting links you can start with

Contacts application
MMS application
Phone Application;a=tree;f=src/com/android/contacts;h=553d6abba2e4e8ea1306dd35fb9f8de77ab1ae55;hb=release-1.0;a=tree;f=src/com/android/mms;h=1f345c4ca2a41a87213435c1fa2b7615a010ffa6;hb=release-1.0;a=tree;f=src/com/android/phone;h=feddbccb012606405399fa44fc3b2f3143a74a74;hb=abc47110c17fa8e8cb6161bc045e87f31eeb7a1c

Enjoy your time with the AMAZING open source system.

ALLAH bless you.

Ahmed Essam

Anonymous said...

Good job man ... please continue working on this and post it as an application in the android market so you can be wealthy and we can use our G1 phones. I will pay for this if you work on it :) please don't stop

Ashraf said...

Assalamu Alikum Ahmed Essam,

I was wondering how can I get in touch with you.


Ashraf Eid

Ahmed Essam said...

For anyone who want contact me, send your email in reply, and I will not publish it and I will contact you, or u can contact me through facebook, my profile link is the most bottom on the right

helperF1 said...

Hey Ahmed I just wanted you to know that your work was really really great.

I've used your open source ArabicShaper class in my version of the Android Rss Feed reader

You can see more about this here:

ps. this is a cross post to Amr Website too.

mooosa said...

Well done guys and keep it up !!!
actually i'll buy the HTC Hero inshaallah !!
so do u think its support arabic with the new UI HTC Sense !!?

Ahmed Essam said...

Well, I don't think that Hero support Arabic by any means.
But what I can tell that there is pretty good tries to add the Arabic Support from Linux guys, I heard some rummers that some Linux Pros are working on it, but this is not sure.

From where you are going to buy Hero, I really would like to check it out.

Bashar said...

This post from HTC hero and no Arabic support yet :(

I'll test ant's solution in fee and see how it goes :)

Frost said...

Alslam alaykom,

I know your post is 2 years old but it is very nice and it is very informative.

Android devices and the demand on these devices are increasing significantly these days and they rival the Iphone 4g.
Such as the Samsung Galaxy S (GT-I900), which is a very popular android device.

So I want to know how to add the reshaper or your class to the system not to a specific application so it can read Arabic?

I already added the fonts in the /system/fonts and the arabic messages I receive from other (SMS, Facebook, browser) are showing the letters but separate.

I found that there are people are doing custom ROM with arabic but they didnt show us how they done it and they unfortunately dont reply. And I dont want their ROM.

I dont want to develop an Arabic application. I just want to read any thing Arabic that pops in my phone.

If you please consider me as a small kid with very very small amount of programing skills, and explain to me how to do it.

Samsung have thier system opensource
you will find it under mobile-->GT-I900

Currently they are running android 2.1 and 2.2 will be released this month. but i want to know how to apply it to 2.1.

I know you are a busy man and wrote lots of stuff and requests but I hope you will help us godfather Ahmed.

kind regards

Ahmed Essam said...

thanks Sami

I am sorry for the late reply.

I have checked Samsung source code and it was shocking to me, the people have done great work in adding Arabic support.

The fact of the matter when I took the same pattern of code and search on HTC code I found same code base which refers to some source code that is taken fro IBM written by someone called Ayman

regarding doing ROM that support Arabic, I don't think that it is applicable for simple reason, Android code base now is 1.6, the latest releases of Android is not released to the public, so using this code will end up with screwing up the devices and will not help anyone.

one more thing to let you know, I know someone who had been told that Arabic will be released by Google next year, no need to put effort in such thing.

GOD bless u :)

Ahmed Essam