|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.revmob.RevMob
public class RevMob
Enables your application to retrieve and display RevMob ads. To use this class, you have to include in your AndroidManifest.xml file:
<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"/>
Method Summary | |
---|---|
RevMobLink |
createAdLink(android.app.Activity activity,
RevMobAdsListener listener)
createAdLink(Activity, String, RevMobAdsListener) |
RevMobLink |
createAdLink(android.app.Activity activity,
String placementId,
RevMobAdsListener listener)
Create and load a ad Link to be opened manually in the future, by calling its method ad.open(); Example of usage: Link ad = revmob.createAdLink(this, null, null);
ad.open(); |
RevMobBanner |
createBanner(android.app.Activity activity)
createBanner(Activity, String, RevMobAdsListener) |
RevMobBanner |
createBanner(android.app.Activity activity,
RevMobAdsListener listener)
createBanner(Activity, String, RevMobAdsListener) |
RevMobBanner |
createBanner(android.app.Activity activity,
String placementId)
createBanner(Activity, String, RevMobAdsListener) |
RevMobBanner |
createBanner(android.app.Activity activity,
String placementId,
RevMobAdsListener listener)
Create and load a Banner ad Example of usage: Banner ad = revmob.createBanner(this, null, null);
addContentView(ad); |
RevMobFullscreen |
createFullscreen(android.app.Activity activity,
RevMobAdsListener listener)
createFullscreen(Activity, String, RevMobAdsListener) |
RevMobFullscreen |
createFullscreen(android.app.Activity activity,
String placementId,
RevMobAdsListener listener)
Create and load a Fullscreen ad to be show manually in the future, by calling its method ad.show(); Example of usage: Fullscreen ad = revmob.createFullscreen(this, null, null);
ad.show(); |
RevMobPopup |
createPopup(android.app.Activity activity,
RevMobAdsListener listener)
createPopup(Activity, String, RevMobAdsListener) |
RevMobPopup |
createPopup(android.app.Activity activity,
String placementId,
RevMobAdsListener listener)
Create and load a Popup ad to be show manually in the future, by calling its method ad.show(); Example of usage: |
RevMobTestingMode |
getTestingMode()
|
void |
openAdLink(android.app.Activity activity,
RevMobAdsListener listener)
openAdLink(Activity, String, RevMobAdsListener) |
void |
openAdLink(android.app.Activity activity,
String placementId,
RevMobAdsListener listener)
Create and load ad Link in a background thread. |
void |
openNotification(android.app.Activity activity)
Open a previously scheduled notification. |
void |
printEnvironmentInformation(android.app.Activity activity)
Print your environment information (about your device, network etc) for debugging purposes. |
RevMobNotification |
scheduleNotification(android.app.Activity activity,
int iconDrawable)
scheduleNotification(Activity activity, int drawableIcon, String placementId, RevMobAdsListener, Calendar) |
RevMobNotification |
scheduleNotification(android.app.Activity activity,
int iconDrawable,
String placementId)
scheduleNotification(Activity activity, int drawableIcon, String placementId, RevMobAdsListener, Calendar) |
RevMobNotification |
scheduleNotification(android.app.Activity activity,
int iconDrawable,
String placementId,
RevMobAdsListener listener)
scheduleNotification(Activity activity, int drawableIcon, String placementId, RevMobAdsListener, Calendar) |
RevMobNotification |
scheduleNotification(android.app.Activity activity,
int iconDrawable,
String placementId,
RevMobAdsListener listener,
Calendar fireDate)
Create, load and schedule a Notification ad. |
void |
setTestingMode(RevMobTestingMode testingMode)
Use this method to use testing mode: |
void |
setTimeoutInSeconds(int timeoutInSeconds)
You can customize the timeout to fetch the ads from the server |
void |
showFullscreen(android.app.Activity activity)
#showFullscreen(Activity, String, RevMobAdsListener) |
void |
showFullscreen(android.app.Activity activity,
String placementId)
Create and load Fullscreen ad in a background thread. |
void |
showPopup(android.app.Activity activity)
showPopup(Activity, String, RevMobAdsListener) |
void |
showPopup(android.app.Activity activity,
String placementId,
RevMobAdsListener listener)
Create and load Popup ad in a background thread. |
static RevMob |
start(android.app.Activity activity,
String appId)
Creates and starts a RevMob session. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static RevMob start(android.app.Activity activity, String appId)
RevMob revmob = RevMob.start(YOUR_APP_ID);
activity
- appId
- your application's App ID, which can be generated or retrieved at http://www.revmob.com
public void showFullscreen(android.app.Activity activity)
#showFullscreen(Activity, String, RevMobAdsListener)
public void showFullscreen(android.app.Activity activity, String placementId)
revmob.showFullscreen(this, null);
activity
- Activity that will display the fullscreen. In your code, this
should work fine.placementId
- The placement id. Create it on http://revmob.com. If null the default mobile app id will be used.public RevMobFullscreen createFullscreen(android.app.Activity activity, RevMobAdsListener listener)
createFullscreen(Activity, String, RevMobAdsListener)
public RevMobFullscreen createFullscreen(android.app.Activity activity, String placementId, RevMobAdsListener listener)
Fullscreen ad = revmob.createFullscreen(this, null, null);
ad.show();
activity
- Activity that will display the Fullscreen. In your code, this
should work fine.placementId
- The placement id. Create it on http://revmob.com. If null the default mobile app id will be used.listener
- RevMob ads listener to check if the ad was loaded correctly, displayed and clicked.public RevMobBanner createBanner(android.app.Activity activity)
createBanner(Activity, String, RevMobAdsListener)
public RevMobBanner createBanner(android.app.Activity activity, RevMobAdsListener listener)
createBanner(Activity, String, RevMobAdsListener)
public RevMobBanner createBanner(android.app.Activity activity, String placementId)
createBanner(Activity, String, RevMobAdsListener)
public RevMobBanner createBanner(android.app.Activity activity, String placementId, RevMobAdsListener listener)
Banner ad = revmob.createBanner(this, null, null);
addContentView(ad);
activity
- Activity that will display the Banner. In your code, this
should work fine.placementId
- The placement id. Create it on http://revmob.com. If null the default mobile app id will be used.listener
- RevMob ads listener to check if the ad was loaded correctly, displayed and clicked.public void openAdLink(android.app.Activity activity, RevMobAdsListener listener)
openAdLink(Activity, String, RevMobAdsListener)
public void openAdLink(android.app.Activity activity, String placementId, RevMobAdsListener listener)
revmob.showFullscreen(this, null);
activity
- Activity that will redirect to ad link. In your code, this
should work fine.placementId
- The placement id. Create it on http://revmob.com. If null the default mobile app id will be used.listener
- RevMob ads listener to check if the ad was loaded correctly, displayed and clicked.public RevMobLink createAdLink(android.app.Activity activity, RevMobAdsListener listener)
createAdLink(Activity, String, RevMobAdsListener)
public RevMobLink createAdLink(android.app.Activity activity, String placementId, RevMobAdsListener listener)
Link ad = revmob.createAdLink(this, null, null);
ad.open();
activity
- Activity that will redirect to ad link. In your code, this
should work fine.placementId
- The placement id. Create it on http://revmob.com. If null the default mobile app id will be used.listener
- RevMob ads listener to check if the ad was loaded correctly, displayed and clicked.public void showPopup(android.app.Activity activity)
showPopup(Activity, String, RevMobAdsListener)
public void showPopup(android.app.Activity activity, String placementId, RevMobAdsListener listener)
revmob.showFullscreen(this, null);
activity
- Activity that will display the popup. In your code, this
should work fine.placementId
- The placement id. Create it on http://revmob.com. If null the default mobile app id will be used.listener
- RevMob ads listener to check if the ad was loaded correctly, displayed and clicked.public RevMobPopup createPopup(android.app.Activity activity, RevMobAdsListener listener)
createPopup(Activity, String, RevMobAdsListener)
public RevMobPopup createPopup(android.app.Activity activity, String placementId, RevMobAdsListener listener)
Popup ad = revmob.createPopup(this, null, null);
ad.show();
activity
- Activity that will display the popup. In your code, this
should work fine.placementId
- The placement id. Create it on http://revmob.com. If null the default mobile app id will be used.listener
- RevMob ads listener to check if the ad was loaded correctly, displayed and clicked.
public RevMobNotification scheduleNotification(android.app.Activity activity, int iconDrawable)
scheduleNotification(Activity activity, int drawableIcon, String placementId, RevMobAdsListener, Calendar)
public RevMobNotification scheduleNotification(android.app.Activity activity, int iconDrawable, String placementId)
scheduleNotification(Activity activity, int drawableIcon, String placementId, RevMobAdsListener, Calendar)
public RevMobNotification scheduleNotification(android.app.Activity activity, int iconDrawable, String placementId, RevMobAdsListener listener)
scheduleNotification(Activity activity, int drawableIcon, String placementId, RevMobAdsListener, Calendar)
public RevMobNotification scheduleNotification(android.app.Activity activity, int iconDrawable, String placementId, RevMobAdsListener listener, Calendar fireDate)
revmob.scheduleNotification(this, R.drawable.YOUR_ICON, null, null);
revmob.openNotification(this); // call this in the onCreate method
activity
- Activity that will schedule the notification. In your code, this
should work fine.iconDrawable
- R.drawable.YOUR_ICON. Mandatory to keep compatibility with older versions of Android.placementId
- The placement id. Create it on http://revmob.com. If null the default mobile app id will be used.listener
- RevMob ads listener to check if the ad was loaded correctly, displayed and clicked.fireDate
- Calendar that will be used to decide when the notification will be scheduled. If null, the RevMob servers will decide it.
public void openNotification(android.app.Activity activity)
activity
- Activity that will display the notification. In your code, this
should work fine.public void printEnvironmentInformation(android.app.Activity activity)
activity
- Activity that will display the popup. In your code,
this
should work fine.public RevMobTestingMode getTestingMode()
public void setTestingMode(RevMobTestingMode testingMode)
revmob.setTestingMode(RevMobTestingMode.WITH_ADS)
revmob.setTestingMode(RevMobTestingMode.WITHOUT_ADS)
revmob.setTestingMode(RevMobTestingMode.DISABLED)
testingMode
- public void setTimeoutInSeconds(int timeoutInSeconds)
timeoutInSeconds
-
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |