I got the method for Samsung Galaxy Ace to get serial number:
String serial = null;
try if {
Class<?> c = Class.forName("android.os.SystemProperties");
Method get = c.getMethod("get", String.class);
serial = (String) get.invoke(c, "ril.serialnumber");
} catch (Exception ignored) {
}
Please, rewrite code for Samsung Galaxy Ace Smartphone in your next updates. Thank you so much. By the way, in ASUS MEMO HD7 tablet is everything OK. Serial is OK.
PS. As I understood this method is for devices with Radio Interface Layer ("ril.*"). So that it's for you to think how check if the device supports telephony. And if so, display this method, but else dislpay another ("ro.*" or "sys.*") I tried make that in my project, and I had success.