Found 1952 Articles for Apps/Applications

How to get fling gesture detection working in an Android App using Kotlin?

Azhar
Updated on 28-Nov-2020 11:29:07

576 Views

This example demonstrates how to get fling gesture detection working 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.view.GestureDetector import android.view.MotionEvent import android.widget.Toast import androidx.appcompat.app.AppCompatActivity class MainActivity : AppCompatActivity(), GestureDetector.OnGestureListener{    lateinit var gestureDetector: GestureDetector    override fun onCreate(savedInstanceState: Bundle?) {       super.onCreate(savedInstanceState)       setContentView(R.layout.activity_main)       title ... Read More

Android app Vulnerability Scanner

Ajay yadav
Updated on 29-Sep-2020 11:08:24

1K+ Views

AndroBugs Framework is an Android vulnerability analysis system that helps developers or hackers find potential security vulnerabilities in Android applications. We share our personal data through mobile apps if they are not secure its mean we not secured, let start Find vulnerability of android Mobile App - App security. Through this we can...find vulnerability in Appcheck the codeDangerous shell commandcollect information of appRequirementsBasic knowledge of LinuxApp which you testKali Linux MachineNow clone the Androbug – Framework. This framework is android vulnerability scanner tool; This tool is help-full for hacker and android penetration tester.git clone https://github.com/AndroBugs/AndroBugs_Frameworkgitcd AndroBugs_Frameworkpython androbugs.py -f /root/Desktop/Secure.apk -o ... Read More

How to get the current GPS location programmatically on Android using Kotlin?

Azhar
Updated on 28-Nov-2020 11:24:20

10K+ Views

This example demonstrates how to get the current GPS location programmatically on 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.Manifest import android.content.Context import android.content.pm.PackageManager import android.location.Location import android.location.LocationListener import android.location.LocationManager import android.os.Bundle import android.widget.Button import android.widget.TextView import android.widget.Toast import androidx.appcompat.app.AppCompatActivity import androidx.core.app.ActivityCompat import androidx.core.content.ContextCompat class MainActivity : AppCompatActivity(), LocationListener {    private lateinit var locationManager: LocationManager ... Read More

The simplest way to get the user's current location on Android using Kotlin?

Azhar
Updated on 28-Nov-2020 11:17:32

1K+ Views

This example demonstrates how to get the user's current location on 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.Add the following dependency in Gradleimplementation 'com.google.android.gms:play-services-location:17.0.0'Step 2 − Add the following code to res/layout/activity_main.xml.             Step 3 − Add the following code to src/MainActivity.ktimport android.Manifest import android.content.Intent import android.content.pm.PackageManager import android.location.Geocoder import android.location.Location import android.os.Bundle import android.os.Handler import android.os.ResultReceiver import android.util.Log import android.widget.TextView import android.widget.Toast import androidx.appcompat.app.AppCompatActivity import androidx.core.app.ActivityCompat import androidx.core.content.ContextCompat import com.google.android.gms.location.* class MainActivity ... Read More

How do I declare global variables on Android using Kotlin?

Azhar
Updated on 28-Nov-2020 11:06:04

5K+ Views

This example demonstrates how to declare global variables on 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.TextView import androidx.appcompat.app.AppCompatActivity class MainActivity : AppCompatActivity() {    lateinit var textView: TextView    override fun onCreate(savedInstanceState: Bundle?) {       super.onCreate(savedInstanceState)       setContentView(R.layout.activity_main)       title = "KotlinApp"       textView = findViewById(R.id.text) ... Read More

How to get screen dimensions in pixels on Android App using Kotlin?

Azhar
Updated on 28-Nov-2020 11:02:01

2K+ Views

This example demonstrates how to get screen dimensions in pixels on the 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.DisplayMetrics import android.view.WindowManager import android.widget.TextView import androidx.appcompat.app.AppCompatActivity class MainActivity : AppCompatActivity() {    lateinit var tvHeight: TextView    lateinit var tvWidth: TextView    override fun onCreate(savedInstanceState: Bundle?) {       super.onCreate(savedInstanceState)   ... Read More

How ListView's recycling mechanism works on Android using Kotlin?

Azhar
Updated on 28-Nov-2020 10:47:59

230 Views

This example demonstrates how to show the working of ListView's recycling mechanism on Android 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.view.* import android.widget.Toast import androidx.appcompat.app.AppCompatActivity import androidx.recyclerview.widget.LinearLayoutManager import androidx.recyclerview.widget.RecyclerView class MainActivity : AppCompatActivity() {    private lateinit var cities:ArrayList    override fun onCreate(savedInstanceState: Bundle?) {       super.onCreate(savedInstanceState)       setContentView(R.layout.activity_main)       title ... Read More

How to write a custom adapter for my list view on Android using Kotlin?

Azhar
Updated on 28-Nov-2020 08:37:42

6K+ Views

This example demonstrates how to write a custom adapter for my list view on 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.content.Context import android.os.Bundle import android.view.LayoutInflater import android.view.View import android.view.ViewGroup import android.widget.BaseAdapter import android.widget.ListView import android.widget.TextView import androidx.appcompat.app.AppCompatActivity class MainActivity : AppCompatActivity() {    lateinit var listView: ListView    var arrayList: ArrayList = ArrayList()    var adapter: MyAdapter? = ... Read More

How to show current progress while downloading a file on Android App using Kotlin?

Azhar
Updated on 28-Nov-2020 08:27:57

565 Views

This example demonstrates how to show current progress while downloading a file on 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.view.View import android.webkit.WebView import android.widget.ProgressBar import androidx.appcompat.app.AppCompatActivity class MainActivity : AppCompatActivity() {    lateinit var webView: WebView    lateinit var progressBar: ProgressBar    override fun onCreate(savedInstanceState: Bundle?) {       super.onCreate(savedInstanceState)     ... Read More

How to crop a circular area from bitmap in Android using Kotlin?

Azhar
Updated on 28-Nov-2020 08:21:49

745 Views

This example demonstrates how to crop a circular area from bitmap 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.* import android.os.Bundle import android.widget.Button import android.widget.ImageView import androidx.appcompat.app.AppCompatActivity import kotlin.math.min class MainActivity : AppCompatActivity() {    lateinit var button: Button    lateinit var imageView: ImageView    lateinit var bitmap: Bitmap    override fun onCreate(savedInstanceState: Bundle?) ... Read More

Advertisements