Open In App

How to Use Text Conversion API in Android 13?

Last Updated : 26 Jan, 2023
Improve
Improve
Like Article
Like
Save
Share
Report

With the introduction of Android 13, Google introduced a wide array of Text Conversion API improvements and features to it, in this Geeks for Geeks article, we will be looking at how your app can benefit from using this new API. If you already have an idea about what the Text Conversion APIs are, this article will help you dive deep into what Android 13 brings you. Japanese and Chinese speakers frequently employ phonetic letter input techniques, which slow down functions like auto-completion and searching. 

Apps can make use of the new text conversion API in Android 13 to help users locate what they’re looking for more quickly and easily. For instance, a Japanese user previously needed to follow these steps in order to search:

  1. Enter their search term’s phonetic pronunciation in Hiragana (such as a place or an app name)
  2. To search again using Kanji characters, convert the Hiragana characters using the keyboard.
  3. Receive their search results at last.

GeekTip: Hindi and Japanese users can now write in Hiragana and instantly get live Kanji search results thanks to the new text conversion API, skipping steps 2 and 3.

New scaled transcripts in Android 13

By employing a line height that is customized for each language, Android 13 improves the display of non-Latin scripts (such as Tamil, Burmese, Telugu, and Tibetan). The improved character positioning and clipping are both benefits of the new line heights. By focusing on Android 13, your app can benefit from these enhancements. Test your apps after utilizing the new line spacing because it’s possible that it will modify how your user interface appears in languages other than Latin.

Several Unicode Improvements and Newer Introductions

The most recent updates, corrections, and modifications included in Unicode ICU 70, Unicode CLDR 40, and Unicode 14.0 are added in Android 13.

Here are a few noteworthy changes:

  • When English (United Kingdom) en-GB translation resources are not accessible, both English (Canada) enCA and English (Republic of the Philippines) enPH employ English (United States) en translation resources.
  • For Spanish (es), Italian (it), Portuguese (PT), and Portuguese (es), many plural categories have been added. This is used for huge numbers and is similar to the French that was included in CLDR v38.

Recently, Unicode ICU 70 was made available. Unicode 14 has been updated with the addition of new characters, scripts, emojis, and associated API constants in ICU 70. Support for emoji attributes of strings is included in ICU 70. Additionally, it includes numerous changes and corrections to the CLDR 40 locale data. ICU 70 also provides numerous bug fixes and enhancements, particularly for formatting measurement units.

Introductions to non-Latin scripts

Android 13 enhances the display of non-Latin scripts by using a line height that is specific to each language (such as Tamil, Burmese, Telugu, and Tibetan). Both better clipping and character positioning are advantages of the new line heights. Your app can take advantage of these improvements by concentrating on Android 13. After implementing the new line spacing, test your apps to see whether it affects how the user interface looks in languages other than Latin. 

How to Describe contents used in Text

If you want to describe your text in your TextView apart from hindering the views you can use this method and call this where you want to add the description to your text, thus you can describe what the textView is about. To do this, simply add this line wherever you want to add a description:

Java




// Use this to describe
// content to your textView
public int describeContents ()


Conclusion

These are all the new inclusions and updates to the Text Conversion APIs, Android 13 opens up a plethora of different stuff around the TextViews and finally adds the long-awaited text description functions that some of the developers were waiting for a long time.


Like Article
Suggest improvement
Share your thoughts in the comments

Similar Reads