I did try the code on a Samsung 10" tablet (GT-P5100 model) and the value returned is exactly the IMEI code as reported on the back of the device.
On the same sticker there's a serial number (R31C..).
Note: the IMEI value returned doesn't contain the slashes printed on that same sticker.
I did try the code on a Samsung 10" tablet (GT-P5100 model) and the value returned is exactly the IMEI code as reported on the back of the device.
On the same sticker there's a serial number (R31C..).
Note: the IMEI value returned doesn't contain the slashes printed on that same sticker.
Hi Umberto,
I tried on my Samung Galaxy Tab 2 7.0 and the value returned isnt' the same as reported on the back of the device.
Can you please post your code?
I simply copied the code you posted in message #1 in the Activity.Create of a new project.
Here it it is the whole stuff:
B4X:
#Region Project Attributes
#ApplicationLabel: B4A Example
#VersionCode: 1
#VersionName:
'SupportedOrientations possible values: unspecified, landscape or portrait.
#SupportedOrientations: unspecified
#CanInstallToExternalStorage: False
#End Region
#Region Activity Attributes
#FullScreen: False
#IncludeTitle: True
#End Region
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
End Sub
Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
End Sub
Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
'Activity.LoadLayout("Layout1")
Dim pi As PhoneId
Log(pi.GetDeviceId)
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
May i suggest to check values showed in option "Device Info"-"Status" (italian: "Info sul dispositivo- Stato") of the Android "Settings" (it: Impostazioni)?
There you can read an IMEI value and maybe discover that the sticker is wrong..!