I am a newbie in both in this forum and in Android world. I just developed a singleplayer trivia game, named "Reklamsız Bilgi Yarışması", only supports my local language but accessable in all over the world.
I just followed the guides and integrated AdColony to my AdMob account and get the perfect results, with test video ads.
However, after going live, nothing happened. Many of my customers wrote me that they can not get Ad Videos. Also, in admob, I saw 650 requests happened and only 4 of them get the video!
In AdColony statistics, I saw only 5 lucky guy requested the video and got watched full video, then took their rewards.
So, how could it be? Hundreds of request but only %0.25 of them were answered by AdMob (Or AdColony), I could not understand.
Lastly, %98 percent of my customers are from Turkey, %1 from Azerbaijan and %1 from Germany.
Is there any possible mistake in coding? Because I saw the test ads, on my physical device, not on the emulator also.
Thank You !
<<<<<<<<<<<< In Manıfest >>>>>>>>>>>>>>
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<meta-data
android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version" />
<activity
android:name="com.google.android.gms.ads.AdActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"
android:theme="@android:style/Theme.Translucent" />
<activity android:name="com.jirbo.adcolony.AdColonyOverlay"
android:configChanges="keyboardHidden|screenSize"
android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen" />
<activity android:name="com.jirbo.adcolony.AdColonyFullscreen"
android:configChanges="keyboardHidden|screenSize"
android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen" />
<activity android:name="com.jirbo.adcolony.AdColonyBrowser"
android:configChanges="keyboardHidden|screenSize"
android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen" />
I Have All of the needed codes in Manifest I think
<<<<<<<<<>>>>>>>>>>>
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:23.4.0'
compile 'com.google.android.gms:play-services-ads:9.8.0'
compile 'com.google.firebase:firebase-core:9.8.0'
}
apply plugin: 'com.google.gms.google-services'
In Libs, I have "Adcolony *jar"
<<<<<<<<<<< In Java >>>>>>>>>>>>>
import com.jirbo.adcolony.AdColony;
import com.jirbo.adcolony.AdColonyAdapter;
import com.jirbo.adcolony.AdColonyBundleBuilder;
import com.jirbo.adcolony.*;
import com.google.ads.mediation.admob.AdMobAdapter;
import com.google.android.gms.ads.AdRequest;
import com.google.android.gms.ads.MobileAds;
import com.google.android.gms.ads.reward.RewardItem;
import com.google.android.gms.ads.reward.RewardedVideoAd;
import com.google.android.gms.common.ConnectionResult;
import com.google.android.gms.common.GooglePlayServicesUtil;
public class oyunsonu extends Activity implements RewardedVideoAdListener{
// I Have those implementation with the importations stated above
private static final String AD_UNIT_ID = "xxxxxxxx";
private static final String APP_ID = "xxxxxxxx";
private static final String LOGTAG = "GMS";
private boolean mIsRewardedVideoLoading;
private RewardedVideoAd mRewardedVideoAd2;
private final Object mLock = new Object();
@Override
protected void onCreate (Bundle savedInstanceState){
super.onCreate(savedInstanceState);
setContentView(R.layout.oyunsonu);
checkGooglePlayServicesAvailable();
MobileAds.initialize(this, APP_ID);
mRewardedVideoAd2 = MobileAds.getRewardedVideoAdInstance(this);
mRewardedVideoAd2.setRewardedVideoAdListener(this);
loadRewardedVideoAd();
}
private void loadRewardedVideoAd() {
synchronized (mLock) {
if (!mIsRewardedVideoLoading && !mRewardedVideoAd2.isLoaded()) {
mIsRewardedVideoLoading = true;
Bundle extras = new Bundle();
extras.putBoolean("_noRefresh", true);
AdRequest adRequest = new AdRequest.Builder().addNetworkExtrasBundle(AdColonyAdapter.class, extras)
.addNetworkExtrasBundle(AdMobAdapter.class, extras)
.build();
mRewardedVideoAd2.loadAd(AD_UNIT_ID, adRequest);
}
}
}
private void showRewardedVideo() {
if (mRewardedVideoAd2.isLoaded()) {
mRewardedVideoAd2.show();
}
}
private boolean checkGooglePlayServicesAvailable()
{
final int status = GooglePlayServicesUtil.isGooglePlayServicesAvailable(getApplicationContext()) ;
if (status == ConnectionResult.SUCCESS)
{
return true;
}
Log.e(LOGTAG, "Google Play Services not available: " + GooglePlayServicesUtil.getErrorString(status));
if (GooglePlayServicesUtil.isUserRecoverableError(status))
{
final Dialog errorDialog = GooglePlayServicesUtil.getErrorDialog(status, this, 1);
if (errorDialog != null)
{
errorDialog.show();
}
}
return false;
}
@Override
public void onRewardedVideoAdLeftApplication() {
}
@Override
public void onRewardedVideoAdClosed() {
loadRewardedVideoAd();
}
@Override
public void onRewardedVideoAdFailedToLoad(int errorCode) {
mIsRewardedVideoLoading = false;
Toast.makeText(this, "Sunucu Kaynaklı Hata! Ödüllü Reklam Mevcut Değil!", Toast.LENGTH_SHORT).show();
reklamizlex.setVisibility(View.INVISIBLE);
}
@Override
public void onRewardedVideoAdLoaded() {
mIsRewardedVideoLoading = false;
reklamizlex.setVisibility(View.VISIBLE);
}
@Override
public void onRewardedVideoAdOpened() {
}
@Override
public void onRewarded(RewardItem reward) {
rekflag = 1;
yenidenoyna.setBackgroundResource(R.drawable.butonbosgri);
anamenuyegit.setBackgroundResource(R.drawable.butonbosgri);
reklamizlex.setBackgroundResource(R.drawable.butonbosgri);
final Intent yenidenoynamakr = new Intent(getApplicationContext(), sorulars.class);
yenidenoynamakr.putExtra("rekdurumu", rekflag);
yenidenoynamakr.putExtra("sonskorx", sonskorz);
yenidenoynamakr.putExtra("katsec", katdurumu);
yenidenoynamakr.putExtra("ajdurumu", ajsay);
yenidenoynamakr.putExtra("yydurumu", yysay);
yenidenoynamakr.putExtra("sdegdurumu", dsay);
yenidenoynamakr.putExtra("ssaydurumu", ssay);
yenidenoynamakr.putExtra("jokkodurumu", jokko);
startActivity(yenidenoynamakr);
}
@Override
public void onRewardedVideoStarted() {
}
}
Here are all codes that I used, which are about the "Rewarded Video Ads"