Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does 'ICU' stand for in Android SDK?

Have seen new packages in Android SDK docs. All of them are available in API level 24 which corresponds to Android Nougat and seem to replace the 'java.xxx' packages by 'android.icu.xxx'. For example:

The java.text.DateFormat package is duplicated in android.icu.text.DateFormat and so on

Also, in some icu classes appears the following annotation:

[icu enhancement] ICU's replacement for (class name). Methods, fields, and other functionality specific to ICU are labeled '[icu]'.

So, what does ICU stand for? And what are differences between java and android.icu packages? Will java packages be deprecated soon?

like image 694
BamsBamx Avatar asked Aug 06 '16 00:08

BamsBamx


People also ask

What is ICU in Android?

Android leverages the ICU library and CLDR project to provide Unicode and other internationalization support. This document's discussion of Unicode and internationalization support is divided into two sections: Android 6.0 (API level 23) and lower, and Android 7.0 (API level 24) and higher.

What is ICU4J?

ICU4J is an add-on to the regular JRE that provides: Collation – rule-based, up-to-date Unicode Collation Algorithm (UCA) sorting order For fast multilingual string comparison; faster and more complete than the J2SE implementation.


2 Answers

This explains the notion of icu pretty well. They've basically introduced this for the later API's to "reduce your APK footprint". I don't think that the ICU is a replacement for the java.*.* libraries but is just an alternative to use. There is also one interesting thing on that page:

As the ICU team deprecates APIs in the future, Android will also mark them as deprecated but will continue to include them.

Here is also a little list of features about ICU4J which is quite helpful.

like image 82
px06 Avatar answered Sep 28 '22 05:09

px06


ICU stands for International Components for Unicode

http://site.icu-project.org/

like image 30
bTheHelper Avatar answered Sep 28 '22 05:09

bTheHelper