Mobile Development Articles - Page 27 of 156
2K+ Views
Bluetooth link layers define two types of data links, Synchronous Connection Oriented (SCO) link, being one of them. SCO is a symmetric, point-to-point link between the master device and the slave device connected via Bluetooth.Features of Bluetooth SCO linksIn SCO, a dedicated, point-to-point link is established between the master device and the slave device before communication starts.SCO is a symmetric link, i.e. fixed slots are allocated for each direction.Since fixed slots are reserved, SCO provides a circuit switched connection.SCO radio links are used for time critical data transfer, particularly for voice data.Both the master and the slave device transmit encoded ... Read More
6K+ Views
Two types of data links are defined by Bluetooth link layers−Synchronous Connection Oriented (SCO) LinkAsynchronous Connection-Less (ACL) LinkSCO is a symmetric, point-to-point link between the master device and the slave device connected via Bluetooth.ACL is a point – to – multipoint link for transmitting general data packets using Bluetooth connection. ACL is used for irregular traffic between a master device and one or more slave devices.Differences between SCO and ACLSCOACL1SCO provides a circuit switched connection, where a dedicated, point-to-point link is established between the master device and the slave device before communication starts.ACL is a packet oriented link, i.e. the ... Read More
4K+ Views
Radio Frequency Identification (RFID) is the application of radio waves to read and capture information stored on tags affixed to objects. RFID readers are installed at tracking points and can read information from tags when they come into range, which can be of several feet radius. A tag need not be within direct line-of-sight of the reader to be tracked. RFID is used to check identities and track inventory, assets and people. RFID tags can be attached to a variety of objects like cash, clothing, baggage, parcels, and even implanted in animals and people.Working PrincipleThere are two parts in a ... Read More
4K+ Views
The Bluetooth link layer outlines the way Bluetooth devices can use the raw transmission facility given by the radio layer to exchange information. The functions of the link layer is very close to MAC (medium access control) sublayer of the OSI model.The following diagram shows the position of link layers in the Bluetooth protocol architecture −Functions of the Bluetooth Link LayerDefining procedures for discovering Bluetooth devices.Establishing logical links between the Bluetooth devices that are communicating. One of the devices is assigned as master and the other is the slave.Broadcasting data to be sent. Managing the links between the devices throughout ... Read More
368 Views
This example demonstrates how to use SharedPreferences on Android to store, read and edit values using Kotlin.Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.Step 2 − Add the following code to res/layout/activity_main.xml. Step 3 − Add the following code to src/MainActivity.ktimport android.content.SharedPreferences import android.os.Bundle import android.view.View import android.widget.EditText import android.widget.TextView import android.widget.Toast import androidx.appcompat.app.AppCompatActivity class MainActivity : AppCompatActivity() { lateinit var editTextName: EditText private lateinit ... Read More
507 Views
This example demonstrates how to pass data between Activities on an Android application using Kotlin.Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.Step 2 − Add the following code to res/layout/activity_main.xml. Step 3 − Add the following code to src/MainActivity.ktimport android.content.Intent import android.os.Bundle import android.widget.Button import android.widget.TextView import androidx.appcompat.app.AppCompatActivity class MainActivity : AppCompatActivity() { private val myRequestCode = 1 override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.activity_main) ... Read More
1K+ Views
This example demonstrates how to call OnDestroy Activity in an Android App using Kotlin?Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.Step 2 − Add the following code to res/layout/activity_main.xml. Step 3 − Add the following code to src/MainActivity.ktimport android.os.Bundle import android.util.Log import android.widget.Toast import androidx.appcompat.app.AppCompatActivity class MainActivity : AppCompatActivity() { private val myTag = "Destroy" override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.activity_main) title = "KotlinApp" ... Read More
751 Views
This example demonstrates how to get the current date and time from the internet in Android using Kotlin.Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.Step 2 − Add the following code to res/layout/activity_main.xml. Step 3 − Add the following code to src/MainActivity.ktimport android.os.Bundle import android.widget.Button import android.widget.TextView import androidx.appcompat.app.AppCompatActivity import java.text.SimpleDateFormat import java.util.* class MainActivity : AppCompatActivity() { lateinit var calendar: Calendar lateinit var simpleDateFormat: SimpleDateFormat lateinit var date: String lateinit ... Read More
1K+ Views
This example demonstrates how to write files to the assets folder in android using Kotlin.Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.Step 2 − Add the following code to res/layout/activity_main.xml. Step 3 − Add the following code to src/MainActivity.ktimport android.os.Bundle import android.widget.Button import android.widget.TextView import androidx.appcompat.app.AppCompatActivity import java.io.IOException import java.io.InputStream class MainActivity : AppCompatActivity() { lateinit var textView: TextView lateinit var button: Button override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) ... Read More
586 Views
This example demonstrates how to use static variables in Android using Kotlin.Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.Step 2 − Add the following code to res/layout/activity_main.xml. Step 3 − Add the following code to src/MainActivity.ktimport android.os.Bundle import android.util.Log import android.widget.Toast import androidx.appcompat.app.AppCompatActivity class MainActivity : AppCompatActivity() { private val tag = "I'm a Static Variable" override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.activity_main) title = "KotlinApp" ... Read More
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP