VAM Browser – Award Winning Research

1

This is a Research done by me and my research group back when we were doing our final year BSc in IT. This is kind of a predecessor for the Cortona that’s available for windows phone 8.1 now

Also this research won the “Youth Encouragement Award” in
the eSwabhimani 2012 Sri Lanka

The Research Paper is Published at the GHTC SAS 2013 Conference Held at Thiruvananthapuram India

See the research Here
IEEE_logo

or Use QR Reader
vam

This is what our research stated back in 2012 states

“Technology is growing fast with the time. The days of desktop pcs and laptop pcs’ are disappearing fast. Now the latest and fastest growing technology is smart phone technology. Even though the earlier smart phones did not support much features, now it is been appearing with much more powerful hardware to support latest features. Internet access is a must these days, any smart phones without a web browser is a useless device. So, this research, Voice Active Mobil Web Browser, Assisting Vision Impaired people(VAM Web Browser), is carried out to find the difficulties Smartphone users are experiencing with their mobile web browsers and to provide a solution to it. The main research areas covered in this research project is implementing a web browser which has the feature to read web pages and to accept voice commands from user to execute some functions. Also this mobile web browser will have an advanced downloader feature which will support pausing the download and resume again. . Even though this system is not targeted to blind people the system will facilitate the vision impaired people as it got voice to text, text to voice features.”

Visit the Research Site for more details and Docs
Visit-website-button

Halloween Camera – Android App

banner

Halloween is coming closer…!
Scare your friends with the Halloween camera by taking your friend’s picture with a Ghost next to him/her

If the gallery crashes when you try to open please see the photos through your default file browser
The photos taken are inside
sdcard –> Mycamera Halloween Folder inside your memory card

Download the app here
google_play_store_icon

or use the QR Reader

qrfree.kaywa.com

Basic Swift for iOS: Core Syntax

Hi guys, I was given a Mac Book Pro recently and thought of learning some iOS development. So as a first step thought of going through the Basics first. And as you now sharing what I learn with other is the number one way of learning…! This blog will go in a format of short notes or points.
So here you go guys…!

Most of the basics are same as most other popular languages, but still there are some changes, Ill be high lighting the serous issues.

We don’t use semi colones at the end of the statements in Swift.
Also we avoid parenthesis when declaring a condition as much as possible, if there is a complex logic its advised you use it, other than that nope.

We follow the camel case naming convention in Swift

Playground

There is a tool called Play Ground in Xcode where you can write some code and observe the results soon as you write them. Its a great tool to learn the basics and to test some complex logics

Variables

In swift you don’t have to mention the type when you are creating a variable, it automatically decides itself according to the values you pass.

var myInt = 32
var myString = "cat"

But if you want to create a variable without assigning a value you can specify it like this

var myVariable :String
var myIntVariable :Int

Constants

Constants are variables with immutable values, so once a value is defined that value cannot be changed after that

So they are declared with the word “let”

let myConstVariable = 32
let myUnChangedVal = "car"

String Interpolation
Ooops don’t get scared by the word. Its basically a way of passing values or concatenating values in between strings.

var name = "Batzee"
var level = 11

just say you got 2 String values which u have to add in between a standard println() statement

println("\(name) is a Level \(level)" Agent in Ingress")

So the out put will be

"Batzee is a Level 11 Agent in Ingress"

So here instead of using ‘+’ operator we are using ‘\()’ operator

Functions

Functions in Swift are created with the key word ‘func’

func eatBurger(){
}

and called using the function name with the paranthesis

eatBurger()

If the function has a return type then the function is written as

func eatBurger() -> Int{
var burgerNo = 3
return burgerNo
}

‘->’ followed by the return type must follow the function before the curly braces starts.

if Statements

if statement is same as you have written an ‘if’ statement anywhere else, but there are certain things you have to consider when writing in Swift.
As always the Swift says it’s best practice if you can avoid the parenthesis around the condition
And on statements that has one line of executable line of code on success also must have it self surrounded by the curly braces unlike other languages, where you can avoid using the curly braces around the single line code.

if  x<500  {
return x
}

Loops

So there are 4 kinds of loops in Swift

The 1st one is the traditional for loop there is not much difference, only thing you have to consider is to remove the parenthesis around the condition

for  var x = 0; x<10 ; x++  {

}

The 2nd one is the for in loop this is something like foreach loop you specify a collection to loop through. Whatever you pass it converts it in to a collection. If you give a range, it loops through the range. If you pass an Array, it loops through the array element, and if you pass a string it converts the String in to character array and loops through the character array elements

Example 1

var total = 0

for x in 1...100{
total = total+x
println()
}

So the x will loop from 1 to 100

Example 2

var name  = "cat"

for y in name{
println(y)
}

here the variable name will be taken as a string array and the out put will be

c
a
t

The 3rd one is the While loop, it is same as any other while loops in other languages, only considerable change is, not necessarily to add the parenthesis around the condition

while condition {
// do if the condition is true
}

The 4th one is the Do While loop, in this there is some noticeable change, the condition is added at the end of the body, this is to run the code inside the body at least once before it checks on the condition

do{
//runs for the 1st time and runs for the second time and after, if the condition is satisfied
}while condition

Range

Range operator is something new in Swift

which is defined by ‘…’ this says to consider the number mentioned in the left of the operator and all the numbers in between it and the number mentioned in the right of the operator.
Also in the Range operator you can control the 1st and the last dot, like ‘..<‘ , ‘>..’ so this basically will work like a for loop

for  x in 1...100 {
println(x)
}

this will print 1 to 100

similarly

for y in 1..<100{
println(y)
}

will print 1 to 99

Switch Cases

So the Switch Statement in Swift has some points to consider .

The case range must be Exhaustive, unlike other languages you cant check only for a handful of conditions but for all the possible values.
for example if you are checking for integer cases, integer is never ending so u have to handle it. In that case you will use the default case to catch all the situations that you don’t want than what u actually wanted.

let chocoCount = 7
Switch chocoCount{

case 0:
//in case 0 do this
case 1:
// in case 1 do this
case 12:
//in case 12 do this
default:
// do this if the cases dont match the given cases

}

Also in Swift’s Switch statements they don’t have the ‘fall through’ option, which automatically falls into another case for a range of cases. In that case we can use the range case, We have already seen what is a range operator does above.
This is how it is done.

switch chocCount{

case 1...7:
//if the case is between 1 and 7 do this
case 8...15:
// if the case is between 8 and 15 do this
default:
break

}

This post is written after learning from a video, so there are some chances that I may have made some mistakes, so please feel free to comment them down, Ill me more happy to correct them. And stay tuned in for more blogs on Swift and iOS development.

Reference: Notes are taken by studying the Swift Essentials from Lynda.com

What is Google Cloud Messaging

Google Cloud Messaging (GCM) is a service for both Android-powered device and Chrome instances to send and receive message data from servers. The GCM service handles all aspects of queuing of messages and delivery to the target Android application running on the target device and the signed-in Chrome users. GCM is completely free no matter how big your messaging needs are, and there are no quotas. [1][2]

cloudmessaging

Image courtesy – http://www.androidhive.info%5B3%5D

When your app is in the foreground, using standard web requests or sockets to get information is the right choice. This isn’t what push messaging is meant to replace. When your app is in the background though, don’t you dare poll for updates. This is exactly the type of bad behavior that push messaging makes obsolete.

Why does it matter so much? Simple. Polling is worse by all measures—it’s harder on your servers, less timely, and affects your users’ battery life. There’s almost no better way to get someone to uninstall your app than to have them see it at the top of their battery usage screen.[4]

References:
[1]https://developer.android.com/google/gcm/index.html
[2]https://developer.chrome.com/apps/cloudMessaging
[3]http://www.androidhive.info/2012/10/android-push-notifications-using-google-cloud-messaging-gcm-php-and-mysql/
[4]https://blog.pushbullet.com/2014/02/12/keeping-google-cloud-messaging-for-android-working-reliably-techincal-post/

 

Setting Up JDK for JAVA Development in your Windows PC

Android is based on Java so
First you need JDK(Java Development KIT) installed in your machine and it needs to be configured in the Environment Variables.
To check if JDK is already installed in your machine. Open the command prompt and type “javac”
javac

Then press enter. If you see a screen like this

javacresults

That means you have JDK installed and configured.
else go to
http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

And download the JDK suitable for your pc version(The latest version changes with years this Screen shot is taken on 2014 September)
JDK Download

After you have downloaded it and installed it copy the path of the bin folder in side the installation folder. Installation folder path will be normally
C:\Program Files\Java\jdk1.8.0_05\bin
Depending on the version of Java u have installed the folder name and depending on the Windows version the program folder name also changes.

Now Go to Control Panel-> System and click on Advanced System Settings
Advanced system Settings

Step 1
You will see a new Window called “System Properties” Pop up

Step 2
Then in that Windows you will see a Button Saying “Environment Variables”, click on it

Step 3
It opens a new window called “Environment Variables”

Note: Before Going to Step 4, check if the “User Variables for ‘Your PC user name’ “, already got “path” in the list, if it was not there follow Step 4 else skip to Step 5.2

Step 4
In that window under the “User Variables for ‘Your PC user name‘ “Click the New Button

Step 5
Now you will see a new window “New User Variable”, there on the ‘Variable name‘ section type “path”, and on the ‘Variable value‘ section paste the java sdk path you have copied earlier

Step 5.2
If there is already a path variable, select that section and click on the “Edit”, and without doing anything  in the ‘Variable name‘ section, go to the ‘Variable value‘ and add a “;” next to the existing value and paste the java sdk path you have copied earlier.

Step 6
After adding the value, click ‘OK’ , then again ‘OK’ on the “Environment Variables” window and finally click  on the ‘Apply” button on the “System Properties” window.

Settings

Now you will be able to get the result I have got earlier when typing “Javac” on the command prompt.

 

 

 

What is Android ?

The word Android originally means Human Robot.

trwetsrtg

But here what we are going to see is Android the Mobile OS that is ruling the world now. So Android basically is an operating system like windows xp, windows 7, Ubuntu, Fedora and many other.

Android is open source. So developers are all around world are always up to improving the OS for a better performance. So Android always comes up with new and latest features compared to other OS available in the market.

Android project started by an individual and then later bought by Google and now it is developed in a large scale.

Operating system is free and updates are also given out as free. After Google acquired the Android, Google services are also connected with android which enhanced the features and power of the devices.

Google is constantly working on new versions of the Android software. These releases are infrequent; at the moment they normally come out every six months or so, but Google is looking to slow this down to once a year.

Versions usually come with a numerical code and a name that’s so far been themed after sweets and desserts, running in alphabetical order.

  • Android 1.5 Cupcake
  • Android 1.6 Donut
  • Android 2.1 Eclair
  • Android 2.2 Froyo
  • Android 2.3 Gingerbread
  • Android 3.2 Honeycomb
  • Android 4.0 Ice Cream Sandwich: The first OS to run on smartphones and tablet
  • Android 4.1 Jelly Bean
  • Android 4.2 Jelly Bean
  • Android 4.3 Jelly Bean
  • Android 4.4 KitKat

Android is developed using a slightly customized JAVA also known as Android. The lower level architecture works on Linux.

Eclipse with ADT plugin and Android Studio are used as tools to develop apps for Android Phones.

To know about Android you can visit – http://www.android.com/
To know about Android development you can visit – http://developer.android.com/index.html

Confusing Terms While Developing for Android

MANIFEST
The manifest file presents essential information about your app to the Android system, information the system must have before it can run any of the app’s code. [5]

DALVIK
Dalvik is the virtual machine that is used by Android. It is generally thought of as a java virtual machine, although this is not precisely correct. It uses an object model that is identical to java, and it’s memory model is also nearly equivalent. But the dalvik VM is a register based VM, as opposed to java VMs, which are stack based.

Accordingly, it uses a completely different bytecode than java. However, the Android SDK includes the dex tool to translate java bytecode to dalvik bytecode, which is why you are able to write Android applications in java.[3]

rVSX8

DALVIK CACHE
When you install an application on Android, it performs some modifications and optimizations on that application’s dex file (the file that contains all the dalvik bytecode for the application). It then caches the resulting odex (optimized dex) file in the /data/dalvik-cache directory, so that it doesn’t have to perform the optimization process every time it loads an application.  So the “/data/dalvik-cache” directory is the DALVIK CACHE[3]

ART
ART is an application runtime environment used by the Android mobile operating system. ART replaces Dalvik, which is the process virtual machine originally used by Android, and performs transformation of the application’s bytecode into native instructions that are later executed by the device’s runtime environment.

Unlike Dalvik, which since Android 2.2 “Froyo” uses just-in-time (JIT) compilation to compile the bytecode every time an application is launched, ART introduces use of ahead-of-time (AOT) compilation by performing it upon the installation of an application. By reducing the overall amount of compilation that needs to be performed across the operation of an application, a mobile device’s processor usage is reduced and battery runtime is improved. At the same time, ART brings improvements in performance, garbage collection, applications debugging and profiling.[4]

AOT
ART introduces ahead-of-time (AOT) compilation, which can improve app performance. ART also has tighter install-time verification than Dalvik.

At install time, ART compiles apps using the on-device dex2oat tool. This utility accepts DEX files as input and generates a compiled app executable for the target device. The utility should be able to compile all valid DEX files without difficulty. However, some post-processing tools produce invalid files that may be tolerated by Dalvik but cannot be compiled by ART.[2]

Gradle
Gradle is a project automation tool that builds upon the concepts of Apache Ant and Apache Maven and introduces a Groovy-based domain-specific language (DSL) instead of the more traditional XML form of declaring the project configuration.

ANT
Apache ant is a generic build tool. The name ANT stands abbreviated for ‘Another Neat Tool’. This tool is similar to the ‘Make’ utility in UNIX but is implemented using Java. It is primarily used for building the binaries of a java based source code and deploying the generated binary to an application server which is predefined. It can also be used to generate javadocs for a code base and to execute the unit test suite for the whole codebase. Ant in collaboration with JUNIT helps developer to follow the test driven development approach.

Ant requires Java compiler to be installed having the environment variable JAVA_HOME set with its adequate value. Ant uses an XML file to define the build procedure. The default name of this file is build.xml. Some developers also use a properties file namely build.properties to define some properties e.g. the build version number and other environmental parameters which are required to change from time to time based on the need[1].

MAVEN
Apache Maven is a software project management and comprehension tool. Based on the concept of a project object model (POM), Maven can manage a project’s build, reporting and documentation from a central piece of information.
This article will be updated periodically. And please feel free to comment the words you like to get some explanation so I can update this article with them.

Jenkins
Jenkins is not directly related to Android. Still as someone asked its explanation I am sharing a small description I found on the internet. Jenkins is an open source continuous integration tool written in Java. The project was forked from Hudson after a dispute with Oracle. Jenkins provides continuous integration services for software development. It is a server-based system running in a servlet container such as Apache Tomcat.

Reference
[1] http://mrbool.com/apache-ant-java-automating-your-build-process/29531#ixzz3DMUjg88b
[2]https://source.android.com/devices/tech/dalvik/art.html
[3]http://stackoverflow.com/questions/7541281/what-is-dalvik-and-dalvik-cache
[4]http://en.wikipedia.org/wiki/Android_Runtime
[5]http://developer.android.com/guide/topics/manifest/manifest-intro.html