I am attempting to integrate a vungle ad into my android app. I had the ad working a few days ago and I changed nothing more than some xml layout since then. Now the vungle app is not loading. The vungle event listener works as it runs the code I have under the adUnavaliable section.
I noticed that a message comes up when I hover my cursor over the vunglepub.playAd(); line of code.
this messageg is: Note: This element neither has attached source nor attached Javadoc and hence no Javadoc could be found.
I'm not exactly sure what this means.
Here is my code for this section:
public class FinishActivity extends android.app.Activity {
// get the VunglePub instance
final VunglePub vunglePub = VunglePub.getInstance();
//setting a different score for the application in order to give back to the previouos screen after ad was played
int score1 = 0;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.endscreen);
vunglePub.setEventListener(vungleListener);
final int score = getIntent().getIntExtra("finalscore", -1);
score1 = score;
final View restart = findViewById(R.id.restartButton);
final View continueButton = findViewById(R.id.continueButton);
final TextView scorefinal = (TextView) findViewById(R.id.finalscore);
scorefinal.setText("Your Score: " + score);
restart.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
//if restarting thescore use this
Intent menuIntent = new Intent("com.nordquistproduction.robberducky.StartProgram");
startActivity(menuIntent);
finish();
}
});
continueButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
//playing add
vunglePub.playAd();
}
});
}
private final EventListener vungleListener = new EventListener(){
@Override
public void onAdEnd(boolean wasCallToActionClicked) {
// Called when the user leaves the ad and control is returned to your application
/// if keeping the score use this
Intent intent = new Intent(getApplicationContext(), StartProgram.class);
intent.putExtra("startingscore", score1);
startActivity(intent);
finish();
}
@Override
public void onAdStart() {
// TODO Auto-generated method stub
}
@Override
public void onAdUnavailable(String arg0) {
// TODO Auto-generated method stub
finish();
}
@Override
public void onCachedAdAvailable() {
// TODO Auto-generated method stub
}
@Override
public void onVideoView(boolean arg0, int arg1, int arg2) {
// TODO Auto-generated method stub
}
};
@Override
protected void onPause() {
super.onPause();
vunglePub.onPause();
}
@Override
protected void onResume() {
super.onResume();
vunglePub.onResume();
}
I am super confused of why this ad is no longer working and what the message about the java docs means.
Please help! I have been stuck on this for a day or two now.