Showing posts with label android programmer. Show all posts
Showing posts with label android programmer. Show all posts

Tuesday, February 11, 2014

Android Programming, 3D Images and OpenGL ES

As disused in my previous article "Unity Game Engine's Mesh Renderer, Mesh Filter, Shaders and Materials Overview" a 3D scene is defined by a collection of vertices that include attributes such as position, normals, texture values, etc. For a device to display a 3D animation scene, the scene is transformed into a 2D image through the rendering process (aka the rendering pipeline or graphics pipeline).

This articles discusses the Open Graphics Library specification for Embedded Systems (OpenGL ES) used to define shaders and other elements to render 3D scenes. It also discusses the OpenGL Shading Language specification. And it provides an overview of a simple Android application that uses the OpenGL ES to render animated graphics on Android devices.

OpenGL ES and the OpenGL® Shading Language

For a 3D scene to display there are a series of steps executed through the rendering pipeline. These steps ensure 1) only the objects within the camera's view display, 2) reflections are properly added, and 3) images behind other images are shown/hidden based on the camera's view. The output is then merged and the final image displayed. The last stage of the rendering pipeline finalizes what pixels will display based on the pixels closest to the camera and other variables mentioned. The 3D scene below, from the Stealth game, shows a game scene that has not yet gone through the rendering pipeline.



When we run the game (so that the vertices are transformed into a 2D image), notice we only see the game objects closest to the camera.  And, based on the camera's view objects behind some of the partitions are hidden. As the player moves the view shifts and more processing occurs to render the images that are now within the camera's view.


Developers who specialize in 3D and animation can program some of the stages associated with the rendering pipeline by creating programs called shaders.  Shaders execute inside the graphics processing unit (GPU) and define how the data is processed to, ultimately, display the final image. The ability to create shaders means developers can now create custom effects that were not possible when the rendering pipeline only included pre-programmed stages.

The OpenGL ES is a cross-platform API used to create and compile shaders and execute other related operations including the ability to define buffers that the shaders write to.

OpenGL Shading Language


In addition to the OpenGL ES specification the OpenGL Shading Language specification is necessary to understand the different data types that can be used including vectors, matrices, opaque types, samplers (which are handlers to textures), cube maps, depth textures for shadows, etc. It also defines the statements and structures, variables (including constants) and more. The OpenGL Shading Language support progamming the following shaders: vertex shader, tessellation control shader, tessellation evaluation shader, geometry shader, fragment shader (sometimes called the pixel shader), and compute shader.

Vertex and Fragment Shaders


Each shader type is directly linked to a processor. For example, Vertex shaders run on the vertex processor. The vertex shader is used to read the coordinates of the vertices, transform them to 2D screen coordinates as well as process other attributes of each vertex such as color, normals, etc.

The fragment shaders (also referred to as pixel shader) receives pixel data, calculates the final color of the pixel and passes it to the next stage so the final output can be produced. The pixel shader can change the depth of the pixel to define what pixels should or should not be drawn. By default, the depth defines the distance between the originating triangle and the camera. But, the developer can manipulate the distance by specifying a value that will be used when the final image is created.

(You can read a more general overview of Shaders by reading my previous article Unity Game Engine's Mesh Renderer, Mesh Filter, Shaders and Materials Overview.)

Android and the OpenGL ES


Android includes support for 2D and 3D graphics using the OpenGL ES API. Android supports several versions of OpenGL ES as follows:
  • OpenGL ES 1.0 and 1.1 is supported by Android 1.0.
  • OpenGL ES 2.0 is supported by Android 2.2 (API level 8).
  • OpenGL ES 3.0 is supported by Android 4.3 (API level 18).
Note that when you use a higher version of OpenGL ES with android; all lower versions are supported. For example, if your app uses OpenGL ES 2.0; it also supports OpenGL ES 1.0

Before you start developing your 3D app or game you will want to download and install the Android Developer Tools (ADT) Bundle and access the Android SDK Manager to download the applicable Android SDK platform, etc. For more information, please see my previous article titled:  Programming Mobile Apps for Android With Eclipse.

Note:  When you create an emulator, as outlined in my previous article, make sure you check the option to enable the GPU on the host. As mentioned, OpenGL ES apps require access to a GPU.


Displaying Graphics on Android with OpenGL ES

 

Android Manifest


When you create an Android app that supports OpenGL ES, you must add a declaration to the AndroidManifest.xml file. The uses-feature statement to be added includes the glEsVersion attribute, which provides a way for developers to define the OpenGL ES version required to run the application. For example, if OpenGL ES version 1.0 is required; the glEsVersion attribute is set as 0x00010000. If an application requires OpenGL ES 2.0 and OpenGL ES 3.0; the value of the attribute is set to 0x00030000. It is then understood that the application supports not only OpenGL ES 3.0; but also all lower versions. Here is what the uses-feature statement looks like (in this example the application requires OpenGL ES 2.0):  <uses-feature android:glEsVersion="0x00020000" android:required="true" />

The uses-feature statement takes two other values besides glEsVersion as follows: android:name and android:required. Android:name defines a valid value from the hardware or software list at the bottom of the Uses-Feature API Page. The android:required value defines whether the feature is "required" to run the app. True means the feature is required; false means use the feature if it is available on the device.

The classes that make up the android application project is defined by the graphics and their behavior. Take a look at the simple Hello OpenGL ES projects, which can be downloaded from http://developer.android.com/training/graphics/opengl/environment.html.

Note: Once you download the project, you can use the Import option, available from the File menu in Eclipse. You can then use the "Existing Android Code Into Workspace" option to import the project and then run it as an Android Application. Remember you cannot run the project without an emulator that has GPU support and the android version that corresponds to the required OpenGL ES version, as discussed in Android and the OpenGL ES section above. 



The download includes two android application projects. One requires OpenGL ES version 1.0 the other requires version 2.0. When you run the application it displays a triangle and a square. You can click and rotate the triangle because it was programmed to respond to user interaction.

 Hello OpenGL ES Android Application Project Classes


The Hello OpenGL ES project's core classes are as follows:
  • MyGLSurfaceView
  • MyGLRenderer
  • OpenGLES20Activity
  • Square
  • Triangle

MyGLRenderer implements the GLSurfaceView.Renderer class, which is used to render a frame. In the Hello OpenGL ES project the GLSurfaceView.Render uses GLES20 constants to draw the background color of the frame. It uses the Matrix class to set the camera position as well as calculate and store 4 x 4 column-vectors for rendering. (Below is an example of the 4 x 4 column-vector matrices from the OpenGL ES Android reference:)

  m[offset +  0] m[offset +  4] m[offset +  8] m[offset + 12]
  m
[offset +  1] m[offset +  5] m[offset +  9] m[offset + 13]
  m
[offset +  2] m[offset +  6] m[offset + 10] m[offset + 14]
  m
[offset +  3] m[offset +  7] m[offset + 11] m[offset + 15]


The Hello OpenGL ES project introduces quite a few interesting programming concepts. For example, the MyGLSurfaceView class implements the GLSurfaceView class, which creates a view container (which manages a surface so OpenGL can render to that surface) used to render OpenGL ES graphics as well as capture touch events so users can interact with the graphics. Th android activity class creates an instance of the GLSurfaceView to serve as the Content View for the activity.

In the project the MyGLSurfaceView calls the MyGLRenderer class so the graphics can be rendered using the GLSurfaceView.Renderer class. Both the Triangle and the Square class use the GLES20.glCreateProgram() command to create an empty OpenGL ES program. And the GLES20.glAttachShader command is used to add the vertex and fragment shaders to the program.  The GLES20.glLinkProgram command (or public method) is then used to create the OpenGL program executables. The vertex shader executable runs on the vertex processor and the fragment shader executable runs on the fragment processor.

Since the user can interact with the triangle, the triangle coordinates are captured and used to write the position of the triangle. The MyGLRender class is implemented in a way that ensures, once the triangle is rendered, it is only rendered again when the data changes.

Summary


Overall the Hello OpenGL ES project has a very simple design that executes the key elements of an animated graphics android application. This program can help developers more easily understand how to program graphics using the OpenGL ES API as well as create shaders and assign buffers. For more information you can refer to the following list of resources:


Saturday, September 14, 2013

Get Started With Kindle Fire Programming: Apps & Games

You may be wondering whether it's worth your time to learn about Kindle programming. If so, you can consider two things: 1. If you have learned (or are going to learn) Android mobile app programming you are (or will be) well on your way to programming for Kindle. 2. While hundreds of iPhone and Android customers have taken time to add comments, on Amazon, for their devices--over 17,000 customers have taken time to pledge their allegiance and declare their love for Kindle. This means, there are a lot of customers out on the lookout for new apps or games to install on their beloved Kindle. So, if you want to learn Kindle programming basics this article will help you get started.

Introducing Amazon Kindle


Amazon Kindles fall into two categories: Kindle E-readers and Kindle Fire Tablets. Kindle E-readers include the Kindle Paperwhite 3G, the Kindle and the Kindle DX devices. The E-readers enable users to download and access digital books, audio books and magazines.

Kindle Fire Tablets include the Kindle Fire HD 8.9 Tablet (and 8.9 4.G Tablet), the Kindle Fire HD Tablet and the Kindle Fire Tablet. The Tablets are designed to give customers a broader range of capabilities including stereo speakers for virtual surround sound, faster downloading and streaming speed. And, most importantly, customers can use their Tablets to enjoy movies, TV shows, music, magazines, digital books, audiobooks, games and apps-- including popular social networking apps such as Facebook and Twitter. This article focuses on programming for Kindle Fire devices.

Getting Started


To get started with Amazon Kindle application or game development developers must set up the Android Development Environment for Eclipse. For more information on setting up Eclipse see the  article titled, "Mobile Software Programming: Designing & Building Mobile Apps (Android)." Once the Eclipse development environment is ready to develop Android apps; it's a good idea to create an Android app to verify that the development environment is set up properly. This way as you configure the development environment to code and run Kindle Fire apps you can narrow down troubleshooting problems.

Once your development environment runs an Android app without errors you can then setup your environment to build and deploy Kindle Fire apps and games. To begin setting up Eclipse to build Kindle Fire apps or games you will need to visit the following location to download the Amazon Mobile SDK:  https://developer.amazon.com/sdk.html. When you click the Download SDK button you will be prompted to download the apps-SDK.zip file. If you scroll down the page you will notice this page also provides an overview for each API included in the SDK. You can navigate to the following link to learn how to install the SDK:  https://developer.amazon.com/sdk/fire/eclipse-plugin.html .

Amazon Mobile SDK


When you install the Amazon Mobile SDK, Amazon JAR files, API documentation and other files are added to your computer. Note that as you step through the Amazon Mobile SDK installation process you will see a screen similar to the one below; however, the top-level list items are collapsed so the child items are not visible. You will select the Accept License option button on the bottom right.



To accept the "license use" for the child items, you will need to expand the top-level  (or parent)  item to view the child items. You can then use the Accept option button that becomes enabled on the bottom left. (Hopefully this tidbit will save you a bit of frustration that would come from assuming the "Accept License" option button on the right lets you accept license use for both parent and child items.)



The SDK API files and folder structure is discussed on the following page: https://developer.amazon.com/sdk/thank-you.html. When you install the Amazon Mobile SDK (see the section titled Installing SDK Add-Ons at https://developer.amazon.com/sdk/fire/setup.html) folders and files are installed in the extras folder in the Android SDK folder (the following picture shows the extras folder in the Android SDK - ADT Bundle for Windows folder).


The amazon folder (added to the extras folder) includes two folders: DeviceProfiles and kindle_fire_usb_driver. The DeviceProfiles folder includes the devices.xml file, which includes definitions for the Kindle Fire virtual devices (a portion of the devices.xml file is shown below).


The kindle_fire_usb_driver folder includes the KindleDriver.exe. This is the file that is executed to install the drivers for the Kindle Fire emulator devices. The intel folder pertains to the emulators and is discussed below.

Kindle Fire Emulators


You can use ARM-based system images or x86 system images when configuring the Kindle Fire emulators. The x86 system images enable you to use an accelerator so that the loading and running speed of the emulator is comparable to that of a real Kindle Fire Tablet. The intel folder, in the extras folder discussed above, includes the Hardware_Accelerated_Execution_Manager folder. This folder includes the IntelHaxm.exe used to install the Intel Hardware Accelerated Execution Manager (HAXM) after you have enabled the visualization extensions on your computer, as shown in the following picture. (For more information see the section title Setting Up the x86 System Images for Faster Emulation and visit https://developer.amazon.com/sdk/fire/arch-emulator.html.)


If you are not able to configure your computer to use the x86 system images you can still use the ARM-based system images. After you start Eclipse you can select Window -> Android Virtual Device Manager. If the SDK is installed properly you will see that Kindle Fire devices have been added to the Device list (as shown in the picture below). And, Kindle Fire APIs have been added to your Target list. If you want to create an emulator simply click the New button on the Android Virtual Device Manager. The following link provides documentation regarding what API should be associated with each emulated device: https://developer.amazon.com/sdk/fire/emulator-guide.html.

As you create a virtual device you can indicate the type of image you want to use, as shown in the following picture.


Keep in mind that when setting up the devices the SD card and Internal Storage size both impact the amount of time it will take to start and run the device. If you have a large SD card/Internal Storage size you can expect the device to take some time to start. If you want to test your emulators to make sure they load properly before installing your app on the emulator you can access the Android Virtual Device Manager, select the desired emulator then click the Start button. Again, your computer and device configuration will drive how much patience you will need to exercise while waiting for the device to turn on and start, as shown in the picture below.



When you are ready you can follow Amazon's instructions to get started by creating a basic "hello app". This tutorial is located at: https://developer.amazon.com/sdk/fire/create-app.html. With your virtual device (emulator) working and your app created you can run your application using the desired device(s). There are several emulator devices to choose from including the First Generation Kindle Fire, the Second Generation Kindle Fire, Kindle Fire HD, etc. Below are pictures showing the simple sample app running on the First Generation and Second Generation Kindle Fire emulator devices.


First Generation Kindle Second Generation Kindle


The following documentation provides more information on the Kindle Fire device specifications to help you better determine the devices to which you would like to make your apps available: https://developer.amazon.com/sdk/fire/specifications.html. If you have a Kindle Fire Table, you use your device instead of (or in addition to) the emulators to test your apps. For more information see Setting Up Your Kindle Fire Tablet for Testing at  https://developer.amazon.com/sdk/fire/connect-adb.html.

Game Programming - Amazon GameCircle API


Amazon GameCircle provides the API and other tools needed to build game achievements and leaderboards for Kindle Fire games. It also provides the API needed to implement Whispersync so customers can save game progress to the cloud. (You can read an introduction to achievements and leaderboards by reviewing the section titled: A Mobile Game Application in my previous article titled Mobile Software Programming: Designing & Building Mobile Apps (Android).)

To get started with GameCircle you will need an account on Amazon's Mobile Apps Distribution site at https://developer.amazon.com/home.html . Next you have to create a security profile for your apps.


Once you add a new security profile for your application(s) Amazon automatically generates a ClientID and a Client Secret value. These two values are part of your apps' security profile credentials.  The API Key allows Amazon to verify your app's identity. In addition to the API Key, Credentials are also required.  As part of the Credentials the developer provides the API Key name, a package name and an MD5 signature. A complete security profile is then created for the application (as shown below). For more information on GameCircle configuration visit https://developer.amazon.com/sdk/gamecircle/documentation/gamecircle-config.html.



(Note:  Keys can be generated or existing digital signatures can be viewed using the Java keytool, which is a key and certificate management tool that manages a keystore used to store cryptographic keys, certificates, etc. These concepts are all part of the public/private key infrastructure (PKI). Certificates and digital signatures can be used to establish the origin of software, with a degree of certainty, based on the underlying cryptography algorithm used. Note that when you install the JDK the keystore tool is added to your computer. And, when you install the Android SDK a debug.keystore file is added to your computer. You can use your computer's search feature to find these files.)

Once you have completed your security profile you can then link your security profile to a GameCircle configuration, as shown in the following picture.


Once you have linked your security profile you can click the View link under leaderboards (in GameCircle, as shown in the above picture) to add leaderboards. And, you can code your leaderboards in Eclipse. To learn more about Kindle Fire Leaderboards you can visit https://developer.amazon.com/sdk/gamecircle/documentation/leaderboards.html.



You can also click the View link under Achievements (in GameCircle) to add Achievements. And, you can use Eclipse to code your game achievements. To learn more about Kindle Fire game achievements you can visit https://developer.amazon.com/sdk/gamecircle/documentation/achievements.html. You can also code your game to use Whispersync so customers can access the game and continue playing from any mobile device.

Once you're ready to test your app you can add your testing nickname to GameCircle. You can also associate the applicable leaderboards and achievements to your testing nickname to test your game. For more information see https://developer.amazon.com/sdk/gamecircle/documentation/gamecircle-setup.html and https://developer.amazon.com/sdk/gamecircle/documentation/sandbox.html.

For Programmers Who Need Free Access to a Robust Development Environment


For hard-core programmers and game developers a robust programming and testing environment may be required. Whether you plan to build business applications, mobile games, massively multiplayer online (MMO) games or even social networking games for apps like Facebook you may consider trying Amazon Web Services (AWS). To help new AWS customers get started with AWS, Amazon provides information on how usage limits that will enable you to use AWS for free. The AWS Free Usage Tier can be used to gain hands-on experience with AWS; or,  to practice building large-scale games or apps. Visit http://aws.amazon.com and look at the section titled AWS Free Usage Tier (Per Month) to see usage limits if you don't want to be charged to use AWS or want to keep charges to a minimal.

There is also an AWS Toolkit for Eclipse, which makes it easier for developers to develop locally or even share files with developers in other locations, if applicable.


A future article will provide more detailed information on programming applications using AWS; and,  distributing your apps/games on Amazon.

Thursday, August 8, 2013

Mobile Software Programming: Designing & Building Mobile Apps (Android)

We've all heard the Nick D'Aloisio's story right? He's the British high school student who built and sold a mobile news app to Yahoo for $30 million earlier this year. He is just one of many developers who have learned they can make good money developing mobile apps--particularly ones that add value to social networking apps. This blog article presents an overview of software design and programming associated with one of our biggest passions "the mobile phone".

Introduction


Software development for mobile devices refers to developing software for a mobile phone, tablet or other handheld device. Within the Information Technology community mobile phone development is part of the telecommunications (or telecom) industry.

When we pick up a mobile phone to make a call we are holding hardware manufactured by Motorola, Apple, Nexus, Samsung, LG Corporation or some other corp. The phone has an operating system (OS) and additional apps so you can make calls, store phone numbers, add calendar appointments, etc. The OS might be Android built by Google. Or, you may have a phone running Windows by Microsoft; or, even a iPhone running iOS by Apple. When you install applications on a phone you select applications that are compatible with the phone's OS. 

Ever stop to wonder why you can't use a Verizon phone on a Sprint network? When Google, Microsoft or other software development company develops a mobile OS that company does not customize the OS for one or more networks (such as Verizon, AT&T, Sprint, etc.).  Instead Verizon, AT&T, Sprint and other telecommunication companies hire software developers to customize the mobile OS so the phone connects to and communicates with their network. I had an opportunity to support a software development project at Nextel, before it was acquired by Sprint. It was an amazing, insightful opportunity.



There are three types of apps that can be developed for the mobile phone: 1. Mobile version of a web application; 2. A mobile business or other non-game application; and 3. a mobile game application.

Mobile Version of a Web Application


Often companies want software developers to build a web application, which is installed on a web server and accessed using a web browser. These developers are often tasked with building a mobile version of the web application. When building a mobile version of a web app a phone's OS isn't considered. This is because the user will use the phone's browser to access the mobile version of the web app. Consider the following blog site.


Following is the mobile version for the same page shown above. Notice the image is gone and the navigation has changed. Since this is a blog app a "categories" drop-down is added so users can select a category and clicks the Refresh button. The page then displays a list of articles associated with the selected category. The links have been added so the user can navigate to the details stored on a separate page. Content on a mobile page is typically limited so the page loads quickly.


The following picture shows the page the user was directed to after clicking the "Day 1 Class Notes - 7th Grade English... link on the above page.


The mobile version of a website or web application is designed to be intuitively; and, enable users to easily access information. In addition, images may be removed, especially if they are large, so loading pictures doesn't slow down the page load. Lastly, header and footer designs are either simplified or not shown on a mobile version of the site or web app.

Mobile Application Design


The a key different between developing a mobile web app versus a mobile app or mobile game app. The key difference is the non-web mobile app or mobile game is developed to be installed directly onto a mobile device. Therefore, the mobile phone's operating system is a consideration when developing a non-web mobile app or mobile game.

There are various aspects to designing a mobile app including the application structure. Every mobile app (including games) include a top Level page (also referred to as the Start Screen). The Start Screen is the page the user sees when first accessing the application. The Start Screen for mobile apps have an action bar (that includes the app's icon or title). The action bar may include a button to create content; and,t it may also include a search icon so users can search content. The Start Screen may include tabs or other ways to navigate through various views of the data. Mobile apps built to manage data also include category views and detail/edit views.  Let's look at the design of a couple of Android apps.

Consider Google's Blogger application (or app) used to manage blog articles. Notice the action bar at the top includes the icon and the app title. The pencil is the button used to create a new post unless the checkbox beside a post is selected.  In that case the pencil is the button used to display the edit post page view. In addition three tabs are displayed so the articles can be grouped using the following categories:  All, Published or Draft. This means users can view all articles; only published articles; or, articles for which a draft has been created. In the following picture the Published category is selected.


Notice the top level page includes a list of articles that shows us the title of the article, the keywords associated with the article and the date the article was published. The user clicks on an article to view the article details.  (Note that Google's Blogger can be accessed using the mobile phone's browser; or, users can download and install Google's Blogger mobile app from Google Play.)

Consider the Calendar mobile app used to manage events or appointments. The action bar at the top of the page includes the month and year. It also includes a menu so users can select a view as follows: Day, Week, Month or Agenda. And, the action bar has a button that allows the user to create a new event. The top level page also has tabs that include the same options as the action bar menu. If the user selects week the user can view all events for the week. Or, if the user selects Agenda the user views a list of all events. From any of these views the user clicks on an event to view the details pages that contains detailed information for the event.

Twitter's action bar includes the Twitter icon, the tab selected (in the following page Me is the tab select). Also notice you can search content or create a new tweet from the action bar. The top level page displays profile information that spans 2 pages. The tweets, # of followers and # following of people following you are also included. In addition, only the first few tweets are loaded when the page displays. This approach ensures users don't have to wait too long to view the top level page. Notice the Home, Connect, Discover and Me options are available from the top level page. As previously mentioned, the following capture shows the Me option selected.

The mobile music app presents an example of how the top level can offer users a number different views to present the same data. For example, the Songs view lists each individual song (and yes I do listen to Christmas music all year despite my daughter's complaints). The Artists view groups songs by artist. Notice in the following picture I have songs from three Take 6 albums. The music app groups all of the Take 6 albums under one artist and displays the picture for each album. Users click the button with a circle and arrow to expand or collapse the items listed under an artist. The Albums view groups the songs by album. And, the Playlist view groups songs by favorites, most played, recently played, and recently added.


When the phone is turned landscape the app automatically displays the album image for every album. The title of the album playing scrolls across the bottom of the album image.



Notice, most mobile applications follow a design concept that focuses on making user access intuitive and simple. In every example, the mobile application is designed so users spend more time using the app and less time learning "how to" use the app. To learn more about designing mobile apps view Google's Design page for mobile apps.

A Non-game Mobile Application


Android applications are created using Java, which is one of two popular programming languages used by businesses across the country. Android is a multi-user system in that each application is treated like a different user; and, each application is automatically assigned a unique user ID when it is installed. Also, once installed, the Android app resides in its own security sandbox. And, the system ensures each app only performs the actions its permissions allow it to perform based on selections made by the user during the installation process.


Building Your Development Environment


Mobile app programming can be interesting and fun--especially for those who spend hours on the computer. Prior to building an Android app you have to configure your computer (or laptop) to serve as a development environment. This includes downloading and installing the Android SDK - ADT Bundle for Windows or other platforms.



Once you download the ADT Bundle you end up with a zipped file called:  adt-bundle-windows-x86-20130729.zip (unless you download the 64 bit for Windows or version for a different operating system). You will need to add a new folder to your computer and then extract the contents of this file to the new folder you created. When you navigate to the extracted files you will see the SDK Manager.exe.


You can double-click the SDK Manager.exe to install the Android SDK tools including the Eclipse plugin, Android app samples and more.


Once you have installed the Android SDK you can launch Eclipse by navigating to the folder you created and then exploring the contents of the Eclipse folder. Locate and double-click on the Eclipse.exe file to launch the Eclipse development environment.



The Android Developer Tools splash screen displays, as shown below.



Next, the Eclipse Integrated Development Environment (IDE) displays. You can then create a project and begin developing Android apps.



Once you have reviewed the Android App Fundamentals you can use the Training link to learn how to build your first Android App. The training presents the steps on how to create a project, build a simple user interface and more. The best rule of thumb is to following the trainings to learn how to build an Android app. Once you are successful at following the trainings and you understand how the training apps are developed; you can then practice building small apps to become experienced in building custom apps. Most importantly, don't expect to conquer the Android app world overnight.

After you have finished developing your app you will want to test your app. The Android framework includes an integrated testing framework so you can test your application. In addition, the Android SDK includes tools that enable you to setup and run your test applications. Once you have completed testing you are ready to learn about distributing  your app.

Next, you'll want to follow the steps necessary to publish your Android app to Google Play, which is the tool Android users turn to to pay for, download, and install mobile apps. To publish your app to Google Play you must become a registered developer. This is part of the process required to "Register for a publisher account". Be prepared to pay the $25.00 registration fee. This process will enable you to publish your Android app to Google Play and make it available to your target audience.



Whether you are just getting started with Android development; or, you have some experience you may enjoy your development experience more if you join a development community.  Or, if you want to become an Android developer; but you are a bit nervous join a development community and read about other's experiences. Development communities share information. This approach gives you access to fellow developers with whom you can share problems and gain insight, etc. There are several communities that you may find useful. A few of these communities are listed in the following paragraphs.

The first community is  XDA Developers, which is a software development community that focuses solely on mobile technologies. The community includes over five million users and the group shares tips, helps troubleshoot problems and more.  XDA Developers enables users to view and download content as a guest. However, to post comments you must register. XDA Developers can be accessed by navigating to http://forum.xda-developers.com/ .  XDA also have an XDA TV channel that presents very useful information. The Register button is located in the far right corner of the page as shown below.


You can also join Google's Android Developer group at https://groups.google.com/forum/#!forum/android-developers . Android Community is also another choice. Android Community is an open-source project community led by Google. You can learn more about the Community by visiting the following link: http://source.android.com/index.html .

A Mobile Game Application

Game developers can use Google Play game services, and their imagination, to building interactive, addictive games.


Game developers can also incorporate achievements that unlock new game capabilities once a player obtains a number of points defined by the game developer. 


The achievements can be tied to levels (i.e., a player completes level 1 after earning 100 points, which then unlocks level 2). Or, developers can tie achievements to game capabilities. For example, with the game Plants vs Zombies players must reach a certain level in the Adventure part of the game to unlock the Quick Play functionality.




Another very useful option that can be added to games is Cloud Save. Developers can incorporate the Cloud Save service so players can play a game across multiple devices. For example, while in the car a child may play a game using a mobile phone. Once the child gets home he can go to a computer and pick up where he left off by playing the web version of the game. Cloud Save enables data to be synchronized across multiple devices so the player never looses progress as he moves from one device to another.

Games can also include a capability called leaderboards, which can be used to up the stakes by allowing players to compare their score to previous game scores; or, top scores from other players. When the developer creates a leaderboard for a game the developer programs the leaderboard to submit the score to one or more leaderboards at the end of a game.

At the end of each game the game checks to see if the player's score is better than a previous score, which can be compared to daily scores, weekly scores or all-time high scores. The game will always update the leaderboard with the best score so the player (or other plays) can see how good a player is at the game.

Games can also be built to support multiple players (referred to as multiplayer games). For example, the real-time multiplayer game can be developed to include participants and a virtual meeting room, used as the game space. Games can be designed so that a player can invite other players to the virtual meeting room. Players who accept the invitation are joined to the meeting room. Or, the game can be designed to automatically match players to a meeting room based on preferences stated by the player.

Lastly, with Google Play game services game developers can build games so players can sign into the game using their Google+ account. Users can play other Google+ players by accessing multiplayer mode on the mobile game. Game players can even compete with one another and compare scores. In addition, developers can add a Google+ Share button so players can post tips, progress and other information about the application right to their Google+ wall from within the game--adding the power of social networking to a player's experience. Like non-game applications, Android game applications must be published. Games are published  to Google Play Game Services and to Google Play.

Future posts will include more details on mobile programming and programming for the Amazon Kindle (which is pretty hot right now).

This article has discussed a few of the capabilities available to game developers. Note that there is an interesting video about game development at:  https://developers.google.com/events/io/sessions/326367481. The video is hosted by Dan Galpin, who is a Developer Advocate; Jaewoong Jung, who is a software engineer that builds games; and Jennie Lees, who is a product manager.

For More Information


The following links provide access to trainings, tutorials and additional information you may find useful in your endeavor to become an Android app developer, Android game developer or both: