Mobile Development Articles

Page 31 of 156

Synchronous Connection-Oriented (SCO) Link

Moumita
Moumita
Updated on 11-Sep-2020 3K+ 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

Difference between ACL and SCO Link in Bluetooth

Moumita
Moumita
Updated on 11-Sep-2020 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

The Bluetooth Link Layers

Mandalika
Mandalika
Updated on 11-Sep-2020 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

How to create pagination text in Android using Kotlin?

Azhar
Azhar
Updated on 18-Aug-2020 438 Views

This example demonstrates how to create pagination text 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.graphics.Color import android.graphics.Typeface import android.os.Bundle import android.text.Html import android.text.Spannable import android.text.SpannableString import android.text.TextUtils import android.text.style.ForegroundColorSpan import android.text.style.RelativeSizeSpan import android.text.style.StyleSpan import android.view.ViewTreeObserver import android.widget.Button import android.widget.TextView import androidx.appcompat.app.AppCompatActivity class MainActivity : AppCompatActivity() {    lateinit var ...

Read More

How to bring an activity to the foreground i.e. top of stack using Kotlin?

Azhar
Azhar
Updated on 18-Aug-2020 664 Views

This example demonstrates how to bring an activity to the foreground i.e. top of stack 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 projectStep 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 androidx.appcompat.app.AppCompatActivity class MainActivity : AppCompatActivity() {    override fun onCreate(savedInstanceState: Bundle?) {       super.onCreate(savedInstanceState)       setContentView(R.layout.activity_main)       title = "KotlinApp"       val i = Intent(this, NewActivity::class.java) ...

Read More

How to use search functionality in custom listview in Android using kotlin?

Azhar
Azhar
Updated on 18-Aug-2020 830 Views

This example demonstrates how to use search functionality in custom listview in Android using kotlinStep 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.text.Editable import android.text.TextWatcher import android.widget.ArrayAdapter import android.widget.EditText import android.widget.ListView import androidx.appcompat.app.AppCompatActivity class MainActivity : AppCompatActivity() {    lateinit var listView: ListView    var months: ArrayList = ArrayList()    var arrayAdapter: ArrayAdapter? = null    lateinit var ...

Read More

How can we get the current language selected in the Android device using Kotlin?

Azhar
Azhar
Updated on 18-Aug-2020 1K+ Views

This example demonstrates how to get the current language selected in the Android device 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.TextView import androidx.appcompat.app.AppCompatActivity import java.util.* class MainActivity : AppCompatActivity() {    override fun onCreate(savedInstanceState: Bundle?) {       super.onCreate(savedInstanceState)       setContentView(R.layout.activity_main)       title = "KotlinApp"       val textView: ...

Read More

How to use the recyclerview with a database in Android using Kotlin?

Azhar
Azhar
Updated on 18-Aug-2020 2K+ Views

This example demonstrates how to use the recyclerview with a database 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.text.TextUtils import android.view.LayoutInflater import android.view.View import android.widget.Button import android.widget.EditText import android.widget.Toast import androidx.appcompat.app.AlertDialog import androidx.appcompat.app.AppCompatActivity import androidx.recyclerview.widget.LinearLayoutManager import androidx.recyclerview.widget.RecyclerView class MainActivity : AppCompatActivity() {    private lateinit var dataBase: SqliteDatabase    override fun onCreate(savedInstanceState: Bundle?) { ...

Read More

How to run a method every 10 seconds in Android using Kotlin?

Azhar
Azhar
Updated on 18-Aug-2020 4K+ Views

This example demonstrates how to run a method every 10 seconds 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.os.Handler import android.widget.Toast import androidx.appcompat.app.AppCompatActivity class MainActivity : AppCompatActivity() {    var handler: Handler = Handler()    var runnable: Runnable? = null    var delay = 10000    override fun onCreate(savedInstanceState: Bundle?) {       ...

Read More

How to handle the click event in Listview in Android using Kotlin?

Azhar
Azhar
Updated on 18-Aug-2020 3K+ Views

This example demonstrates how to handle the click event in Listview 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.ArrayAdapter import android.widget.ListView import android.widget.TextView import androidx.appcompat.app.AppCompatActivity import kotlin.collections.ArrayList class MainActivity : AppCompatActivity() {    override fun onCreate(savedInstanceState: Bundle?) {       super.onCreate(savedInstanceState)       setContentView(R.layout.activity_main)       title = "KotlinApp"     ...

Read More
Showing 301–310 of 1,551 articles
« Prev 1 29 30 31 32 33 156 Next »
Advertisements