In versions of android later than 3 you do not need anything, but in earlier versions you have to add Farsi.java to your application and write the text in the code as follows:
MyTextView = (TextView) findViewById(R.id.MyTextView); Typeface tf = Farsi.GetFarsiFont(this); MyTextView.setTypeface(tf); MyTextView.setText(Farsi.Convert("سلام"));
you cannot write farsi text in xml files in earlier versions !!! therefore, I suggest using newer versions of android.
source share