How to display Device Model and OS Version in Android using Basic4Android
Submitted by donbermoy on Friday, January 31, 2014 - 18:00.
Good day! This is my other tutorial on how to find and display your Android OS Version and your Device Android Model.
The version history of the Android mobile operating system began with the release of the Android beta in November 2007. The first commercial version, Android 1.0, was released in September 2008. Today, the latest Android version is the Android KitKat 4.4. The most recent major Android update was KitKat 4.4, which was released to commercial devices on 22 November 2013.
On this, you need to create two buttons and named it as "btnDeviceModel" and "btnOSVersion". Next, named your abstract design as "main". Your abstract designer will be like this one below:
Declare your variable in the Sub_Global like this:
Now your activity when run will look like this:
Next, type the following code below. That code means to display the phone device model when our btnDeviceModel will click.
The ph.DeviceModel here is the method used to display the Device Model. When you click this button, it will display like this image below:
Next, type the following code below. That code means to display the phone Android OS Version when our btnDeviceModel will click.
The ph.OSVersion here is the method used to display the OS Version of your phone. When you click this btnOSVersion button, it will display like this image below:
Here's the full code of this tutorial:
Sub btnDeviceModel_Click
Msgbox(ph.DeviceModel,"Device Model")
End Sub
Sub btnOSVersion_Click
Msgbox(ph.OSVersion,"OS Version")
End Sub
For more inquiries and need programmer for your thesis systems in any kind of programming languages, just contact my number below.
Best Regards,
Engr. Lyndon R. Bermoy
IT Instructor/System Developer/Android Developer
STI College - Surigao City
Mobile: 09488225971
E-mail:[email protected]
Follow and add me in my Facebook Account: https://www.facebook.com/donzzsky

- Sub Globals
- 'These global variables will be redeclared each time the activity is created.
- 'These variables can only be accessed from this module.
- Dim ph As ICOSPhone
- Dim btnDeviceModel As Button
- Dim btnOSVersion As Button
- End Sub
Dim ph As ICOSPhone
- ph here is our variable for ICOSPhone in which it has all the necessary libraries in using phone utilities.
Dim btnDeviceModel As Button
- we use a button to display the Device Model of your phone.
Dim btnOSVersion As Button
- we use a button to display the Device Model of your phone.
Now create a new activity. It should look like this:
- Sub Activity_Create(FirstTime As Boolean)
- 'Do not forget to load the layout file created with the visual designer. For example:
- Activity.LoadLayout("main")
- End Sub

- Sub btnDeviceModel_Click
- Msgbox(ph.DeviceModel,"Device Model")
- End Sub

- Sub btnOSVersion_Click
- Msgbox(ph.OSVersion,"OS Version")
- End Sub

- 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.
- Dim ph As ICOSPhone
- Dim btnDeviceModel As Button
- Dim btnOSVersion As Button
- 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("main")
- End Sub
- Sub Activity_Resume
- End Sub
- Sub Activity_Pause (UserClosed As Boolean)
- End Sub
Add new comment
- 49 views