Skip to content

Commit

Permalink
Fix inverted arguments for calendar.add
Browse files Browse the repository at this point in the history
  • Loading branch information
mathijs81 committed Mar 10, 2015
1 parent 833879d commit a7f209a
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions example/src/com/appbrain/example/ExampleActivity.java
Expand Up @@ -26,11 +26,11 @@ public class ExampleActivity extends Activity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);

AppBrain.init(this);
// Say we know here that the user is male and is 35 years old, then we can pass this to AppBrain:
Calendar calendar = new GregorianCalendar();
calendar.add(-35, Calendar.YEAR);
calendar.add(Calendar.YEAR, -35);

AppBrain.getAds().setUserData(
AppBrainUserData.create().setGender(Gender.MALE).setBirthDate(calendar.getTime()));
Expand All @@ -50,7 +50,7 @@ public void run() {
}
}, 2500);


final AdService ads = AppBrain.getAds();
findViewById(R.id.maybe_show_interstitial).setOnClickListener(new OnClickListener() {

Expand All @@ -62,28 +62,28 @@ public void onClick(View v) {
}
}
});

final AdOptions options = new AdOptions();
options.setListener(new InterstitialListener() {
@Override
public void onPresented() {
Toast.makeText(ExampleActivity.this,
"Interstitial presented", Toast.LENGTH_SHORT).show();
"Interstitial presented", Toast.LENGTH_SHORT).show();
}

@Override
public void onDismissed(boolean arg0) {
Toast.makeText(ExampleActivity.this,
"Interstitial dismissed " + arg0, Toast.LENGTH_SHORT).show();
}

@Override
public void onClick() {
Toast.makeText(ExampleActivity.this,
"Interstitial clicked", Toast.LENGTH_SHORT).show();
}
});

findViewById(R.id.show_interstitial).setOnClickListener(new OnClickListener() {

@Override
Expand All @@ -93,12 +93,12 @@ public void onClick(View v) {
"Not showing, no internet connection?", Toast.LENGTH_LONG).show();
}
}
});
});

ads.setOfferWallClickListener(this, findViewById(R.id.show_offerwall));

findViewById(R.id.show_banners).setOnClickListener(new OnClickListener() {

@Override
public void onClick(View arg0) {
Intent intent = new Intent(ExampleActivity.this, BannerActivity.class);
Expand Down

0 comments on commit a7f209a

Please sign in to comment.