13 Sep

Integrasi AdMob dengan AndEngine

Step 1. Masukkan SDK AdMob ke dalam Project
Copy sdk file to lib folder inside your project, then right-click on the file build path -> add to build path.

Step 2. Edit AndroidManifest.xml

masukkan permissions ke manifest file

<uses-permission android:name=”android.permission.INTERNET” />
<uses-permission android:name=”android.permission.ACCESS_NETWORK_STATE”/>

Add activity to your manifest file

<activity android:name=”com.google.ads.AdActivity”
android:configChanges=”keyboard|keyboardHidden|orientation| screenLayout|uiMode|screenSize|smallestScreenSize”
android:theme=”@android:style/Theme.NoTitleBar.Fullscreen”/>

Step 3. Change project target

New version of admob sdk requires to set target level to 13 or above. It doesn’t mean that your application won’t works on devices with lower api level.

Right-click on your project then properties->android and select Project Build Taget to Android 3.2

Step 4. Add adView to layout.

Remeber to use RelativeLayout!

<?xml version=”1.0″ encoding=”utf-8″?>
<RelativeLayout xmlns:android=”http://schemas.android.com/apk/res/android”
xmlns:ads=”http://schemas.android.com/apk/lib/com.google.ads”
android:layout_width=”fill_parent”
android:layout_height=”fill_parent” >

<org.anddev.andengine.opengl.view.RenderSurfaceView
android:id=”@+id/xmllayoutRenderSurfaceView”
android:layout_width=”fill_parent”
android:layout_height=”fill_parent”
android:layout_centerInParent=”true”
android:gravity=”center” />
<com.google.ads.AdView
android:id=”@+id/adView”
android:layout_width=”wrap_content”
android:layout_height=”wrap_content”
android:layout_alignBottom=”@id/xmllayoutRenderSurfaceView”
ads:adSize=”BANNER”
ads:adUnitId=”<your code>”
ads:loadAdOnCreate=”true” />
</RelativeLayout>

Step 5. Add layout to activity
Your activity needs to extends LayoutBaseActivity

public class Main extends LayoutGameActivity
Override those two methods

@Override
protected int getLayoutID()
{
return R.layout.main;
}

@Override
protected int getRenderSurfaceViewID()
{
return R.id.xmllayoutRenderSurfaceView;
}

22 Mar

Android dan Versinya

Bagi yang ingin mengetahui versi-versi android dan nama uniknya, bisa melihat daftar berikut:
Android versi 1.1 (maret 2009)
Android versi 1.5 (Cupcake)
Android versi 1.5 (Donut)
Android versi 2.0/2.1 (EClair)
Android versi 2.2 (Froyo = Frozen Yogurt)
Android versi 2.3 (Gingerbread)
Android versi 3.0/3.1 (Honeycomb)
Android versi 4.0 (ICS = Ice Cream Sandwich)

Sumber: http://id.wikipedia.org/wiki/Android_(sistem_operasi)

07 Mar

Android Market to Google Play

Saya kaget hari ini membuat market.android.com ternyata sudah berubah menjadi Google Play. Bisa langsung dilihat ke:

https://play.google.com/store

Di sana ada beberapa sub content yang isinya:

  • Top Paid
  • Top Free
  • Top Grossing
  • Top New Paid
  • Top New Free
  • Staff Picks
  • Trending Apps
  • Best Selling Games

Bagi game / app android developer yang berminat. Ayo berlomba-lomba masuk ke pasar ini :)