Last active
October 8, 2015 20:08
-
-
Save revmob-sdk/3383267 to your computer and use it in GitHub Desktop.
RevMob Android SDK
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<uses-permission android:name="android.permission.INTERNET"/> | |
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/> | |
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/> | |
<uses-permission android:name="android.permission.READ_PHONE_STATE"/> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<application> | |
<activity | |
android:name="com.revmob.ads.fullscreen.FullscreenActivity" | |
android:configChanges="keyboardHidden|orientation" > | |
</activity> | |
... | |
</application> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.revmob.sample.developer; | |
import android.os.Bundle; | |
import android.app.Activity; | |
import android.util.Log; | |
import android.view.View; | |
import com.revmob.RevMob; | |
import com.revmob.ads.link.RevMobLink; | |
import com.revmob.RevMobAdsListener; | |
public class MainActivity extends Activity { | |
// Just replace the ID below with your appID. | |
private static String APPLICATION_ID = "4f56aa6e3dc441000e005a20"; | |
private RevMob revmob; | |
public void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.activity_main); | |
// Starting RevMob session | |
revmob = RevMob.start(this, APPLICATION_ID); | |
} | |
public void onStart() { | |
super.onStart(); | |
} | |
public void revMobOpenAdLink(View view) { | |
revmob.openAdLink(this, null); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.revmob.sample.developer; | |
import android.os.Bundle; | |
import android.app.Activity; | |
import android.util.Log; | |
import android.view.View; | |
import com.revmob.RevMob; | |
import com.revmob.ads.fullscreen.RevMobFullscreen; | |
import com.revmob.RevMobAdsListener; | |
public class MainActivity extends Activity { | |
// Just replace the ID below with your appID. | |
private static String APPLICATION_ID = "4f56aa6e3dc441000e005a20"; | |
private RevMob revmob; | |
private RevMobAdsListener revmobListener; | |
public void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.activity_main); | |
// Starting RevMob session | |
revmob = RevMob.start(this, APPLICATION_ID); | |
} | |
public void onStart() { | |
super.onStart(); | |
revmobListener = new RevMobAdsListener() { | |
@Override | |
public void onRevMobAdDisplayed() { | |
Log.i("[RevMob]", "onAdDisplayed"); | |
} | |
@Override | |
public void onRevMobAdReceived() { | |
Log.i("[RevMob]", "onAdReceived"); | |
} | |
@Override | |
public void onRevMobAdNotReceived(String message) { | |
Log.i("[RevMob]", "onAdNotReceived"); | |
} | |
@Override | |
public void onRevMobAdDismiss() { | |
Log.i("[RevMob]", "onAdDismiss"); | |
} | |
@Override | |
public void onRevMobAdClicked() { | |
Log.i("[RevMob]", "onAdClicked"); | |
} | |
}; | |
} | |
public void showFullscreen(View view) { | |
RevMobFullscreen fs = revmob.createFullscreen(this, revmobListener); | |
fs.show(); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.revmob.sample.developer; | |
import android.os.Bundle; | |
import android.app.Activity; | |
import android.view.View; | |
import com.revmob.RevMob; | |
public class MainActivity extends Activity { | |
// Just replace the ID below with your appID. | |
private static String APPLICATION_ID = "4f56aa6e3dc441000e005a20"; | |
private RevMob revmob; | |
public void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.activity_main); | |
// Starting RevMob session | |
revmob = RevMob.start(this, APPLICATION_ID); | |
} | |
public void onStart() { | |
super.onStart(); | |
} | |
public void showFullscreen(View view) { | |
revmob.showFullscreen(this); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.revmob.sample.developer; | |
import android.os.Bundle; | |
import android.app.Activity; | |
import android.util.Log; | |
import android.view.View; | |
import com.revmob.RevMob; | |
import com.revmob.ads.popup.RevMobPopup; | |
import com.revmob.RevMobAdsListener; | |
public class MainActivity extends Activity { | |
// Just replace the ID below with your appID. | |
private static String APPLICATION_ID = "4f56aa6e3dc441000e005a20"; | |
private RevMob revmob; | |
private RevMobAdsListener revmobListener; | |
public void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.activity_main); | |
// Starting RevMob session | |
revmob = RevMob.start(this, APPLICATION_ID); | |
} | |
public void onStart() { | |
super.onStart(); | |
revmobListener = new RevMobAdsListener() { | |
@Override | |
public void onRevMobAdDisplayed() { | |
Log.i("[RevMob]", "onAdDisplayed"); | |
} | |
@Override | |
public void onRevMobAdReceived() { | |
Log.i("[RevMob]", "onAdReceived"); | |
} | |
@Override | |
public void onRevMobAdNotReceived(String message) { | |
Log.i("[RevMob]", "onAdNotReceived"); | |
} | |
@Override | |
public void onRevMobAdDismiss() { | |
//Not implemented. | |
} | |
@Override | |
public void onRevMobAdClicked() { | |
Log.i("[RevMob]", "onAdClicked"); | |
} | |
}; | |
} | |
public void revMobOpenPopup(View view) { | |
//revmob.showPopup(this); | |
RevMobPopup popup = revmob.createPopup(this, revmobListener); | |
popup.show(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment