Category Archives: Android

Android related articles and code demos.

Last Runner – Android, iOS and Windows Phone Game

android game

Last Runner is an Endless runner made for Android and iOS. Unlike Temple run and Subway Surfers, it’s a 2D game similar to Monster Dash by Half Brick studio.

Screenshot_2015-02-05-11-08-17  volcano forest

It got only one function, and that is to tap the screen for jump and double tap the screen for double jump. The Double jump functionality is a bit Tricky, it Does not always double jump when you try to double jump. It some times frustrates the player, but that is the beauty of an Addictive game.

Developer says that
“The One who Masters the Double Jump will conquer this Game”

Another most wonderful and main feature is all the drawings of this game are hand drawn and the scene changes every time you surpass a certain score.

Also the Game is integrated with Google Play Services so the player can log with Google Plus and  compete with their friends and Earn Achievements through the Game.

Google Play Game services feature is only available in the Android version

gplay
The Game starts with a Story where a Volcano is erupting in a beautiful environment, its the first sign of world coming to an end. The two characters, the Professor and the Hero are discussing about collecting Life energy from around the world to create a magical Serum which will help turn a bare planet into another beautiful Earth which the earthlings are planning to migrate. So the hero turns into his Super Mode to Go after them through different environments lands.
last runner Winter Scene last runner

last runner high score
The game is a super good casual one specially when u are waiting for a train or bus. Competing with your friends makes it more Addictive. This is a Must try Game.

Watch the Trailer here

So Go On Guys, Download the Game and start playing
DON’T FORGET to RATE  🙂

You can download it by clicking the Buttons below
google_play_store_icon lat runner ios  last runner windows phone

Advertisements

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/

 

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

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…!

Google_Play_Games

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.

functionalities

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