Tuesday 30 July 2013

My Android Apps

Hey guys! It is all about my Android Projects.





Thesis Application

This is my first Android Application except for basic applications anyway I made this because of my thesis when I was in college, as a Computer Engineering student my panels want me to create a system that will show a graphical representation of a different electrical characteristics of a certain load via Android using the Bluetooth Module. In other words we need to create a hardware for measuring and a software for displaying the graph.

Modded Thesis App

Since we don't have the hardware so I modified my project and it can be access by anyone but it can't receive any value because I disabled the Bluetooth function.

GPS Tracker App

This is suppose to be my next project but unfortunately I don't have internet in  my place and I can't download the Google Service in the SDK Manager in order to get the google map. My plan is that a simple GPS Tracker that will determine the shortest distance from one place to another then it will create a line as a path and it will solve how much fuel will consume.

Line Creator App

I created this project for a reference in my GPS Tracker project. In this project you will just touch the screen, move your hands and then it will create a line.

Dee Game App

This is my first Android Game the codes are not really mine but thanks to the tutorial of (I forgot where did I got this tutorial.. haha). In this game is it has infinite levels, all you need to do is to destroy all the meteors and then you can proceed to the next level.

Kill Them All Game App

This is my second game but unfortunately I didn't really finish it because I just familiarize the codes that are used here and also thanks to the Edu 4 Java for the tutorial. Just press all the sprites that are walking in the screen and that's all.







Mr. Eskie

I read a book titled Beginning Android Games 2nd Edition by Mario Zechner and Robert Green so decided to create another game using their method. But there are applications that must be study first before creating the game:

Asset Test App

This project is all about how to read assets in the asset/ folder there we will store all the files that are needed in the game. I know you're wondering why is it must be store in the asset/ folder not in the res/ folder it's  because according to the book Android has the habit of modifying resources placed in the res/ folder, especially images (called drawables).



Bitmap Test App

Using bitmaps helps us to create sprites and backgrounds and all the jazz for us, which we can then load from PNG or JPEG files in the asset/ folder. You can determine the colorformat of the file and then convert it to a lower colorformat like from ARGB8888 to ARGB4444 so that there will be no wasting of memory.

External Storage Test App

This is used to store a file in SD card and read it again because in my game there's a highscore activity, in order to save and display the score it must be store first in the Android device. There's a lesson that I learned in the book:
  • Don’t mess with any files that don’t belong to you. Your users will be angry if you delete the photos of their last holiday.
  • Always check whether the external storage device is mounted.
  • Do not mess with any of the files on the external storage device!

Because it is very easy to delete all the files on the external storage device, you might think twice before you install your next app from Google Play that requests permissions to the SD card. The app has full control over your files once it’s installed.

Font Test App

This project is used to render text for our game like displaying some text using the font file in the asset/ folder.

Life Cycle App

I made this project in order to understand more about onCreate, onStart, onResume, onPause, onStop, onRestart and onDestroy which is very helpful in our game. Here are the three lessons in this project:
  1. Before our activity enters the running state, the onResume() method is always called, whether or not we resume from a stopped state or from a paused state. We can thus safely ignore the onRestart() and onStart() methods.We don’t care whether we resumed from a stopped state or a paused state. For our games, we only need to know that we are now actually running, and the onResume() method signals that to us.
  2. The activity can be destroyed silently after onPause(). We should never assume that either onStop() or onDestroy() gets called. We also know that onPause() will always be called before onStop(). We can therefore safely ignore the onStop() and onDestroy() methods and just override onPause(). In this method, we have to make sure that all the states we want to persist, like high scores and level progress, get written to external storage, such as an SD card. After onPause(), all bets are off, and we won’t know whether our activity will ever get the chance to run again.
  3. We know that onDestroy() might never be called if the system decides to kill the activity after onPause() or onStop(). However, sometimes we’d like to know whether the activity is actually going to be killed. So how do we do that if onDestroy() is not going to get called? The Activity class has a method called Activity.isFinishing() that we can call at any time to check whether our activity is going to get killed. We are at least guaranteed that the onPause() method is called before the activity is killed. All we need to do is call this isFinishing() method inside the onPause() method to decide whether the activity is going to die after the onPause() call.

This makes life a lot easier. We only override the onCreate(), onResume(), and onPause() methods.

  • In onCreate(), we set up our window and UI component to which we render and from which we receive input.
  • In onResume(), we (re)start our main loop thread.
  • In onPause(), we simply pause our main loop thread, and if Activity.isFinishing() returns true, we also save to disk any state we want to persist.

Media Player Test App

This is all about how to play a background music from the asset/ folder.

Multi-Touch Test App

It's all about how to handle a multiple touch in the screen.

Render View Test App

This is all about how to redraw the canvas all by itself it's like we first tell the Canvas to fill the whole view after that, we tell the system that we want the onDraw() method to be called again as soon as possible. This important to our game because we need a fast change of bitmaps.

Caution: Running this code will rapidly fill the screen with a random color. If you have epilepsy or are otherwise light-sensitive in any way, don’t run it.

Single-Touch Test App

It's similar to the MultiTouchTest but only a single touch in the screen which is also important to our game.

Sound Pool Test App

This is different from the media player because this is for special effects it will only play an audio file from the asset/ folder for 5 to 6 seconds.

Splash Screen App

The purpose of this is to show the logo producer of the game.

Surface View Test App

It's all about how to handle a surface. Surface is an abstraction of a raw buffer that is used by the screen compositor for rendering that specific View. The purpose of this is to create a graphics-based UI and update very quickly.

I already finished coding of my Mr. Eskie game but unfortunately it won't run in other words I'm still checking the errors of it.