Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
-
Economics & Finance
Mobile Development Articles
Page 20 of 156
How to upgrade your smartphone to android m
The latest version of Android, Android Marshmallow, is often referred to as Android M. Android M comes with a lot of new cosmetic upgrades for the phones along with many bug fixes. Android M comes with new features like refined permissions, simplified volume controls, improved copy and paste function, Google Now on Tap, and Android Pay.Not only that, it also has an built-in fingerprint scanning support and many other new enhancements which makes it a highly desired smartphone OS in 2016. Android M, being the desired smartphone OS used by the majority of the community, is almost a must-have for ...
Read MoreWhat are the various Smartphone Sensors?
The different types of sensors used in our smartphone are as follows −Monitor sensorEnvironmental sensorPositional sensorAmbient lightProximity sensorGravity sensorGyroscopeLet us discuss each sensor in detail.Motion SensorIt helps us to monitor the motion or movement of a smartphone. It measure the acceleration and gravitational forces on all the axis of the deviceFor example: Accelerometer, GyroscopesThe abilities of Motion sensor that allows us to accomplish are given below −The Motion sensors can be used for determining all the movements of the phone, like tilt, shake, rotation, or swing.Along with positional sensors, it can be used to accomplish the position of a phone ...
Read MoreWhat are the advantages and disadvantages of Long Term Evolution (LTE) technology?
The Long Term evolution is one of the standards for high speed wireless communication for mobile devices and data terminals based on the GSM and HSPA technologies. It helps in increasing the capacity and speed by using a different radio interface with core network improvement.LTE is an upgrade path for carriers with both GSM/UMTS networks and CDMA 2000 networks. The LTE frequencies and bands used in different countries mean that only multi band phones are able to use LTE in all countries where it is supported.There are two types of LTE which are as follows −LTE-TDDLTE-FDDLong-Term Evolution time-division duplex also ...
Read MoreWhat are the differences between Thunderbolt and USB-C?
Let us understand the concepts of Thunderbolt and USB-C before learning the differences between them.USB-CIt is an industry-standard connector for transmitting the two information and force on a solitary link. It includes another, littler connector shape that is reversible so it's simpler to connect. USB-C links can convey essentially more force, so they can be utilized to charge bigger gadgets like PCs.Most electronic gadgets, for example, PCs and other PC gear will incorporate at any rate one standard USB Type-A port, so any reasonable person would agree that USB connectors have been around for quite a while. Littler gadgets like ...
Read MoreHow to find the number of repeated values in a Kotlin list?
In this article, we will see how to find the number of repeated values in a Kotlin list.Example – Finding Repeated Values Using groupingBy()The Kotlin library provides an inline function called groupingBy() which creates a grouping source from an array to be used later with one of the group-and-fold operations using the specified keySelector function to extract a key from each element.The function declaration of groupingBy() looks like this −inline fun Array.groupingBy( crossinline keySelector: (T) -> K ): GroupingIn this example, we will create a list of values and implement groupingBy() in the list.fun main(args: Array) { ...
Read MoreHow to create a mutable list with repeating elements in Kotlin?
A Mutable List is an interface and generic collection of elements. Once a collection is declared as mutable, it becomes dynamic and we can modify its data as per requirement. A mutable list grows automatically in size as we insert new elements into it. The Mutable List inherits form the Generic class.Example – Creating a Mutable List in KotlinIn order to create a mutable list of repeating elements, we will be using Kotlin List(). By definition, it looks like this−inline fun List( size: Int, init: (index: Int) -> T ): ListAs we pass an initial default value, ...
Read More@Throws Annotation in Kotlin
The concept of exception in Kotlin is very much same as it is in Java. All the exceptions in Kotlin are the descendants of the Throwable class. @Throws annotation indicates what exceptions should be declared by a function when compiled to a JVM method.Example – Throwing exception using a methodIn this example, we will create a scenario where we will generate a logical arithmetic exception, but we will try to throw a different exception using the @throws annotation and a function call.import java.io.* import kotlin.jvm.Throws fun main(args: Array) { val item=0 var result=0 try { ...
Read MoreHow to initialize List in Kotlin?
List denotes a List collection of generic data type. By , we understand that the List does not have any specific data type. Let's check how we can initialize such a collection in Kotlin.List can be of two types: immutable and mutable. We will see two different implementations of initializing List.Example – Initialize List ~ Immutable ListOnce a list is declared as Immutable, then it becomes read-only.fun main(args: Array) { var myImmutableList = listOf(1, 2, 3) // Convert array into mutableList // Then, add elements into it. myImmutableList.toMutableList().add(4) // myImmutableList is not a ...
Read MoreHow to replace duplicate whitespaces in a String in Kotlin?
In order to remove extra whitespaces in a string, we will use the replace() function along with toRegex() function from the String class. To replace all the consecutive whitespaces with a single space " ", use the replace() function with the regular expression "\s+" which matches with one or more whitespace characters.Example – Removing extra whitespaces in KotlinTake a look at the following example −fun main(args: Array) { var myString = "Removing ex tra spa ce from String" println("Input String: " + myString) // removing duplicate whitespace println("Extra whitespaces removed: " + myString.replace("\s+".toRegex(), " ...
Read MoreHow to use Java's bitwise operators in Kotlin?
Kotlin provides a set of bitwise operators that we can use on integers. These operators can be applied only to Int and Long type variables. Here is the list of bitwise operations available in Kotlin −shl(bits) – Signed Shift leftshr(bits) – Signed shift rightushr(bits) – Unsigned shift rightand(bits) – Bitwise AND operatoror(bits) – Bitwise OR operatorxor(bits) – Bitwise XORinv() – Bitwise inversionKotlin does have functions for each of them.Example: Bitwise Operators in KotlinThe following example shows how you can implement the bitwise operators in Kotlin.import java.lang.* fun main(args: Array) { val value = 5 println("Input value: " + ...
Read More