Jetzt kostenlos registrieren. Mitglieder surfen ohne Werbung auf Android-Hilfe.de!
Zurück   Android-Hilfe.de > Android Developer > Android App Entwicklung

Amobee Werbung erscheint nicht

Das Thema "Amobee Werbung erscheint nicht" befindet sich unter Android App Entwicklung auf Android-Hilfe.de.


Antwort

 

Themen-Optionen Ansicht
Alt 10.05.2011, 09:46   #1 (permalink)
Android-Hilfe.de Mitglied

Registriert seit: 09.12.2010
Beiträge: 79
Abgegebene Danke: 3
Erhielt 0 Danke für 0 Beiträge
Standard Amobee Werbung erscheint nicht

Hallo Leute,

ich versuche Amobee Werbung in eine App einzubauen. Ich habe ein Testprojekt mit einer Activity, worin nur ein Textview und direkt darunter die Werbung ist. Das Projekt gab es bei Amobee und funktioniert dementsprechend einwandfrei.

Ich habe es versucht in meiner App einzubauen, aber es kam keine Werbung. Also habe ich die Activity von der Demoin meine App rüberkopiert und von meiner App aus gestartet. Permissions sind gesetzt und die neue Activity wurde im Manifest registriert. Es erscheint aber dennoch keine Werbung. Es wird nur die TextView angezeigt.

Activity:
Code:
package de.xxx.xyz;

import com.amobee.onlineHapi.AmobeeAdView;
import com.amobee.onlineHapi.OnlineHAPI;

import android.app.Activity;
import android.graphics.Color;
import android.os.Bundle;
import android.widget.LinearLayout;

public class HelloWorldActivity extends Activity {
    
    private static AmobeeAdView amobeeAdView;
    
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        
        // set the main layout as current view
        setContentView(R.layout.main_test);
        
        // find the layout which to put AmobeeAdView on
        LinearLayout layout = (LinearLayout) findViewById(R.id.my_id);

        // initialize HAPI
        OnlineHAPI onlineHAPI = OnlineHAPI.getInstance(this);
        
        // create amobeeAdView once and use it every time on each configuration change
        if (amobeeAdView == null) {
            // get AmobeeAdView - Amobee modified WebView control
            // ad space, placement and format are set in the following function
            amobeeAdView = onlineHAPI.getAdView("20436", 1, "MMA_Hbanner_6_1");    
            
            // set background color
            amobeeAdView.setBackgroundColor(Color.TRANSPARENT);
            
            // set refresh interval in seconds
            amobeeAdView.setRefreshInterval(60);
            
            // disable focus on the control
            amobeeAdView.setFocusable(false);
        }

        // set new control width on configuration change
        // this must be done to align the control properly when going from portrait to landscape
        amobeeAdView.setLocation(0, 0, getWindowManager().getDefaultDisplay().getWidth(), 75); 
        
        // remove parent on configuration change
        // without doing this we will not be able 
        // to add the amobeeAdView to another layout at the next line
        LinearLayout parent = (LinearLayout)amobeeAdView.getParent();
        if (parent != null) {
            parent.removeView(amobeeAdView);
        }
        
        // add the control to the layout 
        layout.addView(amobeeAdView);
    }
}
Manifest:
Code:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="de.xxx.xyz"
      android:versionCode="8"
      android:versionName="1.6.1">
    <application android:icon="@drawable/icon" android:label="@string/app_name" android:debuggable="false" android:theme="@android:style/Theme.NoTitleBar">        
        <activity android:name="de.xazen.tictactoe.TicTacToe"
                  android:label="@string/app_name"
                  android:screenOrientation="portrait">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity android:name="de.xazen.tictactoe.Game"
              android:label="@string/game_title"
              android:screenOrientation="portrait"/>
        <activity
            android:name="de.xazen.tictactoe.HelloWorldActivity"
            android:label="hello world">
           </activity>
    </application>
    <uses-sdk android:minSdkVersion="4" />
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.READ_PHONE_STATE" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> 
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> 
    
    <supports-screens android:resizeable="true" />
    <supports-screens android:smallScreens="true" />
    <supports-screens android:normalScreens="true" />
    <supports-screens android:largeScreens="true" />
    <supports-screens android:anyDensity="true" />
    

    
    
</manifest>
main_test:
Code:
<?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"
    android:id="@+id/my_id">





<TextView 
    android:id="@+id/TextView01" 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" 
    android:text="HelloWorld" 
    android:layout_gravity="center_horizontal"
    />
</LinearLayout>
xazen ist offline   Mit Zitat antworten
Antwort

Stichworte
-

Themen-Optionen
Ansicht


Ähnliche Themen

Thema Autor Forum Antworten Letzter Beitrag
Kalender erscheint nicht keksfresse Samsung Galaxy S (I9000) Forum 7 27.05.2011 17:34
Texteingabefeld im Forum erscheint nicht... Amokossi Motorola Defy Forum 0 13.04.2011 22:13
[Gelöst] 3G Symbol erscheint nach Einschalten nicht, mobiles Internet geht auch nicht Plopper90 Samsung Galaxy S (I9000) Forum 7 25.03.2011 18:37
Anruferbild erscheint nicht ! juvefan Root / Hacking / Modding für T-Mobile Pulse 0 05.08.2010 11:24
Werbung auf dem Handy vs. div. Werbung im Internet McFlow Smalltalk und Offtopic 1 12.05.2010 03:06




Du liest gerade: "Amobee Werbung erscheint nicht" unter "Android App Entwicklung" auf Android-Hilfe.de.


Powered by vBulletin®
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
Search Engine Friendly URLs by vBSEO
© Android-Hilfe.de 2012 - All rights reserved.