Hi,
I’m new at startapp. I’m trying to show a banner on exit the app, but nothing is displayed.
Here’s my code (partial) (on the back button press - the toast message is displayed):
Toast.makeText(getApplicationContext(), "HERE", Toast.LENGTH_LONG).show();
// if Back button pressed - Show Ad, if not already displayed
// Show an Ad
startAppAd.showAd(new com.startapp.android.publish.AdDisplayListener() {
/**
* Callback when Ad had been hide
* @param ad
*/
@Override
public void adHidden(com.startapp.android.publish.Ad ad) {
// Run Second activity right after the ad had been hidden
loaded = true;
}
/**
* Callback when Ad had been displayed
* @param ad
*/
@Override
public void adDisplayed(com.startapp.android.publish.Ad ad) {
}
});
startAppAd.loadAd();
Here’s error log:
03-26 10:55:11.721: E/dalvikvm(1125): Could not find class ‘android.content.ComponentCallbacks2’, referenced from method com.startapp.android.publish.e.b.a
03-26 10:55:11.721: W/dalvikvm(1125): VFY: unable to resolve check-cast 42 (Landroid/content/ComponentCallbacks2;) in Lcom/startapp/android/publish/e/b;
03-26 10:55:11.721: D/dalvikvm(1125): VFY: replacing opcode 0x1f at 0x0008
03-26 10:55:11.721: D/dalvikvm(1125): VFY: dead code 0x000a-000c in Lcom/startapp/android/publish/e/b;.a (Landroid/content/Context;)V
03-26 10:55:11.721: I/dalvikvm(1125): Could not find method android.view.Display.getSize, referenced from method com.startapp.android.publish.e.b.a
03-26 10:55:11.721: W/dalvikvm(1125): VFY: unable to resolve virtual method 3397: Landroid/view/Display;.getSize (Landroid/graphics/Point;)V
03-26 10:55:11.721: D/dalvikvm(1125): VFY: replacing opcode 0x6e at 0x000a
03-26 10:55:11.721: I/dalvikvm(1125): Failed resolving Lcom/startapp/android/publish/e/b$1; interface 42 ‘Landroid/content/ComponentCallbacks2;’
03-26 10:55:11.721: W/dalvikvm(1125): Link of class ‘Lcom/startapp/android/publish/e/b$1;’ failed
03-26 10:55:11.721: E/dalvikvm(1125): Could not find class ‘com.startapp.android.publish.e.b$1’, referenced from method com.startapp.android.publish.e.b.a
03-26 10:55:11.721: W/dalvikvm(1125): VFY: unable to resolve new-instance 1285 (Lcom/startapp/android/publish/e/b$1;) in Lcom/startapp/android/publish/e/b;
03-26 10:55:11.721: D/dalvikvm(1125): VFY: replacing opcode 0x22 at 0x0006
03-26 10:55:11.721: D/dalvikvm(1125): VFY: dead code 0x0008-0013 in Lcom/startapp/android/publish/e/b;.a (Landroid/content/Context;Lcom/startapp/android/publish/e/b$a;)V
03-26 10:55:11.721: I/dalvikvm(1125): Could not find method android.view.View.setAlpha, referenced from method com.startapp.android.publish.e.b.a
03-26 10:55:11.721: W/dalvikvm(1125): VFY: unable to resolve virtual method 3561: Landroid/view/View;.setAlpha (F)V
03-26 10:55:11.721: D/dalvikvm(1125): VFY: replacing opcode 0x6e at 0x0000
03-26 10:55:11.721: D/dalvikvm(1125): VFY: dead code 0x0003-0003 in Lcom/startapp/android/publish/e/b;.a (Landroid/view/View;F)V
03-26 10:55:11.721: I/dalvikvm(1125): Could not find method android.view.View.animate, referenced from method com.startapp.android.publish.e.b.a
03-26 10:55:11.721: W/dalvikvm(1125): VFY: unable to resolve virtual method 3491: Landroid/view/View;.animate ()Landroid/view/ViewPropertyAnimator;
03-26 10:55:11.721: D/dalvikvm(1125): VFY: replacing opcode 0x6e at 0x0000
03-26 10:55:11.721: D/dalvikvm(1125): VFY: dead code 0x0003-0012 in Lcom/startapp/android/publish/e/b;.a (Landroid/view/View;J)V
03-26 10:55:11.721: I/dalvikvm(1125): Could not find method android.view.Display.getSize, referenced from method com.startapp.android.publish.e.b.a
03-26 10:55:11.721: W/dalvikvm(1125): VFY: unable to resolve virtual method 3397: Landroid/view/Display;.getSize (Landroid/graphics/Point;)V
03-26 10:55:11.721: D/dalvikvm(1125): VFY: replacing opcode 0x6e at 0x000a
03-26 10:55:11.731: I/dalvikvm(1125): Could not find method android.webkit.WebSettings.setMediaPlaybackRequiresUserGesture, referenced from method com.startapp.android.publish.e.b.a
03-26 10:55:11.731: W/dalvikvm(1125): VFY: unable to resolve virtual method 3843: Landroid/webkit/WebSettings;.setMediaPlaybackRequiresUserGesture (Z)V
03-26 10:55:11.731: D/dalvikvm(1125): VFY: replacing opcode 0x6e at 0x000b
03-26 10:55:11.731: I/dalvikvm(1125): Could not find method android.provider.Settings$Global.getInt, referenced from method com.startapp.android.publish.e.b.b
03-26 10:55:11.731: W/dalvikvm(1125): VFY: unable to resolve static method 675: Landroid/provider/Settings$Global;.getInt (Landroid/content/ContentResolver;Ljava/lang/String;)I
03-26 10:55:11.731: D/dalvikvm(1125): VFY: replacing opcode 0x71 at 0x001d
03-26 10:55:11.731: D/dalvikvm(1125): VFY: dead code 0x0020-0024 in Lcom/startapp/android/publish/e/b;.b (Landroid/content/Context;)Z
Can you help me? Can I cache the ad?
Thanks