I've had a look at this today and will release an AppGameKit update shortly.
For those that want to make the changes manually and don't want to wait (or mess up any custom AGKHelper.java or manifest changes), follow the instructions below.
1) In the Android SDK Manager make sure you have "Google Play Services" installed.
2) Browse to the location of the newly installed Google Play Services SDK, it should be here "android-sdk-windows\extras\google\google_play_services\libproject\google-play-services_lib", copy this into a new folder in the AGK/apps folder, the same place as the "facebook" project should be.
3) Import this new project into eclipse, build it to make sure it doesn't have any errors
4) Right click on your project and choose Properties
5) In the Android section, in the Libraries section that should already have the "facebook" project listed. Add the google play services project you just imported to this list.
6) Still in the properties dialog, in the Java Build Path section click on the Libraries tab and remove the entry GoogleAdMobAdsSDK-6.1.0.jar, you can also delete this file from your project's "libs" folder.
7) Click OK to close the properties dialog
8) In your project's AndroidManifest .xml file find the entry "com.google.ads.AdActivity" and change it to "com.google.android.gms.ads.AdActivity"
9) add the code
<meta-data
android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version" />
directly after the application tag of the manifest file, also remove the "android:debuggable="false"" line, it should now look like this
<application android:label="@string/app_name"
android:hasCode="true"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
android:icon="@drawable/icon">
<meta-data
android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version" />
10) In AGKHelper.java find the line "import com.google.ads.*;" and change it to "import com.google.android.gms.ads.*;", make sure there are no other entries for the old import
11) Find the section
case 1: // make ad
{
if ( ad == null )
{
ad = new AdView(act, AdSize.BANNER, pubID);
AdRequest request = new AdRequest();
//request.addTestDevice("8EEA49684422A6B864134230E0A5511E");
//request.addTestDevice("B64D549379981B01B7A5CEC68AC80EEE");
ad.loadAd( request );
WindowManager wm = (WindowManager) act.getSystemService(Context.WINDOW_SERVICE);
WindowManager.LayoutParams layout = makeLayout();
wm.addView(ad, layout);
}
break;
}
and change it to
case 1: // make ad
{
if ( ad == null )
{
ad = new AdView(act);
ad.setAdUnitId(pubID);
ad.setAdSize(AdSize.BANNER);
//request.addTestDevice("8EEA49684422A6B864134230E0A5511E");
//request.addTestDevice("B64D549379981B01B7A5CEC68AC80EEE");
WindowManager wm = (WindowManager) act.getSystemService(Context.WINDOW_SERVICE);
WindowManager.LayoutParams layout = makeLayout();
wm.addView(ad, layout);
ad.loadAd( new AdRequest.Builder().build() );
}
break;
}
12) Find the section
case 4: // refresh the ad
{
if ( ad == null ) return;
AdRequest request = new AdRequest();
request.addTestDevice("8EEA49684422A6B864134230E0A5511E");
request.addTestDevice("B64D549379981B01B7A5CEC68AC80EEE");
ad.loadAd( request );
break;
}
and replace it with
case 4: // refresh the ad
{
if ( ad == null ) return;
ad.loadAd( new AdRequest.Builder().build() );
break;
}
13) Add these two additional case statements to the code above
case 7: // pause ad
{
if ( ad == null ) return;
ad.pause();
break;
}
case 8: // resume ad
{
if ( ad == null ) return;
ad.resume();
break;
}
14) Find the section
public static void OnStart( Activity act )
{
}
public static void OnStop( Activity act )
{
}
and replace it with
public static void OnStart( Activity act )
{
// resume ad
RunnableAd run = new RunnableAd();
run.action = 8;
run.act = act;
act.runOnUiThread( run );
}
public static void OnStop( Activity act )
{
// pause ad
RunnableAd run = new RunnableAd();
run.action = 7;
run.act = act;
act.runOnUiThread( run );
}
15) refresh and build your project