( ) Android. , .aidl, , . , - Country detectCountry();, android.location.Country(frameworks/base/location/java/android/location/Country.java AOSP). , , ( getSystemService ( "country_detector" )).
, :
shell@flounder:/ $ service call country_detector 1
Result: Parcel(
0x00000000: 00000000 00000001 00000002 00530055 '............U.S.'
0x00000010: 00000000 00000003 1d809dda 00000000 '................')
Serialization of objects is basically nothing more than a two-letter country code (here: USA), source (here, 3, implying that it was taken from Locale), and a timestamp (1d809dda ...), which really is important. You do not need to worry about serialization because the object is Parcelable.
source
share