Tag Archives: google

A Myth comes true with Google Cloud Vision API

Cloud Vision API by Google Cloud is the latest addition for the Google Cloud platform. Last week it has been made a beta release and been allowed for the developers around the world to try and experience it. 2 month of free usage is offered by the Google at the moment as a promotion.

This API is already being used in the Google Photo app. You may have already experienced it’s power. Analyzing objects in a photo, face detection, geographical location detection and fast search are some of their features.


So I was able to register for it lat week and was already able to build an app. But as it was still in the beta. Faced some problem(Can be found with solution in Stack overflow) on creating the API key for Android. But was able to find a quick fix as many people are facing the issue.

But when I was going through the API and I found many awesome feature that just a myth till today. Still there is no proper documentation but you can find some of the popular features and getting started docs listed here.

Here are the High Lighted APIs listed down

You can also try Google Cloud Vision API here

Pricing is also seems reasonable compared to the amount of processing that they have promised to do. It will be a big break through in the history of the image processing technology.

You can check out the Android app I have developed using the ‘FACE_DETECTION’ API, if you love selfie you will Love it. Download the Selfie Mood app here
selfie mood

Whatsapp Web – Desktop App Workaround

Hi guys, its cool to see whatsapp coming to the desktop, at least as a chrome app.
But I know there are a lot of people who use browsers other than Google Chrome, and the people who actually wants a hassle free separate desktop app, rather than opening a browser and going to the specific site to view the messages.

So here I am gona explain how to create a chrome application which, kind of create a dedicated browser app for you which you can place in your browser or task bar just like another app and when you click on it, it directly opens like another desktop app.

Step 1
So to do that first you need a Google Chrome browser. If u are a Google Chrome hater, please don’t worry, it only for the first time, after that you can forget about it . Use this link to download the Google Chrome

Step 2
Open the Google Chrome and get in to the Whatsapp web app, using this link https://web.whatsapp.com/

Step 3
Open your Android Whatsapp app and on the menu select the Whats app Web.
Scan the QR code in the website you visited now using the QR scanner just opened in the Whatsapp android app. And you have successfully registered and accessed the chat.

Step 4
Now in the google Chrome Menu Go to
More Tools –> Create Application Shortcut

Now you will see the option to create the short cut in Taskbar Desktop or anywhere you like


TA DA , now you have a dedicated Whatsapp Desktop App which you can click open with a single click.

Whatsapp Desktop App

This technique can be used with all other websites as well, like facebook, twitter and many others.

Hope this article is helpful for you free feel to share with you friends

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


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


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 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 in Swift are created with the key word ‘func’

func eatBurger(){

and called using the function name with the paranthesis


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


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

So the x will loop from 1 to 100

Example 2

var name  = "cat"

for y in name{

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


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

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


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 {

this will print 1 to 100


for y in 1..<100{

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
// 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


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]


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]



My Life with Google Play Store

Hi Guys, this time I am back with some experience to share. Due to many requests I got from my developer community fans, I have decided to share my Google Play Store Experience…!


As you know Google Play store is the Official Android App Store, where almost all the android users get their apps from.

So in this article I’ll write some points, in the forms of tips, based on my 2 years of experience with Google Play Store, where I have published more than 36 apps, with total of more than 1 Million User Base(apps downloaded more than 1 000 000 times), lost 7 apps, lost 2 of my play store accounts and running my 3rd account.

Hope the qualifications in the above paragraph will urge you to read the article 😉

Good to Know
Creating a Google Play Store account costs you one time payment of 25 USD.
You can publish unlimited apps till 3 of your apps get suspended for violating their privacy policy and BLA BLA things…!
After market get suspended, they will not allow you to start a Google Play app store from the same account. So you have to start another Account.

Tip 1
When you are planning to publish an app for money(Selling an app for money in app store), unless you have a good client info tracking system don’t do it. Because one guy can buy your app, create backup which gives him the apk of your app, which he will publish in the Open Internet for everyone to get it and have it for Free. So always build free apps with Ads, so whatever happens you will still get money out of the ads.

Tip 2
Before you name your app please check if the word you are going to use in your app is allowed in United States of America. Because USA is the number one android market place with more than 75% of the app downloads happen, also they ban apps which has certain words or names. For example if ‘country x’ is in their black list, they block the apps with ‘country x’ in their names. Which will end up in a big loss to your app and expectations.

Tip 3
One of the easiest way to gain lots of download is to use a brand name(example: batman, Spiderman, Google), or a similar name to a popular app that’s available on that season(example: flappy bird, flappy tin man). But be warned that your app will be suspended sooner or later, even without giving you a warning. And there is no way of getting the app online.
Best tip on this will be use the brand name for sometime and replace them with your own after getting enough rating so your app is visible in the search(Not Recommended, you don’t know when they will suspend the app).

Tip 4
Add some relevant and popular tags in the description before publishing the app, it generates some traffic for your sites.
example: And have fun sharing with your friends on social network. #facebook #instagram

Tip 5
When developing an app always try to set the maximum possible min SDK value, so you will get a wide audience which results in increased download rate. Also if possible take screen shots from 7 inch and 10 inch tablets screen shots of your app and add them(There is a specific section for it in the app publication form), so that will enable the app to be downloaded by the tab owners too.  Don’t care about the ugly interface when installed to a tab(if it is not designed for tabs ), even you can take a normal phone screen shot and create a tablet sized image with image editing tools.

Tip 6
Whenever you publish an app try to get it some 5 star rating with your friend’s help, people think that we are cheating, but the truth is you are actually pushing your app in to the Google play store search a bit so that it gets visible to all the users, so then it is up to the true down loaders to give the real rating for your app.(There are some of the Marketing Strategies I tried and succeeded)

You must understand, publishing apps in the app store is my hobby and not my profession, and I have lots of fun with the play store.

I have written all that came to my mind, this article will be constantly updated.
So tune in…



Google Glass Development Kit Sneak Peek Revision 2 – List of Some API Changes

I came across lots of problems when the glass updated to XE12, long ago. Today I found out this article which I thought I would like to share with you all.

My Glass was automatically updated with the monthly update XE12. This update included a new version of GDK implementation, known as Sneak Peek Rev. 2.

Since the update, I could not run any of my GDK sample apps. I was getting errors like: java.lang.NoSuchMethodError: com.google.android.glass.timeline.TimelineManager.getLiveCard.

As it turned out, this new GDK revision included some non-backward compatible API changes. Clearly, names like “Sneak Peak” or “Preview” edition imply they are not stable releases, and APIs can change any time. But, I was caught a bit off-guard, and a bit disappointed since it happened “without warnings”. (Or, maybe there was a pre-announcement, and I may have missed it because I’m off-line most of the time these days.) I mentioned the importance of “backward compatibility” in software engineering a few times before. Even more importantly, I believe that software engineers should strive for “forward compatibility”. This is a difficult goal to attain because, in many cases, developers do not know what product features they will need to support in the future. In most organizations, they come down from “PM’s” or people from “higher up”. Nonetheless, I think it is possible, and it is worth pursuing.

Anyways, I went through all my sample apps on GDK Demo and updated the code based on the new API. I’ll include the list of API changes here. This is only a partial list since the GDK Demo apps use only a subset of the GDK APIs.

First, you’ll need to update your GDK using Android SDK Manager. Since the original GDK release about a month ago, there seems to have been no other Android updates. When I opened the SDK Manager last night, it found only one update, GDK rev. 2. You can copy the updated gdk.jar file into your project dir and include it in your build path, or you can just set your compileSdkVersion to a GDK-specific string. I personally prefer the first approach because there are some benefits of using a higher version for compileSdkVersion than that of targetSdkVersion (which should be 15 at this point). If you plan to do any “cross-platform” development (e.g., your app targeting both Android phones and Google Glass), then you probably have no choice but to use the Jar file.

So, here’s the list of API changes in GDK (as relevant to the currently “released” GDK Demo apps).

  • TimelineManager: Method name change from getLiveCard(cardId) to createLiveCard(cardTag). (I’m only presuming that these are the same method, and the API change entails only the name change.)
  • LiveCard: It appears that the method setNonSilent(boolean) has been removed. Instead, this “nonsllent” flag is set during publishing. The signature of the method publish() with setNonSilent(true) has been changed to publish(LiveCard.PublishMode.REVEAL). If you used setNonSilent(false) for your livecard, then you now need to call publish(LiveCard.PublishMode.SILENT) instead.
  • LiveCard.enableDirectRendering(boolean) has been changed to setDirectRenderingEnabled(boolean).
  • com.google.android.glass.media.Camera has been, it appears, renamed to CameraManager.
  • The surface rendering callback interface, LiveCardCallback seems to have been renamed as DirectRenderingCallback. My existing code just compiled fine (haven’t tried running them all though) after only changing the interface name.

That’s about it. Again, this is only a partial list of API changes in the new “Revision 2” version of GDK (as relevant to the “GDK Demo” sample Glassware). I haven’t done any comprehensive comparison of old vs. new GDK jar files or anything like that (which is probably easy to do). Google might have posted some kind of “release note” or “change log” at this point (which I haven’t seen yet though).

Meanwhile, I hope other GDK developers find my list useful, for now.

PS 1: BTW, interface name changes like LiveCardCallback -> DirectRenderingCallback possibly imply that there might be something coming in the future that are in some way equivalent/similar to LiveCard (maybe, DeadCard? :)). This is known as “breaking backward compatibility for forward compatibility”. We developers do this all the time, whether we realize it or not. We create, say, a class for certain purpose (with a certain name), and later realize that we have chosen too specific a name because the class can be more broadly applicable than initially planned.

Reference – http://blog.glassdiary.com/post/70419002255/google-glass-development-kit-sneak-peek-revision-2

Link to the GDK Release note – The GDK release note page.

Android Wear

Hi guys, this time I’ll write about the new Android Wear, which was announced on last week. So what is it all about?
Android wear, a new OS while already wearable devices are coming with Android as OSs?

Its a new approach by Google to bring a new concept by creating a new development area with targeting only wearable devices.

It’s not a completely new OS, its the same android but made specifically for wearable device software development.

‘Google Says that the Android Extends to Android Wear. Richer Experience for the Wearable devices’ –  Official Intro Video

So this time there are 2 types of designs unlike the galaxy gear and smart watch 1 and 2 you can see a circle one and a traditional square screen. As I have heard the square one is going to be manufactured by LG, which has less spec and smaller price tag, where the circle one will be made by Motorola with high specs.

For developers, Android wear SDK developer preview has been released, so you guys can download and try it out. Which will be a great experience in the future when the device is out in the market.

So with the help of the official article I managed to find out that you can do the below  shown basic functionality.


It does not mean that you have to learn anything new you also can use the old APIs

‘You can also trigger your notifications contextually using existing Android APIs. For example, use geofences to provide glance able information to your users when they are at home, or use the activity detection APIs to send messages to your users’ wrists while they are bicycling.’

So what are you waiting for register for developer preview, download the sdk and start developing.


References : Android Wear | Android Developers