javaandroidandroid-studioadmobadmob-rewardedvideoad

add multiple rewards from admob reward videos


I have my code set up to when user finishes watching reward ad video, text view updates to "points : 01" . I would like this to update one point each time a video is watched for example "points : 02" etc. I have tried to just add a second .setText line but does not work . My impressions are set to 2 impressions per user every 24 hours

here is the part of code I would like to add incrementing points to

@Override
public void onRewarded(RewardItem rewardItem) {

    mText.setText("Points : 01");

}

Solution

  •  private void addPoints(int points) {
        pointCount +=  points;
    
    // save points to SharedPrefs
        savePoints(pointCount);
    
        mText.setText("Points: " + pointCount);
    }