Friday, 8 April 2011

PrimeWizard (my first non hello world android app)

Ok decided to post some of the details on the first android application i made, http://www.androidzoom.com/android_applications/tools/prime-wizardadmob_kres.html  a simple app for finding prime numbers, i made this in order to get a grasp of how to build functioning GUI's in android and as a test to go through the process of getting something on the marketplace.


The Code i used for finding if a number is a prime or not  was a simple loop i made originally to solve a puzzle in project Euler http://projecteuler.net/ .





This is how the start of the program appears a simple XML layout of buttons to select the language you want to use, for this i just used google translate, unfortunately you have to select your language every time, something some users complained about.
 An now for a shot of the functioning application, you enter in a number in the textbox at the top of the screen and then press the button below, the program will return a true or false result and also give you the nearest prime numbers above and below the number you have chosen.


The program Works but does have some flaws, i could have spent longer on the  GUI to make it more pretty and the size of the searchable numbers is limited to the size of 32 bit long integers, but if your going to be looking for larger primes you would probably want to use something more powerful than a smartphone.

No comments:

Post a Comment