- Trending Categories
- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Found 2041 Articles for Mobile Development
3K+ 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
3K+ 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
204 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
326 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
4K+ Views
This example demonstrates how to parse JSON on 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.widget.TextView import androidx.appcompat.app.AppCompatActivity import org.json.JSONException import org.json.JSONObject class MainActivity : AppCompatActivity() { lateinit var textViewName: TextView lateinit var textViewSal: TextView var jsonString = "{"employee":{"name":"tutorialspoint", "salary":65000}}" lateinit var name:String lateinit var salary:String override ... 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
516 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
967 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
407 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
2K+ Views
This example demonstrates how to send a variable from Activity to Fragment 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.EditText import androidx.appcompat.app.AppCompatActivity import androidx.fragment.app.FragmentManager import androidx.fragment.app.FragmentTransaction class MainActivity : AppCompatActivity() { lateinit var editText: EditText lateinit var button: Button override fun onCreate(savedInstanceState: Bundle?) { ... Read More