India to soon introduce next-gen ePassport for citizens with a microchip

Sanjay Bhattacharya from Ministry of External Affairs, took to Twitter to inform them that India would soon get e-passports with secure biometric data.

  • The passport would contain secure biometric data.
  • It would ensure smooth passage through immigration posts globally.
  • The e-passport would be ICAO compliant.
  • And would be produced at India Security Press, Nashik

What is an e-passport?

  • e-passport will be a replacement for the traditional passport. It will have an electronic chip that carries the same information as the printed passport like name, date of birth etc.
  • The e-passport could be scanned, which will speed up the verification process at the immigration counter.
  • It will also help curb the fake passport business. Any tampering with microchip will result in failure of passport authentication.

UltraRAM – The Next Big Thing in Storage

What is UltraRAM ?

UltraRAM combines RAM and Storage into one ultrafast memory solution.

The Research

We know that pretty much everyone is exploring how to combine both memory and data. Guess what, researchers at Lancaster University have found a way to make this happen.

Their paper highlights a breakthrough in the mass production of UltraRAM.

UltraRAM is a type of memory that offers RAM and SSD storage combined to provide you with the fastest storage solution possible. It doesn’t release data when turned off and can combine RAM chips with hard drives for a seamless effect.

It’s a non-volatile memory that does not require power to store data and it has the same speeds as DRAM when in use.

So it can lead to a 1-stop solution for RAM and storage by combing them together in a single device. Which means in future when you buy a 1TB UltraRAM device, it will be able to function as both storage and RAM.

Gentle Introduction to Prototypes and Prototypal Inheritance in Javascript

In this short video tutorial I will explain in simple terms what are prototypes in Javascript and how Inheritance works.

Key points to keep in mind

  • In Javascript if an object wants to inherit from another object then it can do so using prototypal inheritance.
  • The parent object is referred to as Prototype.
  • __proto__ is deprecated, we can use Object.create()
let fourWheelerObj = {tyres: 4} // Prototype

let carObjectOne = {engine: 'v6', __proto__: fourWheelerObj}

console.log(carObjectOne.tyres) // 4


let carObjectTwo = Object.create(fourWheelerObj)
console.log(carObjectTwo.tyres) // 4

Learn about Javascript Strings

We will learn how to create Strings, escaping quotes and string concatenation.

Code examples below are also available at Github

Creating a String
Strings are surrounded by quotation marks. It can be single or double quotes.
Just like we declare and initialize numbers we can work with strings.

let message = 'Hello World';
message

Here message is a string literal.

Escaping Characters in a String
Let’s say we need to use the following string – 'I'm at the store right now'. As you can see here we have a single quote in the string itself. This won’t work.
To handle this we can use the \ symbol.
let message = 'I\'m at the store right now'
Using \’ solves the problem.

Joining two strings
To join or concatenate two strings we can use + operator.
let str1 = 'Hello';
let str2 = 'Sam';

str1+' '+str2

To convert a string to a number you can use the Number() function.
To convert a number to a string you can use toString()

Example
let numStr = '922';
typeof(numStr)

let num = Number(numStr);
typeof(num)

let tempStr = num.toString();
typeof(tempStr)

Template Literals or Template Strings
This is a new addition. Using this it’s convenient to concatenate strings or print out a variable value.
We use backtick instead of quotes.
let fName = 'Raj';
let message = Check this out. My name is ${fName};
message

Learn how to create different versions of your App like Free and Paid

Android framework makes it quite easy for you to generate different flavors and variants of your App. Like you can create a free version or a paid version of your App.

In order to do this you need to follow these steps:

You need to specify the variants or flavors in your App’s build.gradle file.

Like

productFlavors {
    demo {
        applicationId "com.edocent.demo"
        versionName "1.0-demo"
    }
    full {
        applicationId "com.edocent.full"
        versionName "1.0-full"
    }
}

In all likelihood your Free App version will need a different Activity compared to the Paid one. So you need to create different folders for the two flavors.

So go to the Project->src folder and create a new Java Folder – free.

Create another one for paid similarly.

Add appropriate Activity and other files to this folder.

And you are all set. Execute Generate Signed APK task from the Build option. This will ask you which flavor you need the APK for.

Cool isn’t it.

Source code is available here

Learn how to generate a signed APK file

All Android Apps must be digitally signed before they are installed on a device.

This is required to verify identity of developer who published it. And also to verify if it has been tampered.

Follow the video to generate the signed APK file and also to learn how to automate the process.

 

Learn how to create and use a Android Module in your Android Project

You saw why using modules is important and how to create a Java module in an earlier Post. In a similar fashion you can add an Android module to your project.

Android Studio makes it easy to add a new module. Follow the video to understand the steps.

Source code is available here

What is Android Debug Bridge or ADB ?

An ADB is a command line tool which can be used to communicate with Emulator or Android Devices.

When your development machine needs to communicate with an Android Device it does so using ADB. It’s a process that is controlled by a command also known as adb.

The adb command works by talking to an adb server which runs in the background at port 5037. The server is also known as adb daemon or adbd.

Android Studio also talks to this server when it needs to run an app via an Android Device.

To work with ADB you need Android SDK.

Learn how to create and use a Java Module in Android Project

Creating modules is a good practice since it aids in reusability. In your Android project you can easily add a Java or Android module.

Follow the video to create a Java module and add it as a dependency in your Android Project.

Project source code is available in GitHub