0

This is driving me crazy! I spend more than 5 days with it. What is wrong why is my banner not shwing? I followed all the instructions from: https://github.com/StartApp-SDK/Documentation/wiki/Android-InApp-&-InApp-Plus-Documentation

this is my main java file:

package com.Snap.What;

import android.os.Bundle;
import org.apache.cordova.*;

import com.startapp.android.publish.StartAppAd;
import com.startapp.android.publish.StartAppSDK;

public class WhatSnap extends CordovaActivity 
{
    private StartAppAd startAppAd = new StartAppAd(this);
    @Override
    public void onCreate(Bundle savedInstanceState)
    {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        super.init();
        // Set by <content src="index.html" /> in config.xml
        super.loadUrl(Config.getStartUrl());
        //super.loadUrl("file:///android_asset/www/index.html");
        StartAppSDK.init(this, "******23", "*******04", true);
    }
}

this is my layout:

<?xml version="1.0" encoding="utf-8"?> 
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
android:layout_width="match_parent" 
android:layout_height="match_parent" 
android:orientation="vertical" > 


<com.startapp.android.publish.banner.Banner 
          android:id="@+id/startAppBanner"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_centerHorizontal="true"/>


</LinearLayout>

The banner is not showing at all!

This is logcat when I enter the app:

http://pastie.org/9396462

Is anybody kind please to help me add this simple nasty banner?

Riverside
  • 207
  • 1
  • 12
Alex Stanese
  • 735
  • 4
  • 16
  • 33

1 Answers1

1

As indicated in the integration manual, the call to StartAppSDK.init() should come before setContentView().
Can you change your code and see if it works?

mikibe
  • 371
  • 1
  • 6