Lokus-T55 SDK Help Documentation.
T55 Android SDK enables Developers to Communicate with T55 Devices. SDK will provide UTC Time Latitude Longitude Ellipsod Altitude Horizontal Accuracy Vertical Accuracy HDOP VDOP Speed Over Ground, HDOP VDOP PDOP, Date etc from T55 Device. The full project's source code can be downloaded from https://github.com/Alertware-Blackbox/T55Lib
Before started the entire operation, you have to connect T55 Device by Bluetooth Pairing with your Android Device and place the Bluetooth Address of T55 Device as a parameter for connection. For establish Bluetooth connection you may follow this piece of code.
1. Give the following permissions in Manifiest file.
2. Write this piece of code to your application class.
3. If Bluetooth is supported but disabled, then the isEnabled() method will return false and we can request the user to enable Bluetooth without leaving our application by using startActivityForResult() method with ACTION_REQUEST_ENABLE intent action parameter.
4. Android Enable Discoverability.
To make the device discoverable to other devices, we need to start the new activity by calling startActivityForResult(intent, int) with the ACTION_REQUEST_DISCOVERABLE intent.
5. Android List Paired Devices.
By using the BluetoothAdapter method getBondedDevices(), we can get the Bluetooth paired devices list.
Support for Bluetooth 4.0 on the device.
CPU architecture is on of the following: arm, arm64, x86, x86_64, mips, mips64.
To add this Device, 'com.github.Alertware-Blackbox:T55Lib:1.4' is necessary to add on your app level gradle.
Step 1: Add Dependency
Add this in root build.gradle at the end of repositories:
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
Add it to your project:
implementation 'com.github.Alertware-Blackbox:T55Lib:1.0'
Step 2: Permissions
For T55 library to work in your application, you should add the following permissions to your AndroidManifest.xml
Bluetooth and Location of the Android Device must be ON.
Step 1: Declare Library variables
Create an Application and declare two variables :
private LocationDataModel locationDataModel=null;
Step 2: Initialize Library variables
locationDataModel =new LocationDataModel (this,locationDataModel,device_mac_address).connect();
Step 3: Calling Methods to get value
Adding runtime permissions if necessary for Location above for SDK Version 23,
Introducing a Timer task with interval 3 sec., calling the bellow SDK Methods for desired value from T55 Device:
Nt: Default value for each method is 'Null'. Each will return value after Device will Connected.
(i)locationDataModel.getTime()
@Property: Get
@Return Type: String
(ii)locationDataModel.getLat()
@Property: Get
@Return Type: double
(iii)locationDataModel.getLon()
@Property: Get
@Return Type: double
(iv)locationDataModel.getSpeed()
@Property: Get
@Return Type: String
(v)locationDataModel.getAltitude_MSL()
@Property: Get
@Return Type: String
(vi)locationDataModel.getHDOP()
@Property: Get
@Return Type:
(vii)locationDataModel.getUsed_satellite()
@Property: Get
@Return Type: String
(viii)locationDataModel.getAccuracy_M()
@Property: Get
@Return Type: String
(ix)locationDataModel.getAccuracy_V()
@Property: Get
@Return Type: String
(x)locationDataModel.getVDOP()
@Property: Get
@Return Type: String
(xi)locationDataModel.getPDOP()
@Property: Get
@Return Type: String
(xii)locationDataModel.getOrtho_height()
@Property: Get
@Return Type: String