Friday, May 20, 2011

Google Translate App For Android Upgraded With Real Time Speech Translation

Google-Translate-App-1.jpg




Google has given the world a unique way to communicate by upgrading its Google Translate App for
Android with Real-time speech translation. This new Conversation mode lets the user record the speech
and quickly translates into a language choose by the user. So if you find yourself in a country where you know squat about the local language, this app is going to be your angel in disguise. You just have to have your android phone up and close with you. It even processes the words you speak into the phone and says it out loud.

Saturday, May 14, 2011

Motorola Dropping Android for their Own OS


An insider recently said that Motorola is secretly planning a team of trained developers to create their own OS. They are reportedly doing this to lessen how much they depend on Android.

Though nothing is set in stone yet, Motorola (over the past nine months) has hired great software developers for Apple and Adobe. Motorola is looking to make this OS fully web based. Motorola has already began gathering different resources to form their cloud storage and security.

It will be interesting to see if Motorola actually goes through with this plan, since Android has been a large reason why the company has turned around it’s business of late. More news as it develops.

Source: Electronista

What is android



Android 2.0 Official Video



Top Ten Free Android Apps



Google for Android

Google for Android

The best Google Mobile applications are available for phones that run the Android operating system.



Quick Search Box



One Google Map



and many more Application watch here

http://www.google.com/mobile/android/

Game Developing in Andriod

If you're interested in developing a game for the Android platform, there is a lot you need to know. I'm the developer of Light Racer, Light Racer 3D, Antigen, Deadly Chambers and Wixel, which are currently available on the Android Market. I've developed games before but the original Light Racer was my first Android application and I learned quite a bit about writing Android games that I'd like to share with everyone. I even wrote an online book detailing the development of Light Racer 3D, which is full of how-tos and useful code snippets. If you have previous experience with game development, moving over to the mobile platform won't be all that difficult. You will mostly just need to learn the architecture and API. If you're new to game development, I have assembled a list of must-knows for getting started. They apply to many different types of games, including action, strategy, simulation and puzzle.

Android is a Java-based environment. This is nice for new developers as Java is widely accepted as a much easier language to get started in than C++, which is the norm for mobile development and is what I use now. Google has also done an excellent job with documenting the API and providing examples to use. There is an example to show functionality for almost 100% of the API, called API Demos. If you're familiar with Java and have already used Eclipse, getting your first app working should be fairly simple. If you've never coded anything in your life before, you will have a lot to absorb as you move forward, but don't get discouraged. If you have some experience and are wanting to develop a cross-platform game or high-performance Android game in C++, check out BatteryTech, which is a platform I wrote and am currently using for game development.

Get the SDK

The first step in getting started with the Android platform is to get the Android SDK (Software Development Kit). The SDK has the core libraries, an emulator, tools and sample code. I highly recommend using Eclipse and the android eclipse plugin. Eclipse IDE for Java Developers is fine if you are just doing Android. If this is your first Java development project, you will want to download the full Java SE Development Kit (JDK) as it contains tools you will need for signing and deploying your application.

Learn the application architecture

As tempting as it may seem to just dive right in, it's very important to understand the android application architecture. If you don't learn it, you may design things in such a way that will make it very difficult to fix problems with your game down the line. You will want to understand Applications, Activities, Intents and how they are all related to each other. Google has provided good information on the architecture here. The really important thing is to understand why your game may need to consist of more than one Activity and what that means to designing a game with good user experience. This is where things tie in to the Activity lifecycle.

Learn the activity lifecycle

The activity lifecycle is managed by the Android OS. Your activity will be created, resumed, paused and destroyed as the OS dictates. Handling these events correctly is very important to having an application that behaves well and does what the user perceives as correct. It's very good to know how all of this works before you start designing your game because you will save yourself debugging time and costly redesign time later on. For most applications, the default settings will work but for games, you may want to consider turning the SingleInstance flag on. When set as default, android will create new instances of the activity as it sees fit. For a game, you may only want to have 1 instance of the game activity. This has some implications for how you need to manage the state of things but for me it solved some resource management issues and it should be considered.

The main loop

Depending on what type of game you are writing, you may or may not have a main loop. If your game is not time-dependent or if it only responds to what the user does and will wait forever for user input without making any kind of visual changes, you may not need a main loop. If you are writing an action game or a game that has animations, timers or any kind of automation, you should seriously consider using a main loop.

The main loop of a game is the part that "ticks" sub systems in a specific order and usually as many times per second as possible. Your main loop will need to run on its own thread. The reason for this is that Android has a main UI thread and if you don't run your own thread, the UI thread will be blocked by your game which will cause the Android OS to not be able to handle any of its normal update tasks. The order of execution is usually as follows: State, Input, AI, Physics, Animation, Sound and Video.

Updating State means to manage state transitions, such as a game over, character select or next level. Often times you will want to wait a few seconds on a state and the State management is the part that should handle this delay and setting the next state after the time has passed.

Input is any key, scroll or touch from the user. It's important to handle this before processing Physics because often times input will affect the physics so processing input first will make the game more responsive. In Android, the input events come in from the main UI thread and so you must code to buffer the input so that your main loop can pick it up when the time comes. This is not a difficult task. Defining a field for the next user input and having the onKeyPressed or onTouchEvent set the next user action into that field is all that will be required. All the Input update needs to do at that point is determine if it is valid input given the state of the game and let the Physics side handle responding to it.

The AI update is analagous to a user deciding what they are going to "press" next. Learning how to write AI is out of the scope of this article but the general idea is that the AI will press buttons just like the user does. This will also be picked up and responded to by the Physics update.

The Physics update may or may not be actual physics. For action games, the point of it is to take into account the last time it was updated, the current time it is being updated at, the user input and the AI input and determine where everything needs to be and whether any collisions have occured. For a game where you visually grab pieces and slide them around, it will be the part that is sliding the piece or letting it drop into place. For a trivia game, it would be the part deciding if the answer is right or wrong. You may name yours something else, but every game has a part that is the red meat of the game engine and for this article, I'm referring to it as Physics.

Animations aren't as simple as just putting an animated gif into your game. You will need to have the game draw each frame at the right time. It's not as difficult as it sounds. Keeping state fields like isDancing, danceFrame and lastDanceFrameTime allows for the Animation update to determine if its time to switch to the next frame. That's all the animation update really does. Actually displaying the change of animation is handled by the video update.

The Sound update handles triggering sounds, stopping sounds, changing volumes and changing the pitch of sounds. Normally when writing a game, the sound update would actually produce a stream of bytes to be delivered to the sound buffer but Android manages its own sounds so your options for games are to use SoundPool or MediaPlayer. They are both a little sensitive but know that because of some low level implementation details, small, low bitrate OGGs will yield the best performance results and the best stability.

The Video update takes into account the state of the game, the positions of players, scores, statuses, etc and draws everything to screen. If using a main loop, you will want to use the SurfaceView and do a "push" draw. With other views, the view itself will call the draw operation and the main loop won't have to do it. SurfaceView gives the highest frames per second and is the most appropriate for games with animation or moving parts on screen. All the video update should do is take the state of the game and draw it for this instance in time. Any other automation is better handled by a different update task.

What's this code look like? Here's an example.

public void run() {
while (isRunning) {
while (isPaused && isRunning) {
sleep(100);
}
update();
}
}

private void update() {
updateState();
updateInput();
updateAI();
updatePhysics();
updateAnimations();
updateSound();
updateVideo();
}


3D or 2D?

Before you start on your game, you need to decide if you're going to go 3D or 2D. 2D games have a much lower learning curve and generally are easier to get good performance on. 3D games require much more in-depth math skills and may have performance issues if you are not very careful. They also require the ability to use modeling tools like 3D Studio and Maya if you intend to have shapes more complex than Boxes and Circles. Android supports OpenGL for 3D programming and there are many good tutorials on OpenGL that one can find to learn it.

Build simple, high quality methods

When getting started, make sure that you avoid writing one big long monolithic method that is "the game." If you follow the main loop pattern that I described above, this should be fairly easy. Each method you write should accomplish one very specific task and it should do so error-free. For example, if you need to shuffle a deck of cards, you should have a method called "shuffleCards" and that should be all it does.

This is a coding practice that applies to all software development but it's particularly important in game development. Debugging can get very difficult in a stateful, real-time system. Keep your methods small and the general rule of thumb is that each method should have 1 and only 1 purpose. If you're going to programatically draw a background for a scene, you may want a method called "drawBackground." Things like that will make it so that you develop your game in terms of building blocks and you will continue to be able to add what you need without making it too complex to understand.

It's all about efficiency!

Performance is a major issue for any game. The goal is to make the game as responsive as possible and to also look as smooth as possible. Certain methods like Canvas.drawLine are going to be slow. Also drawing an entire screen-sized bitmap onto the main canvas every frame will also be costly. Balancing things like that is necessary to achieve the best performance. Make sure to manage your resources well and use tricks to use the least amount of CPU to achieve your task. Even the best game will not be very fun if it can't perform well. People in general have little tolerance for choppiness or poor response.

Tips and Tricks

Take a look at the example for LunarLander in the SDK. It uses a SurfaceView and that would be the appropriate view to use for a game that needs the highest number of frames per second possible. If you're going 3D, take a look at GLSurfaceView. It takes care of the OpenGL device initialization and provides a mechanism for rendering. For LightRacer, I had to optimize the way I have everything drawn or else the framerate would be drastically lower. I drew the background to a Bitmap only once which was when the view is initialized. The light trails are in their own bitmap which gets updated as the racers move. Those two bitmaps are drawn to the main canvas every frame with the racers drawn on top and then finally an explosion. This technique made the game run at a playable rate.

It's also a good practice to have your bitmaps be the exact size you intend to draw them on screen, if applicable. This makes it so that no scaling is needed and will save some CPU.

Use a consistent Bitmap Configuration (like RGBA8888) throughout the game. This will save the graphics library CPU in having to translate the different formats.

If you're determined to develop a 3D game but have no 3D knowledge, you will want to pick up a book or two on 3D game programming and study up on linear algebra. At a bare minimum, you must understand dot products, cross products, vectors, unit vectors, normals, matrixes and translation. The best book I have come across for this math is called Mathematics for 3D Game Programming and Computer Graphics.

Keep the sound small and at a low bitrate. The less there is to load, the faster loading times will be and the less memory the game will use.

Use OGGs for sound, PNGs for graphics.

Make sure to release all media players and null out all of your resources when the activity is destroyed. This will ensure that the garbage collector gets to everything and that you don't have any memory leaks between launches of the game.

Join the Android Google group and find community support. There will be people that can help you along the way.

Above all, spend time testing and retesting and making sure that every little thing works exactly the way you would expect it to. Polishing the game up is the longest and hardest part of development. If you rush it out to market, you will probably have a disappointed crowd and you may feel that all your hard work is wasted. It's not possible to have 100% of people love what you write but you should at least try to put out the highest quality work that you can.

One best book for game Developing in Andriod download link below:

http://www.fileserve.com/file/MJEqDDw

Make google andriod application first

The Android Market is taking off. In March, over 9,000 applications hit the Android market, doubling the amount added the previous month, impressing Android users everywhere. Given the huge amount of new Android phones coming out this year, it doesn’t seem like things are going to level off anytime soon.

Recently, Google announced that they are sending free Nexus One or Droid devices to developers with 3.5+ stars and 5,000+ downloads on their applications – making it that much more attractive to become a (good) Android developer.


Want to know how to write Google Android apps? Android applications are written in Java – a relatively easy to learn, friendly language for new developers. Aside from the possibility of a free Nexus One and some money, you could actually contribute to the Android community. If you’ve got innovative ideas and the drive to see them spread, the Android market is for you! Let’s get you started on your very first Android application.

Before we get to how to write Google Android apps – first, a bit of overview. Android apps (much like almost any mobile app) are developed on a computer – PC or Mac (generally) – and then compiled and sent to the device for testing. If you don’t have an Android device yet, there are emulators that simulate an Android device on your computer, meaning that you can still develop an Android game or application without owning one.

Step 1: Get Eclipse

For this tutorial, I’m going to use Eclipse, because frankly it’s the easiest and most hassle-free development tool for Android right now. If you’re a NetBeans programmer, be my guest; but I’ll use Eclipse today.

Download Eclipse IDE for Java Developers (PC or Mac, 92MB)

Note: This is a .zip file; when you unzip it you will be able to run it wherever you unpacked it – there is no installer. I’d recommend that you put this in “C:\Program Files\” unless you plan on making it a portable application on a USB drive or something.

Step 2: Download The Java JDK

If you don’t have it already, you need to download the Java JDK 6. If you currently have the JDK 5, you should be okay, but there’s really no reason not to update. Just install it by downloading and then running through the setup to get things going. I’d recommend that you just hit next–>next–>finish, rather than doing anything fancy. Once you get things working, you can mess around a bit.

Step 3: Download The Android SDK Tools

Next, you’ll need to get the Android SDK Tools straight from Google. Unpack and install this to a directory you’ll remember – you need to reference this in the next few steps.

Step 4: Configure Eclipse For Your Android

Start Eclipse, and head to ‘Help>Install New Software‘. Hit “Add…” and for the name, type “Android” and set the link to “https://dl-ssl.google.com/android/eclipse/” (if this doesn’t work, try it with http:// instead of https://).Click “OK” and the following should appear.

how to write Google Android apps

Select both of the resulting packages, and hit next – this will download the Android ADT (Android Development Tools). Go ahead and start the download to obtain these two packages. Restart Eclipse (it should prompt you to on completion of the downloads). We’re almost ready to start coding.

Step 5: Configure The Android SDK

Navigate to the folder you downloaded/unpacked the Android SDK to. In there, you’ll find a file named “SDK Setup.exe.” Start that file – the following dialogue should appear.

how to write Google Android apps

Don’t feel obligated to download every single thing. Could it hurt? Not really. For me, however, I only really want to program for Android 2.1 and 2.01, so those are the only API packages I bothered to get (someday I may pay for my folly, but not today). Either way, get what you want (and you do need to pick one) and hit install. The SDK manager will install it for a little while – go grab a snack.

Step 6: Set Up Your Android Virtual Device (AVD)

Now that you’ve finished yet another painful download, click over to “virtual devices” (still in the SDK Manager). We’re going to create an Android device that will test run your programs for you! Hit “New” to create a new Android device, and put in the specifications that you want it to have. In the screenshot below, you’ll see the options I wanted (that closely mimic that of my Motorola Droid).

how to write Google Android apps

Click “Create AVD” to–well–create your AVD. Select your AVD from the list, and hit “Start” to make sure that you do indeed have a working emulation of an Android phone. After a pretty lengthy start-up wait, it should look something like this.

writing google android apps

Fool around with it and explore for a bit if you want, then close it up so we can get back to work.

Step 7: Configure Eclipse Again

Remember that Android SDK we got earlier? We didn’t do anything with it. Now, it’s time to tell Eclipse where it is so Eclipse can use it as a resource. To do this, open Eclipse and navigate to Window>Preferences (or on Mac, Eclipse>Preferences) and select the Android tab. As shown below, browse to the location of your Android SDK and hit “Apply“.

writing google android apps

Everything check out so far? Hit “OK” to save everything and let’s go program.

Step 8: Create A New Project

It’s finally time to code some. Navigate to ‘File>New>Other…>Android>Android Project‘, and input a project name, as well as some other details. If you want, copy from my screenshot below. Some of the fields need explaining that simply doesn’t belong here, so if you want to know more specifically, please let me know and maybe I’ll write an article about it.

writing google android apps

Hit “Finish” and the project will be created.

Step 9: Input Your Code

In the tree on the left, navigate to the “src” folder and expand everything. Go to the file with the name of your “Activity” (created in step 8, mine was HelloWorld) and double click it to see the contents. Presently, your code has all of the content in black (with some minor modifications depending on your settings). To make a working “Hello world” program, you need to add the text that is in bold red. Note that there are two bold red “blocks” of code, and you need to add both to make things work.

//==========Start Code============

package com.android.helloandroid;
import android.app.Activity;
import android.os.Bundle;
import android.widget.TextView;
public class HelloAndroid extends Activity {
/** Called when the activity is first created. */
@Override public void onCreate(Bundle savedInstanceState){
super.onCreate(savedInstanceState);
TextView tv = new TextView(this);
tv.setText("Hello, Android");
setContentView(tv);

}
}

//==========End Code============

I would love to explain all of the code, but that’s not exactly the point of this tutorial; the point is to get your feet off the ground. I know some/most of this is confusing; but it’s just how things are wired.

Step 10: Run Your Program

Above your code, you’ll see a little green “Play” button (or navigate to ‘Run>Run‘). Click it.When a popup box asks you how to run the application, you’re going to tell it to run as an “Android Application”. It will prompt you to save changes; hit yes.

Now you get to wait an eternity while your virtual device boots up. I’d recommend that you leave it open for the duration of your programming sprees, otherwise you’re going to spend more time watching the Android logo spin than you will watching your program freeze up. Just saying. Efficiency.

After everything’s done loading, your application should upload and start automatically. Which means that right after you “unlock” the device, you’ll be greeted with your first Android program.I only captured the top half of the screen because the rest of it is black.

make google android apps

That’s it, congratulations! The task can be a bit daunting at first; and definitely confusing, but if you stick with it you won’t be disappointed. If you step back and think about it, we only did a few really major things, the rest was just the process of connecting the pieces to make everything work.

Do you want to become an Android developer? Have you ever written an Android app, and if so, what did it do? As always I love getting feedback in the comments section. As someone who answered yes to the first question, I’m in the process of learning to adequately code for my Android device, so do you have any websites or pointers that would help me or a fellow Android newbie out?

Friday, May 13, 2011

Make Your own Android Applications

android_ibig.pngOk, so you’ve read the Android FAQ, successfully managed to install the Android SDK and get it up and running, so now you’re finally ready to get building some Android applications.

Below you’ll find anumber of links to sites that will be of great use to you as you get to grips with the Android SDK and begin to work on creating your own applications for the platform.

Android applications are written using the Java programming language, you’ll also use a custom virtual machine (Dalvik) to run and tst your creations. Dalvik is designed for embedded use which runs on top of the Linux kernal.

Below you’ll find a number of links to sites that will be of great use to you as you get to grips with the Android SDK and begin to work on creating your own applications for the platform. Information on how to develop applications, references,in-depth documentation and code snippets can all be found as you work your way through the various guides and tutorials.

An early look at the the Android SDK is also included showing you sample projects , source code, development tools, an emulator and all the libraries you’ll need to build your Android app.

Getting Started With Android

http://code.google.com/android/intro/index.html

This starter module will guide you through everything you need to know about making your first steps into developing for the platform. Talking you through the anatomy of the applications, development tools and getting you started on your first ‘Hello World’ project.

Developing Android Applications

http://code.google.com/android/devel/index.html

Android applications can be developed using the same tools used to develop Java applications. Android’s core libraries will provide you with the functions needed to build high quality rich mobile apps whilst providing you with development tools to make debugging, running and testing your applications much easier.

This module will guide you though the development proces, outlining the core philosphy behind the Android system and going over the key sections in good detail.

Developer Toolbox

http://code.google.com/android/toolbox/index.html

The developer toolbox module will walk you through how to write code that makes the most of the android systems features, allowing you to create custom components and really get to grips with the many API’s at your disposal.

Reference Information

http://code.google.com/android/reference/index.html

As you would imagine this module is made up of a good collection of reference material specificaly related to developing android applications. Details of the application framework and documentationfor the android core libraries are covered in full.

Sample Code

http://code.google.com/android/samples/index.html

A selection of sample code projects for Android Applications, API demos, Lunar Lander and Notepad.