fun sayHello(){
println(" Hello, Kotlin! ")
}
sayHello()

What Is Kotlin?

Kotlin is a modern programming language developed and introduced by JetBrains, the maker of the world’s best IDEs. It is a general-purpose, cross-platform, statically typed, and an object-oriented programming language which supports type inference. It is generally considered to be a better language than Java. Still, it is entirely interoperable with code written in Java. While developing Kotlin, the main focus was on conciseness, clarity, and safer code. It is also sometimes referred to as Swift for Android. In addition to that, Google had announced first-class support for Kotlin on Android in the year 2017. 

Some Intriguing Features of Kotlin

Robust Code:

You must be knowing how null-pointer exceptions in software have caused substantial monetary losses, dramatic system crashes, and lead to several hours of debugging. For this reason, Kotlin distinguishes between non-nullable and nullable data types, which help in catching and avoiding more errors at compile time.

Type Inference:

More often, due to type inference, we do not need to indicate the type of a variable, as Kotlin is capable of detecting it. Type inference makes our code shorter and our life easier!

For example:

var a : Int = 24 // compiles successfully
var b = 8 // also compiles successfully

Object-oriented and Functional Programming:

Every fragment of data handled by a Kotlin program is an object, and every object has a type. Furthermore, Kotlin is also a part of the functional programming trend of today. From lambda functions, properties, higher-order functions, operator overloading, compact functions to lazy initialization and coroutines, Kotlin has it all! These features allow you to write less code with fewer bugs. You say what you want to do, not how to do it! 

Tool friendly:

To develop with Kotlin, you are free to use any Java IDE such as IntelliJ IDEA, Android Studio, and Eclipse. Otherwise, you can use any editor and build from the command line as well.

Concise and Readable:

Kotlin was designed in such a way that it drastically eliminates the amount of boilerplate code such as the getters and setters. For example, consider the following code written in Java:

public class Student {
private int studentID;
public Student() { }
public int getStudentID() {
return studentID;
}
public void setStudentID(int studentID) {
this.studentID = studentID;
}
@Override
public String toString() {
return "Student(" + "Student ID =" + studentID + ")";
}
}

The above code can be reduced concisely and written in a single line like this in Kotlin:

data class Student (var studentID: Int = 0) 

This way, it ensures readability and keeps things concise!

Interoperable With Java:

You can use Kotlin and Java code side-by-side and continue to leverage existing libraries for the browser, Android, and the JVM. You can also add Kotlin code to any existing Java code. Additionally, you could also migrate your current Java program to Kotlin code entirely using the tools included in IntelliJ IDEA and Android Studio.

 

Statically Typed:

Kotlin is a statically typed programming language. It means that a variable can only be assigned to a fixed type. This acts as an advantage because the compiler can catch type errors during the compile time itself even before the program is executed.

For example:

var num : Int = 24
num = 8 // compiles successfully
num = "eight" // compile time error!
num = 11.0 // compile time error!

Those were some of the most intriguing features of Kotlin. Other than that, Kotlin has not only been used for Android development but also for server-side development and to build web applications. In conclusion, if you are interested in Andriod development, then you owe it to yourself to give it a try!

In the digitally connected society, smartphones have become an extension to all of us. Advanced camera and video features are playing a massive role in this. Users can take out their phones to capture the moment with just a single click. However, it’s a double-edged sword. These mobiles are continuously collecting, storing and sharing the information without our knowledge making it a jackpot to the hackers.

For the better understanding of how the smartphone cameras may be opening up the users up to the privacy risks, the Checkmarx Security Research Team cracked into the applications that control the camera to identify the potential abuse scenarios. The team began with the Google Pixel 2xl and Google Pixel 3 reaching the Google Camera App, ultimately finding multiple concerning vulnerabilities coming from permission bypass issues. After digging deeper, they also found that the same vulnerabilities impact the camera app of the other smartphone vendors in the Android ecosystem, namely Samsung presenting hundreds of millions of significant users across the world.

Google & Samsung Camera Vulnerabilities

After the detailed analysis, the research team found that the Google Camera App can be attacked through a rogue application that has no permissions to do so. Additionally, specific attack scenarios also enable storage permission policies, giving them access to stored videos and photos. The GPS metadata embedded in the images to locate the user by taking the picture or the video and parsing into proper EXIF data. This technique is applied to the Samsung devices too.

In doing so, they determined a way to enable the rogue application to force the camera permissions even if the phone is locked and the screen is off. They could do the same even when the user was in the middle of the call.

Mitigation Recommended

For proper mitigation and best practice, please ensure that all the apps on your devices are updated.

The owner of WhatsApp, Facebook, has recently warned about its security flaw.

 

The attackers attempted to execute snooping attack on both the iOS and the Android devices. They do it by exploiting the bug that lets them hide malicious code in the specially crafted MP4 video files. This flaw is classified to be of a critical severity ad it attacks an unknown code block of the MP4 Handler in WhatsApp. This boobytrapped clip can be used in remote code execution assault.

If the victim watches the video, the attackers can run a range of software on the phone, steal the sensitive information like the bank details, or target other people using your phone.

They can also run software which leads to the denial of service (DNS) attack, which in turn stops the victim from using the Internet, WhatsApp or other functions on their phones.

This flaw affects the android users running versions released before 2.19.274 and iOS users running versions released before 2.19.100. To be safe, we would recommend you to update your WhatsApp immediately.

How to protect yourself from being clobbered by hackers?

One way is to switch off auto-download feature for your media files in WhatsApp. Another way is to make sure that no one can send you dodgy videos. The WhatsApp has recently launched the new privacy feature which will stop you from being dragged into the groups you don’t want to be a part of. So starting from today, you get to choose who can add you to groups and who can’t. This helps you block dodgy people and stop your annoying friends from adding you into groups.

The update might be a frivolous feature, but its a great privacy feature because people in groups can see each other’s phone numbers. If you can control who adds you into the groups, then you have another way to protect your identity.

Where to find this feature?

1. Once you’ve updated your WhatsApp go to WhatsApp settings.

2. Scroll to Accounts.

3. Click on Privacy

4. Choose Groups.

5. You can now select who can add you into groups among the three available options. “Everyone” where it would be no different from what it is now or “My contacts” where only the ones in your contacts can add or “My contacts except” where you can exclude people from your contacts especially those annoying and dodgy contacts.

 

In a statement, WhatsApp wrote: “WhatsApp groups continue to connect family, friends, co-workers, classmates and more. As people turn to groups for essential conversations, users have asked for more control over their experience.
Today we’re introducing the new privacy setting and invite system to help you decide who can add you to groups.
With these new features, users will have more control over the group messages they receive.
These privacy features will be rolling out to some users today and will be available worldwide in the coming days to all those using the latest version of WhatsApp.”