Saturday, January 5, 2019

Securing Your Android Device

Securing Your Android Device

Today, smartphones literally define us by being our portal to our online identity and should therefore be treated with utmost care and secured against online thefts. In case you are not careful with your smartphone, loss of your device can mean more than just losing your contact numbers. It leads to invasion of your synced files, emails, photos, messages and social media accounts. Your entire personal information can be downloaded and shared over the world wide web for your lack of security. Therefore it is mandatory that you secure your mobile device with the latest applications and through other additional measures.

Your Android phone is a high-tech and a powerful smartphone, that typically allows you to run your office, financial transactions and entertainment needs from your hand held device. As such it carries your virtual identity, which should in all cases should be secured to the best.

Here are some tips to tighten security on your Android device:

Set a strong screen lock - The most important thing any smartphone user can do is set a unique, strong passcode or swipe pattern to prevent any undesired  access to the device. It is advised not to use very obvious codes such as pet's name, your birthday instead use alphanumeric combinations which are difficult to crack.

Alternative unlocking methods - All latest Android devices come with advanced security tools for an additional layer of protection. These include features such as iris scanning, fingerprint authentication and facial recognition. These features can be activated for extra security of your phone.

Use Android In-built Security - If you are running on Jelly Bean, you can use screen lock and encryption together to further enhance the security of your device. There are also different types of screen locks available for you to choose from such as pin, pattern, password, and face unlock, in your Android settings.

Lock Your Apps - It is absolutely necessary to lock your apps, especially the apps which hold private information . This adds a second layer of security to prevent anyone hacking into your lost device particularly if they have managed to unlock your Android.

Encrypt Your Phone -  Encrypting your device protects your confidential data by converting it into a format that prevents unauthorized individuals from accessing it without the key. This is important if in case someone manages to unlock  your lock screen and retrieve data from your device. Android devices which run on Lollipop or higher versions have full encryption enabled by default. In case you are using an older version of Android, the encryption is listed under Security.

Use anti-virus software - Although, Google Play Protect does a good job in protecting your phone, but when it comes to malware protection it is good to have an anti-virus software.

Enable Find My Device - It is  always good to enable Google’s Find My Device locator service. This service  that allows you to track or wipe data from Android phone if it gets lost or stolen. All you have to do is sync your Google account to your Android device and turn on the location feature to enable find my device service.

Use Private Networks - To keep your Android device safe from hackers and malware, stick to using private internet connections and avoid using free Wi-Fi. Open public networks do not have adequate security and your data can easily be hacked.

Prepare A Backup Of Your Data - Always backup your data, because if your Android device gets stolen and you have to remotely wipe your data then you can always retrieve your data from the backup.

It never hurts to ensure extra security of your device. If you implement these suggestions, your phone along with your information will be more safe.



Kotlin : The Next Generation Programming Language for Android.

Kotlin : The Next Generation Programming Language for Android.


Kotlin is relatively new programming language developed by JetBrains. The language has gained immense popularity in the developer's community on account of its features. It is an open source, general purpose, statically typed, Java compatible programming language, which runs like a charm on Java Virtual Machine. JetBrains has also developed intelliJ IDEA and JetBrains IDE. Android Studio is based on JetBrains IDE, this makes Kotlin an ideal choice for Android development. Only an year after the launch of Kotlin, Google announced its official support to Kotlin on Android and credited it to be a first-class language.

At first glance, Kotlin looks like a streamline version of Java, it is statically typed and object-oriented like Java but it offers more than what Java offers to developers. It has many new functional programming features, clean syntax and many other enhancements over Java.

Let's see what Kotlin offers to the developers -

  • Kotlin is Open Source - The language is open source and allows you to swiftly convert any existing Java code with a single click tool. 
  • Java Interoperable - The highlight of this language is that it is fully compatible with Java. It uses Java libraries, Java tools  and runs smoothly on Java Virtual Machine. It also offers backward compatibility for older versions of Java.
  • Kotlin Compiles to JVM Bytecode - Kotlin easily compiles JavaScript or JVM bytecode, JS and Java.
  • Kotlin Data Classes - In Java, a simple data class is loaded with excessive code which one needs to skip in order to find out the real purpose of that class. However, in Kotlin the same Java code can be written in a simple manner, thus saving loads of code typing exercise.

In Java, it is common practice to first create a model class with getters and setters, but in Kotlin you do not need getters and setters, you can simply add data in front of the class.

Let's see a model class in Java :

public class Student {
    private String name;
    private int age;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }
}

Now, let's see the same code written in Kotlin :

data class Student(internal val name:String, internal val age:Int)

  • Kotlin is Null Safe - Kotlin has saved the developers from the perils of null references, commonly known as billion dollar mistake. In Java, if you try to access the member of null reference, it results in null reference exception. Whereas  Kotlin does not compile any code that is assigned or returns a null value. It first checks the assigned value, if it is not null only then it executes the operation.
  • Extention Functions - Kotlin allows you to add extra methods to classes without altering their source code. 


Take a look at the code given below, here an extra function is being added to an integer which multiplies any number by 5

fun Int.multi() = this * 5
print(50.multi())
This will print 250 as a result.

  • Kotlin  Requires Less Coding - In Java, you are supposed to write code for everything. Unlike Java, Kotlin complier understands the code and is capable of writing the remainig code. For example, Kotlin can infer different types in variable declarations. This feature helps developers in completing the task with less code, thus increasing productivity.
  • Kotlin is Free - Kotlin does not come with a charge.


Apart from the features mentioned above, Kotlin has fixed a series of issues that Java has been suffering from :

  • Null references are controlled by the type system.
  • No raw types in Kotlin
  • Arrays in Kotlin are invariant
  • As opposed to Java's SAM-conversions, Kotlin has proper function types
  • Use-site variance without wildcards
  • Kotlin does not have checked exceptions


In short, Kotlin has made Android development more fun, it enables you to write more expressive and efficient code with lesser bugs.