Skip to content

Instantly share code, notes, and snippets.

@revmob-sdk
Last active October 10, 2015 05:18
Show Gist options
  • Save revmob-sdk/3639740 to your computer and use it in GitHub Desktop.
Save revmob-sdk/3639740 to your computer and use it in GitHub Desktop.
Android 2
package com.revmob.sample.developer;
import android.app.Activity;
import com.revmob.RevMob;
import com.revmob.ads.EnvironmentConfig;
public class Main 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.main);
// Starting RevMob session
revmob = RevMob.start(this, APPLICATION_ID);
// Remove this line before release your app.
revmob.setTestingMode(RevMobTestingMode.WITH_ADS);
}
public void onStart() {
super.onStart();
revmob.showFullscreen(this);
}
}
package com.revmob.sample.developer;
import android.app.Activity;
import com.revmob.RevMob;
import com.revmob.ads.EnvironmentConfig;
public class Main 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.main);
// Starting RevMob session
revmob = RevMob.start(this, APPLICATION_ID);
// Remove this line before release your app.
revmob.setTestingMode(RevMobTestingMode.WITHOUT_ADS);
}
public void onStart() {
super.onStart();
revmob.showFullscreen(this);
}
}
package com.revmob.sample.developer;
import android.app.Activity;
import com.revmob.RevMob;
public class Main extends Activity {
private static String APPLICATION_ID = "4f56aa6e3dc441000e005a20";
private RevMob revmob;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
revmob = RevMob.start(this, APPLICATION_ID);
revmob.openNotification(this); // It must be in the onCreate method
}
public void someMethod() {
revmob.scheduleNotification(this, R.drawable.YOUR_ICON_IMAGE);
}
}
package com.revmob.sample.developer;
import android.app.Activity;
import com.revmob.RevMob;
public class Main 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.main);
String placementId = "5236aa6f3dc441000e205b30";
// Starting RevMob session
revmob = RevMob.start(this, APPLICATION_ID);
}
public void onStart() {
super.onStart();
// Show fullscreen with defined placement.
revmob.showFullscreen(this, placementId);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment