Responsive Ads Here

Tuesday, April 26, 2016

Icon Mania Android Game

A) Overview

icomania is very popular game. It hit 100.000.000 players wordwide.
The rule is very simple: 1 picture (icon) that have 1 word. You need to find that word.


Features :
  • Cool UI
  • Easy to customize
  • Google In-app purchase integrated.
  • Admob supported (interstitial)
  • Unlimited levels
  • Leaderboard with SwarmConnect
  • Flurry analytics integrated
  • Rate me integrated
  • Share photos via Facebook

B) Getting Started 

Before starting to use this source code and developing this app, firstly, you need to install the following softwares to your computer. If you have already installed these softwares you can skip this step.
1. JDK 6 or above: Install Java Development Kit (JDK) 6 or greater. You can download here.
2. ADT Bundle: Luckily Google have combined Eclipse, ADT Plugin, Android SDK Tools, Android Platform-tools, The latest Android platform into one thing, it's called ADT Bundle. You can download here. Extract the zip file into a folder and run YOUR_FOLDER_PATH/eclipse/eclipse.exe

C) Importing Project into Eclipse 

1. Extract the downloaded archive that you have purchased in Envato.
2. Open Eclipse > Select File > Import.
3. At the Import window page select Existing Projects into Workspace under General and click Next. At the next window choose Select archive file. Press the Browse button and choose YOUR_PROJECT_PATH/icomania file present in the Project folder. Check all projects include icomania, swarm connect, android-sdk. Click Finish.
4. Your project will be visible at the Package Explorer
5. Right click at the icomania project, click on properties, if you import it successfully, it will look like this image



If you have errors after import, you need to clean the project by Go to Projects menu -> Clean -> Clean all projects or you can press Alt + p then hit "n"
Sometime eclipse still throws errors, you can change the name from icomania to Icomaniaa or something else. If it doesn't work please search your error on Google, this is eclipse error and it's something I can't help.


D) Changing Package Name 

You need to change package name in the .java, .xml files , android manifest.
1. Open Eclipse
2. Click on your project name
3. Press Ctrl + H
4. Change to tab File Search, type on com.kungfunguyen.onepicsoneword.
5. Click on Replace, then replace com.kungfunguyen.onepicsoneword to your own packagename
6. Go to src folder, press F2 to rename package name, replace com.kungfunguyen.onepicsoneword to your own package name

E) Changing App Name and Texts 

Go to res/values/ directory and edit strings.xml file.
?
1
2
<string name="app_name">icomania</string>  


F) Enabling Admob Ads, Flurry, SwarmConnect 

Go to res/values/ directory and edit configuration.xml file. You just need to replace YOUR_ADMOB_ID with your own admob id, ads will be display.
?
1
2
<string name="admob_id">YOUR_ADMOB_ID</string>
Change Flurry Analytics ID. Please go to http://www.flurry.com/, create an ID and put it here. You can read their documentation for more details
?
1
2
3
4
    <!--Replace placeholder ID with your tracking ID-->
<string name="flurry">YOUR_FLURRY_ID</string>
Change Leaderboard ID. Go to http://swarmconnect.com/, create an app and leaderboard id then put it here. You can read theirdocumentation for more detail
?
1
2
3
4
5
6
7
8
9
     
<!--Replace 10196 with your swarm app id-->   
<integer name="swarm_app_id">10196</integer>   
<!--Replace YOUR_APP_KEY with your swarm app key-->   
<string name="swarm_app_key">YOUR_APP_KEY</string>
<!--Replace 14676 with your leaderboard id-->
<integer name="swarm_leaderboard_id">14676</integer>


G) Changing Application Icon 

You can go here. Upload your own images, download icons and copy it to res folder


H) In-app purchase set up 

Please set up in-app purchase in your account follow instruction here. After set up, you need to wait few hours before it take effect.
If you want to test this feature before publish app, you can follow this instruction to set up testing accounthttp://developer.android.com/google/play/billing/billing_testing.html. Be note that you can't use your developer email to test in-app purchase
Change base64EncodedPublicKey in StartActivity.java line 106 and PlayActivity.java line 130 to your key
In StartActivity.java change REMOVE_ADS to your sku id
In StartActivity.java change SKU_750, SKU_2000, SKU_5000, SKU_15000 to your sku id
If you have any problem with in app purchase please hire a developer or search it on internet or email Google. In my demo apk this function is already works so the error can't come from my code.


I) Other Configuration 

Go to res/values/ directory and edit integer.xml file.
?
1
2
3
4
5
6
7
8
9
10
    <resources>
     <integer name="base_score">100</integer>
     <integer name="base_penalty">10</integer>
     <integer name="help_icon_shake">15</integer>
     <integer name="help_icon_shake_repeat">7</integer>
     <integer name="help_reveal_letter">100</integer>
     <integer name="help_remove_letters">200</integer>          
     <integer name="interstitial_level">1</integer>
</resources>
interstitial_level is number of levels per interstitial ads. If you set it to 3, it means the interstitial will be show each 3 levels complete.
help_reveal_letter is number of coins need to use to reveal a letter
help_remove_letters is number of coins need to use to remove a letter
help_icon_shake_repeat is number of shake repeat times for help icon
help_icon_shake is number of second before shake


J) Add images 

Put your images in assets/pics. I suggest size is 320x320 to save the apk size.
INSERT INTO WORDS (_id, unlocked,solved,score,word,letters,image,suggestion) 
VALUES (1,1,0,0,'CAT','CUTODKEADUECSKD','pics/cat.jpg','ANIMAL');
This is a sql query to insert words into database.
In this example 'CAT' is the correct word, CUTODKEADUECSKD is letters provided to guess, you MUST need to provide more than 12 letters.
'pics/cat.jpg' is link to image folder
'ANIMAL' is the suggestion word


K) Change the base points 

Go to AppPreferences.java, go to line 45. Change 500 to whatever you want. It's the starting coins for the game


L) Compiling the Application 

After customizing this app, you need to compile into an .apk file that can be installed in Android devices. Here are the steps of compiling this application.
1. Select the icomania project in Package Explorer, Right click and select Export.
2. At Export window select Android > Export Android Application. Then, click Next button.
3. Your project name will appear in Project: box. If not, click Browse and find. Click Next button to proceed.
4. Select your keystore or create a new one. In Location, click Browse button to decide keystore name and the location of it. Give a strong password and proceed to next step.
5. Fill the key creation form and press Next.
6. Finally, click Browse button to specify the location where you want to have the generated apk, and then click Finish. Now your application is ready. Install it. Have fun.


Link Download :
1. Apk File
Iconmania Apk File


2. Source Code
 Iconmania Source Code

No comments:

Post a Comment