Skip to content

Commit

Permalink
v1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
StanislavIvanov committed Sep 23, 2015
1 parent dd40ac7 commit 7617b39
Show file tree
Hide file tree
Showing 22 changed files with 67 additions and 20 deletions.
Binary file removed AdTapsy/libs/AdTapsy-v0.5.jar
Binary file not shown.
Binary file added AdTapsy/libs/AdTapsy-v1.0.jar
Binary file not shown.
Binary file removed AdTapsy/libs/InMobi-4.5.5.jar
Binary file not shown.
Binary file added AdTapsy/libs/InMobi-4.5.6.jar
Binary file not shown.
Binary file removed AdTapsy/libs/applovin-sdk-6.0.0.jar
Binary file not shown.
Binary file added AdTapsy/libs/applovin-sdk-6.1.1.jar
Binary file not shown.
Binary file modified AdTapsy/libs/chartboost.jar
Binary file not shown.
Binary file modified AdTapsy/libs/revmob.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion AdTapsyDemo/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
android:exported="false" />
<!-- RevMob -->
<activity
android:name="com.revmob.ads.fullscreen.FullscreenActivity"
android:name="com.revmob.FullscreenActivity"
android:configChanges="keyboardHidden|orientation"
android:theme="@android:style/Theme.Translucent" >
</activity>
Expand Down
Binary file removed AdTapsyDemo/libs/AdTapsy-v0.5.jar
Binary file not shown.
Binary file added AdTapsyDemo/libs/AdTapsy-v1.0.jar
Binary file not shown.
Binary file removed AdTapsyDemo/libs/InMobi-4.5.5.jar
Binary file not shown.
Binary file added AdTapsyDemo/libs/InMobi-4.5.6.jar
Binary file not shown.
Binary file removed AdTapsyDemo/libs/applovin-sdk-6.0.0.jar
Binary file not shown.
Binary file added AdTapsyDemo/libs/applovin-sdk-6.1.1.jar
Binary file not shown.
Binary file modified AdTapsyDemo/libs/chartboost.jar
Binary file not shown.
Binary file removed AdTapsyDemo/libs/revmob-7.0.0.jar
Binary file not shown.
Binary file modified AdTapsyDemo/libs/revmob.jar
Binary file not shown.
Binary file not shown.
Binary file not shown.
11 changes: 10 additions & 1 deletion AdTapsyDemo/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,15 @@
android:layout_below="@+id/imageView1"
android:layout_centerHorizontal="true"
android:layout_marginTop="24dp"
android:text="Show Ad" />
android:text="Show Interstitial Ad" />

<Button
android:id="@+id/showRewardedBtn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/showAdBtn"
android:layout_centerHorizontal="true"
android:layout_marginTop="34dp"
android:text="Show Rewarded Video" />

</RelativeLayout>
74 changes: 56 additions & 18 deletions AdTapsyDemo/src/com/adtapsy/demo/MainActivity.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.adtapsy.demo;

import android.os.Bundle;
import android.util.Log;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
Expand All @@ -10,6 +11,7 @@
import com.adtapsy.sdk.AdTapsy;
import com.adtapsy.sdk.AdTapsyActivity;
import com.adtapsy.sdk.AdTapsyDelegate;
import com.adtapsy.sdk.AdTapsyRewardedDelegate;

public class MainActivity extends AdTapsyActivity {

Expand All @@ -18,34 +20,57 @@ protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
AdTapsy.startSession(this, "54982cf7e4b052cd2a20a7b8");
AdTapsy.setRewardedVideoAmount(10);
AdTapsy.showInterstitial(this);

AdTapsy.setDelegate(new AdTapsyDelegate() {

@Override
public void onAdSkipped() {
System.out.println("***onAdSkipped***");
}

public void onAdSkipped(int zoneId) {
if(zoneId == AdTapsy.INTERSTITIAL_ZONE){
Log.d("AdTapsy Delegate", "Ad skipped from interstitial zone ");
} else if(zoneId == AdTapsy.REWARDED_VIDEO_ZONE){
Log.d("AdTapsy Delegate", "Ad skipped from rewarded video zone ");
}
}
@Override
public void onAdShown() {
System.out.println("***onAdShown***");
public void onAdShown(int zoneId) {
if(zoneId == AdTapsy.INTERSTITIAL_ZONE){
Log.d("AdTapsy Delegate", "Ad shown from interstitial zone");
} else if(zoneId == AdTapsy.REWARDED_VIDEO_ZONE){
Log.d("AdTapsy Delegate", "Ad shown from rewarded video zone");
}
}

@Override
public void onAdFailToShow() {
System.out.println("***onAdFailToShow***");
public void onAdFailToShow(int zoneId) {
if(zoneId == AdTapsy.INTERSTITIAL_ZONE){
Log.d("AdTapsy Delegate", "Ad failed to show from zone " + zoneId);
} else if(zoneId == AdTapsy.REWARDED_VIDEO_ZONE){
Log.d("AdTapsy Delegate", "Ad failed to show from rewarded video zone");
}
}

@Override
public void onAdClicked() {
System.out.println("***onAdClicked***");

public void onAdClicked(int zoneId) {
if(zoneId == AdTapsy.INTERSTITIAL_ZONE){
Log.d("AdTapsy Delegate", "Ad clicked from interstitial zone");
} else if(zoneId == AdTapsy.REWARDED_VIDEO_ZONE){
Log.d("AdTapsy Delegate", "Ad clicked from rewarded video zone");
}
}
@Override
public void onAdCached(int zoneId) {
if(zoneId == AdTapsy.INTERSTITIAL_ZONE){
Log.d("AdTapsy Delegate", "Ad loaded from interstitial zone");
} else if(zoneId == AdTapsy.REWARDED_VIDEO_ZONE){
Log.d("AdTapsy Delegate", "Ad loaded from rewarded zone zone");
}

}
});
AdTapsy.setRewardedDelegate(new AdTapsyRewardedDelegate() {

@Override
public void onAdCached() {
System.out.println("***onAdCached***");
public void onRewardEarned(int amount) {
Log.d("AdTapsy Rewarded Delegate", "User earned " + amount + " coins");
}
});

Expand All @@ -54,14 +79,27 @@ public void onAdCached() {

@Override
public void onClick(View v) {
if(AdTapsy.isAdReadyToShow()){
if(AdTapsy.isInterstitialReadyToShow()){
System.out.println("Ad is ready to show");
AdTapsy.showInterstitial(MainActivity.this);
} else {
System.out.println("Ad is not ready to be shown");
}
}
});
((Button) findViewById(R.id.showRewardedBtn))
.setOnClickListener(new OnClickListener() {

@Override
public void onClick(View v) {
if(AdTapsy.isRewardedVideoReadyToShow()){
System.out.println("Ad is ready to show");
AdTapsy.showRewardedVideo(MainActivity.this);
} else {
System.out.println("Ad is not ready to be shown");
}
}
});
}

@Override
Expand Down

0 comments on commit 7617b39

Please sign in to comment.