The Restaurant App Free Source Code


About the File 
The Restaurant App is a mobile reservation system that used for managing reservation and 
restaurant menu. Admin can manage reservation, restaurant menu and other configurations 
such as tax and currency code from admin panel on the web and users will be able to see the 
menu from mobile app and make a reservation. Run under Android platform which is the 
number one popular mobile operating system right now. 
When you buy this item you will get project file of Android app, apk file, admin panel, sql 
database and also this documentation file to guide you installing this app. 
This Source Containing
Free Download Source Code HERE

Related Posts:

Phone Alarm Eclipse Source Code With Admob


How to open the project in Eclipse?

  1. Open Eclipse > Import > Android > "Existing Android Code into Worksplace" > Next
  2. Root Directory > Click Browse button & browse the project folder > Select projects Phone Alarm
  3. Add google-play-service_lib from Android SDK
  4. Right click on the project name > Select properties > Click "Add" library > Select google-play-service_lib
  5. Then go to 'Project' Menu > Clean.. > Clean All Projects > OK
  6. Wait for few minutes until all errors are gone.

How to change the package name? 

    You can change it easily from Eclipse. Here are the steps:
    1. Right Cilck 'Phone Alarm' project from Package Explorer > Android Tools > Rename Application Package > Finish.
    2. Refactroing dialog present and click Finish
    3. Package Name Changed in AndroidMainfest.xml but not in Application Package hierarchy so select Package name Right Click > Go to Refactor > Rename >Enter Package Name > Finish

How to change app name?

    1. Open Eclipse >PhoneAlarm> res > values > strings.xml
    2. Select 'strings.xml' tab next to 'Resources' tab
    3. Enter your app name inside "app_name"string tag:
      <string name="app_name">Phone Alarm</string>
    4. if you want change Project name also then >Right click 'PhoneAlarm' project from Package Explorer >Refactor > Rename > Enter Application Name > Finish
    This will change both title inside the app & app icon name.

How to change AdMob publisher id?

  1. Open Eclipse > PhoneAlarm > res > values > strings.xml
  2. Select 'strings.xml' tab next to 'Resources' tab
  3. Enter your AdMob intersititial id inside "admob_intersititial" string tag:
    <string name="admob_intersititial">Your AdMob ID Here</string>
  4. Open Eclipse > PhoneAlarm > res > layout > activity_main.xml
  5. Enter your AdMob banner id inside "ads:adUnitId"
Free Source code DOWNLOAD HERE

Related Posts:

Bird Adventure Android Source Code


Overview
  • - This game written in Java programming language;
  • - uses free library LibGdx;
  • - game includes 14 images, 3 sounds;
  • - AdMob banner integrated;
Starting Your Project

To run this project, you need Eclipse+ADT installed in your system and also Java Development Kit. All of these products are free. You can download Eclipse+ADT at http://developer.android.com/sdk/index.html You can download Java Development Kit at http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html Installing these products are as simple as installing other software. You can also view this video on Youtube: https://www.youtube.com/watch?v=Q1Od7_6FDY0 After installing Eclipse and JDK, you must import the project to Eclipse. 

Import project to Eclipse


Unzip your downloaded game to any folder you like.
  • In Eclipse, go to "File->Import". "Import" window should appear. Expand the
    "General" folder, choose "Existing Projects into Workspace" and click "Next" button".
  • Check the "Copy projects into workspace", then click "Browse" button in the "Select root directory" text field.
  • Navigate to your unzipped "BirdAdventure" path. Two projects should appear - "birdadventure-android" and "birdadventure-core". Click "Finish" button.
Running Your Project

To run project, right click on "birdadventure-android", then select "Run->Android Application". You can run game on an Android Virtual Device (AVD) or on the real device connected by USB cable.

Some Things You Want to Configure

Main files for your customisation are AndroidLauncher.java (which is in "birdadventure-android/src" folder) and GameScreen.java (which is in "birdadventure-core/src" folder) AndroidLauncher.java- contains information about your AdMob unit ID GameScreen.java- contains main game logic. In AndroidLauncher.java, find these lines
 //set your ad unit id here
  adView.setAdUnitId("YOUR_UNIT_ID");
Change string YOUR_UNIT_ID to your AdMob Unit ID. You must have registered AdMob account. If you have not, register one at www.admob.com/register. After registering, add the application and copy your AdMob Unit ID.

Implementing AdMob

I assume you already have AdMob account. if no, register one at www.admob.com/register
  • To use AdMob, you must integrate Google Play services into your IDE. In "Eclipse", go to "Window->Android SDK Manager".
  • Expand "Extras" and check "Google Play Services", then click "Install packages" button.
  • After succesfull downloading, go to "File->Import", expand "Android" folder, choose "Existing Android Code Into Workspace" and click "Next". Check the "Copy projects into workspace". Click "Browse" button and navigate to your SDK path (for example, "C:/adt_eclipse/sdk") then navigate to "extras/google/google_play_services/libproject".
  • "google_play_services_lib" should appear, click "Finish".
  • Right click in "birdadventure-android" in your Package Explorer, choose "Properties".
  • In "Android" tab, click "Add" button in "Library" field. Then choose just added "google_play_services_lib".
IF error occures "Unable to resolve target android-xx", right click on project, choose "Properties", in "Android" tab choose your installed android version in "Target Name" and click "OK".

Running AdMob in test mode

Add your Ad unit ID to the code
adView.setAdUnitId("YOUR_UNIT_ID");
While developing application it is useful to run AdMob in test mode. To do so, it is already code added to the AndroidLauncher.java
 AdRequest adRequest = new AdRequest.Builder()
         .addTestDevice(AdRequest.DEVICE_ID_EMULATOR)
          .addTestDevice("xxx") 
                 .build();
in addTestDevice("xxx") replace the "xxx" value with your device hashed id. To do so, follow these steps:
  • Run application in android device.
  • In LogCat, find info "To get test ads on this device, call adRequest.addTestDevice("0123456789ABCDEF")"
  • Select this line, press Ctrl+C to copy this, paste into your code and delete all the message, but leave your hashed id.
  • After that, run application again. If all done correct after about two minutes AdMob banner should appear.
In release mode, just use code
 AdRequest adRequest = new AdRequest.Builder().build();
Showing and Hiding AdMob Banner

BirdGame.myRequestHandler.showAds(false) - hides AdMob. This used in main GameScreen.java to hide banner while gameplay;
BirdGame.myRequestHandler.showAds(true) - shows AdMob. This used in StartScreen.java and in GameoverScreen.java. Remember, it could take some time when showing banner first time.

Changing Game Variables

In GameScreen.java find and change these values:
gameSpeed - influences on obstacle_speed, bonus speed and parallax scrolling speed. If game speed is low, there are much easier to play, because less reaction is required to avoid obstacles and collect items. During gameplay gameSpeed is increased. This value is controlled by max_gameSpeed, but you can change its values.
obstacle_distance - determines how far obstacles will be generated from each other. If this value is too low, obstacles will be generated more often, and with gameSpeed it determines game difficulty. This value is controlled by min_distance, so obstacle_distance cannot be lower than min_distance, for example, it cannot be zero. (But you can change this)
obstacles_passed - when new obstacle created, obstacle_passed increases. When it greater than 10, gameSpeed increases and obstacle_distance decreases.
bird_speed - how fast bird moves up and down
bonus_distance - determines how far bonuses will be generated from each other. Less value generates more bonuses

How To Change Title of the Game
Find "birdadventure-android/res/values/strings.xml" and change "Bird Adventure" to your title. This title will appear in android device, when game is installed.

How To Change Sounds
Sounds are in "birdadventure-android/assets/sounds" folder. Replace them to your own sounds.

How To Change Graphics
Graphics files are in "Assets Source" folder. There are two subfolders - "PNG" and "EPS". "PNG" contains raster PNG files, "EPS" contains vector files. EPS files can be edited by free Inkscape software - www.inkscape.org PNG can be edited by free GIMP software - www.gimp.org After editing, all the graphics must be in PNG format and must be packed by gdx-texturepacker tool.
This tool is available for free download at https://code.google.com/p/libgdx-texturepacker-gui/ Here also you can find documentation for this tool, but it is easy to use. Simple download and launch this tool. Click "New pack", enter name (I have used "items"). Locate directory with all your images, locate output directory, fill the file name of the packed file ("I have used items.pack") and press "Pack'em all" button. Then copy "items.png" and "items.pack" from output directory to your "birdadventure-android/assets/images" Publishing Your App

Before publishing, change the package name in AndroidManifest.xml, which is in "birdadventure-android" folder.
To export to apk file, go to "File->Export". "Export" window should appear. Expand "Android" folder, select "Export Android Application" and click "Next" button.

Project Structure

Game code consists of two projects -
  • birdadvenute-android
  • birdadventure-core
birdadventure-android contains AndroidManifest.xml, which you need to edit package name before publishing application. Also it contains AndroidLauncher.java in "src" folder. You need to edit AdMob unit ID here. It contains "assets" folder, where you need to place all your images and sounds. birdadventure-core contains main game code.
IActivityRequestHandler.java is a helper class used for show or hide AdMob;
Constants.java is a helper class which contains game constants, such as Viewport width and height
This is game life cycle:
  • BirdGame.java - initializes the game. It contains reference to the AdMob handler, loads TextureAtlas, creates game font and creates StartScreen.
  • StartScreen.java - Shows AdMob, loads its background image and wait for player touches the screen. When player touches the screen, it loads GameScreen.
  • GameScreen.java - main game action goes here. There are a lot of code here. GameScreen uses:
    - Bird.java to initialize player's bird;
    - BonusItem.java to generate bonus items;
    - Obstacle.java to generate obstacles
    When bird collides with obstacle, GameScreen creates new GameoverScreen
  • GameoverScreen shows gameover background, displays score and shows AdMob banner.
Free Source Code DOWNLOAD HERE

Related Posts: