Mobile Development Articles

Page 77 of 156

How to create a multilevel listView using Kotlin?

Azhar
Azhar
Updated on 20-Apr-2020 414 Views

This example demonstrates how to create a multilevel listView using Kotlin Android.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.ktpackage app.com.kotlinapp import android.os.Bundle import androidx.appcompat.app.AppCompatActivity import kotlinx.android.synthetic.main.activity_main.* class MainActivity : AppCompatActivity() {    private val header: MutableList = ArrayList()    private val body: MutableList = ArrayList()    override fun onCreate(savedInstanceState: Bundle?) {       super.onCreate(savedInstanceState)       setContentView(R.layout.activity_main)       val myFavCricketPlayers: ...

Read More

How to listen for volume buttons in Android background service using kotlin?

Azhar
Azhar
Updated on 20-Apr-2020 565 Views

This example demonstrates how to listen for volume buttons in Android background service 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.ktpackage app.com.kotlinapp import android.os.Bundle import android.os.Handler import android.provider.Settings import androidx.appcompat.app.AppCompatActivity class MainActivity : AppCompatActivity() {    private lateinit var settingsContentObserver: SettingsContentObserver    override fun onCreate(savedInstanceState: Bundle?) {       super.onCreate(savedInstanceState)       setContentView(R.layout.activity_main)       settingsContentObserver ...

Read More

How to play sound using SoundPool in Kotlin?

Azhar
Azhar
Updated on 20-Apr-2020 3K+ Views

This example demonstrates how to play sound using SoundPool in 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 − Create a new Android Resource folder (raw) and copy-paste your sound file in the res/raw/filename.mp3 as shown below −Step 4 − Add the following code to src/MainActivity.ktpackage app.com.myapplication import android.media.AudioManager import android.media.SoundPool import android.os.Bundle import android.view.View import android.widget.Toast import androidx.appcompat.app.AppCompatActivity @Suppress("DEPRECATION") class MainActivity : AppCompatActivity() {    private var ...

Read More

Difference between Google Fi and Ting

Mahesh Parahar
Mahesh Parahar
Updated on 15-Apr-2020 413 Views

Both Google Fi and Ting are Mobile Virtual Network Operator, MVNO and provides telephone calls, SMS and mobile broadband services using cellular networks and WiFi.Google FiGoogle Fi offers wireless services and access to a wide range of online services provided by Google. In the US, Google Fi is available on T-Mobile, Sprint and US Cellular networks.TingTing is a wireless service provider based in Toronto, Ontario. In Ting, there is no subscription plan, users pay as per their usage. Ting ISP was launched in Feb'2012 by Tucow's Inc.The following are some of the important differences between Google Fi and Ting.Sr. No.KeyGoogle ...

Read More

How to add picasso library in android studio?

Ankith Reddy
Ankith Reddy
Updated on 27-Jan-2020 1K+ Views

Before getting into picasso library example, we should know about picasso. Picasso is image processing library and developed by Square Inc. In older days we used to write lengthy of codes to grab image from server or do process., to optimize the process picasso introduced.This example demonstrate about how to integrate picasso library in android studio.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 in build.gradle.apply plugin: 'com.android.application' android {    compileSdkVersion 28    defaultConfig {   ...

Read More

What Are The Latest Mobile App Development Trends?

karthikeya Boyini
karthikeya Boyini
Updated on 23-Jan-2020 233 Views

Smartphones have become inseparable parts of our lives as we tend to perform a whole lot of tasks every day with our smartphones such as sending messages, watching videos, listening to music and other audio content and checking emails. According to a report by TouchPoints, a cross-media, cross-device planning tool targeted at the communications industry, 2.1 billion people worldwide own a smartphone.This report further adds that smartphone owners in the age group of 15-24 use their smartphone almost every other minute. Obviously, mobile devices are going to suffer huge attention and a lot of developments are going to take place ...

Read More

How to prevent the screen from sleeping in iOS?

Mohtashim M
Mohtashim M
Updated on 16-Dec-2019 389 Views

In this post we will be seeing how to prevent screen from sleeping in iOS.So, let’s get started.Copy the below line of code in viewDidLoad method in ViewController.Swiftoverride func viewDidLoad() {    super.viewDidLoad()    // Do any additional setup after loading the view, typically from a nib.    UIApplication.shared.isIdleTimerDisabled = true }Run the application, the application will never go in sleep mode.

Read More

How to create Tab Bar Layout in an iOS App?

Mohtashim M
Mohtashim M
Updated on 16-Dec-2019 396 Views

In this post we’re going to see how one can use tab bar layout in their application.As per apple’s documentation −A tab bar appears at the bottom of an app screen and provides the ability to quickly switch between different sections of an app. Tab bars are translucent, may have a background tint, maintain the same height in all screen orientations, and are hidden when a keyboard is displayed. A tab bar may contain any number of tabs, but the number of visible tabs varies based on the device size and orientation.You can read more about the same herehttps://developer.apple.com/design/human-interface-guidelines/ios/bars/tab-bars/So let’s ...

Read More

How do I programmatically “restart” an iOS app?

Mohtashim M
Mohtashim M
Updated on 16-Dec-2019 2K+ Views

You cannot restart an iOS Application in any case, even if you’re able to do using some private api your application will be rejected by Apple and will not be considered for App store release.

Read More

How to create a file, write data into it and read data from it on iOS?

Mohtashim M
Mohtashim M
Updated on 16-Dec-2019 1K+ Views

Being a software developer we should be always aware of how to play with files, write to a file, read from the file and so on.In this post we are going to learn the same, we will be creating a file and writing the data to the file and later reading through the same file.So let’s get started, Step 1 − Create new Xcode Project → Single View Application → name it “ReadingWritingFile”Step 2 − Open ViewController.swift and add new function as show belowpublic func createAndWriteFile() { }Now we will create a file and will print the path of the ...

Read More
Showing 761–770 of 1,551 articles
« Prev 1 75 76 77 78 79 156 Next »
Advertisements