Mobclix Ads not showing in android

拈花ヽ惹草 提交于 2019-12-22 09:46:59

问题


I read the official docs and tried to integrate MobClix Ads in my App but I am not getting any Ads.

AdMobActivity.java

import com.mobclix.android.sdk.MobclixMMABannerXLAdView;

import android.app.Activity;
import android.os.Bundle;

public class MobclixDemo extends Activity {
    private MobclixMMABannerXLAdView adview_banner=null;

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);

        adview_banner = (MobclixMMABannerXLAdView) findViewById(R.id.banner_adview);        
        adview_banner.getAd();

    }
}

also i have added MobClix adView in XML file

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent">
    <TextView
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:text="@string/hello" />

    <com.mobclix.android.sdk.MobclixMMABannerXLAdView
        android:id="@+id/banner_adview"
        android:layout_width="320dip"
        android:layout_height="50dip"
        android:layout_gravity="center" />

</LinearLayout>

and added required permission and AD ID in manifest file like this

<?xml version="1.0" encoding="utf-8"?>
<manifest
    xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.mobclix.demo"
    android:versionCode="1"
    android:versionName="1.0">
    <uses-sdk android:minSdkVersion="8" />

    <application
        android:icon="@drawable/icon"
        android:label="@string/app_name"
        android:debuggable="true"
        android:hardwareAccelerated="true">
        <activity
            android:name=".MobclixDemo"
            android:label="@string/app_name">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>

        <meta-data
            android:name="com.mobclix.APPLICATION_ID"
            android:value="450F718E-99C3-4BA0-9BD1-D20B41425280" />
        <activity
            android:name="com.mobclix.android.sdk.MobclixBrowserActivity"
            android:theme="@android:style/Theme.Translucent.NoTitleBar"
            android:hardwareAccelerated="true" />

    </application>

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

</manifest>

I am not getting any clue whether I missing something in my code or the problem with Ads ID because I got it from my client itself.


回答1:


Did you check your DDMS for the MobClix ad request failed or something? And, did you sign up for all the merchants/ad-providers in the service tab?




回答2:


I got solved my problem with the help of @Anupam answer but

still few more changes we made at client side (MobClix Account)

I going to write down here..

  1. I've made sure that test mode is OFF on all possible ad sizes.
  2. I've also made sure that I clicked YES on all the "ads running" buttons listed.
  3. Also I select to sign up with each individual ad network that works within the Mobclix system Some of those take a few days for approval, so for now may be we will not get all ads.

And that's it I am getting Ads like a charm :)



来源:https://stackoverflow.com/questions/12089398/mobclix-ads-not-showing-in-android

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!