?
Solved

Android programming

Posted on 2012-12-27
5
Medium Priority
?
484 Views
Last Modified: 2013-11-21
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_TRANSITION, true, null);
interAdView.fetch();
interAdView.setListener(new BasicMMAdListener(){
  @Override
  public void MMAdCachingCompleted(MMAdView adview, boolean success)
  {
    if(success)
      adview.display();
  }
});
0
Comment
Question by:roy_sanu
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
5 Comments
 

Author Comment

by:roy_sanu
ID: 38731943
Hi,

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.fetchButton);
button.setOnClickListener(new OnClickListener()
      {
      public void onClick(View view)
      {
      EditText text1 = (EditText) findViewById(R.id.editText1);
      String mtext1=text1.getText().toString();
      mtext1 =  apid;
MMAdView fetchCheckDisplayAdView = new MMAdView(this,apid, MMAdView.FULLSCREEN_AD_TRANSITION, true, null);
fetchCheckDisplayAdView.fetch();
fetchCheckDisplayAdView.setListener(new BasicMMAdListener(){
  @Override
  public void MMAdCachingCompleted(MMAdView adview, boolean success)
                          {
                            if(success)
                              adview.display();
                          }
                        });

                        /**** Millennial Media Interstitial Ad Integration ****/
                        
                  //      String myApid = BannerActivity.isTablet(this) ? SampleAppTabActivity.INTERSTITIAL_TABLET_APID : SampleAppTabActivity.INTERSTITIAL_PHONE_APID;
//      myApid = mtext1;
//      fetchCheckDisplayAdView = new MMAdView(this, myApid, MMAdView.FULLSCREEN_AD_TRANSITION, true, BannerActivity.createMetaData());
            //          fetchCheckDisplayAdView.fetch();
            //          fetchCheckDisplayAdView.setListener(new BasicMMAdListener(){
            //           @Override
            //           public void MMAdCachingCompleted(MMAdView adview, boolean success)
            //            {
            //              if(success)
            //               adview.display();
            //                  }
            //                });
                        
                        
                        String message = "Fetching cached ad...";
            //            fetchCheckDisplayAdView.fetch();
                        
                        Log.i(TAG, "Fetch - " + message);
                        Toast toast = Toast.makeText(InterstitialActivity.this, message, Toast.LENGTH_SHORT);
                        toast.show();
                  //      fetchCheckDisplayAdView.fetch();
                        Log.i(TAG, "Fetch2 - " + message);
                        
                  }
                  }      
                  
            });
0
 

Author Comment

by:roy_sanu
ID: 38735580
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.
0
 

Accepted Solution

by:
roy_sanu earned 0 total points
ID: 38739155
Moderator,

Pls close the question as i got the answer for it.

Thanks
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you use the Google Now Launcher, as an aftermarket add on, have a Samsung Note 5 and are worried about power consumption be wary of using the ultra power saving mode.  Here is what happened to me when I made the mistake of trying this out...
This article will show how Aten was able to supply easy management and control for Artear's video walls and wide range display configurations of their newsroom.
Google currently has a new report that is in beta and coming soon to Webmaster Tool accounts. This Micro Tutorial will highlight new features for Google Webmaster Tools.
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
Suggested Courses

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question