roy_sanu
asked on
Android programming
I have a small snippet of the code how to Change the value MYAPID below from input text field contents
-------------------------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ----------
MMAdView interAdView = new MMAdView(this, MYAPID, MMAdView.FULLSCREEN_AD_TRA NSITION, true, null);
interAdView.fetch();
interAdView.setListener(ne w BasicMMAdListener(){
@Override
public void MMAdCachingCompleted(MMAdV iew adview, boolean success)
{
if(success)
adview.display();
}
});
--------------------------
MMAdView interAdView = new MMAdView(this, MYAPID, MMAdView.FULLSCREEN_AD_TRA
interAdView.fetch();
interAdView.setListener(ne
@Override
public void MMAdCachingCompleted(MMAdV
{
if(success)
adview.display();
}
});
ASKER
Thanks Moderator,
Here is the some additional information i would like provide to the expert
I found that if i use this code in the OnCreate Method it do not gives the same error, but when Onclick button is event it gives me the same error . Any help will be appreciated.
Here is the some additional information i would like provide to the expert
I found that if i use this code in the OnCreate Method it do not gives the same error, but when Onclick button is event it gives me the same error . Any help will be appreciated.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I am getting error
The constructor MMAdView(new View.OnClickListener(){}, String, String, boolean, null) is undefined, what mistake i am doing
++++++++++++++++++++++++++
Button button = (Button) findViewById(R.id.fetchBut
button.setOnClickListener(
{
public void onClick(View view)
{
EditText text1 = (EditText) findViewById(R.id.editText
String mtext1=text1.getText().toS
mtext1 = apid;
MMAdView fetchCheckDisplayAdView = new MMAdView(this,apid, MMAdView.FULLSCREEN_AD_TRA
fetchCheckDisplayAdView.fe
fetchCheckDisplayAdView.se
@Override
public void MMAdCachingCompleted(MMAdV
{
if(success)
adview.display();
}
});
/**** Millennial Media Interstitial Ad Integration ****/
// String myApid = BannerActivity.isTablet(th
// myApid = mtext1;
// fetchCheckDisplayAdView = new MMAdView(this, myApid, MMAdView.FULLSCREEN_AD_TRA
// fetchCheckDisplayAdView.fe
// fetchCheckDisplayAdView.se
// @Override
// public void MMAdCachingCompleted(MMAdV
// {
// if(success)
// adview.display();
// }
// });
String message = "Fetching cached ad...";
// fetchCheckDisplayAdView.fe
Log.i(TAG, "Fetch - " + message);
Toast toast = Toast.makeText(Interstitia
toast.show();
// fetchCheckDisplayAdView.fe
Log.i(TAG, "Fetch2 - " + message);
}
}
});