-2

I need some functions from Android public class android.telephony.PhoneNumberUtils in Delphi.

Specifically, it is a function formatNumber(String phoneNumber, String defaultCountryIso).

Someone advise me how to solve this problem?

KJAN
  • 227
  • 4
  • 15
  • I do not know (or rather do not understand) why get evaluation questions '-' without a single comment ... – KJAN Dec 07 '15 at 13:47
  • Using Java libraries is covered extensively in the [documentation](http://docwiki.embarcadero.com/RADStudio/Seattle/en/Using_Java_Libraries_in_Your_RAD_Studio_Android_Apps), and the IDE even includes tools to help you do so. The [Telephony library](http://docwiki.embarcadero.com/RADStudio/Seattle/en/Using_the_Built-in_RAD_Studio_Java_Libraries_for_Android) is already provided for you as part of the Android support. What specific part of that are you having difficulties with? – Ken White Dec 07 '15 at 13:56
  • I'm a newbie in Delphi (for Android). Could you somehow illustrate some advice? I can use library Androidapi.JNI.Telephony, but I can not find a sub-library PhoneNumberUtils (in Androidapi.JNI.Telephony). – KJAN Dec 07 '15 at 14:08
  • It's simply - use TJPhoneNumberUtils.JavaClass.formatNumber() – pudnivec74 Dec 07 '15 at 14:48
  • The *sublibrary* is a *class* (`TJPhoneNumberUtils`) located in the `Androidapi.JNI.Telephony` unit. – Ken White Dec 07 '15 at 21:52

1 Answers1

0

Use TJPhoneNumberUtils.JavaClass.formatNumber().

All other function used in Android.Telephony.PhoneNumberUtils you can find in TJPhoneNumberUtils.JavaClass

pudnivec74
  • 845
  • 1
  • 8
  • 22