[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Android programming

Posted on 2012-12-27
5
Medium Priority
?
485 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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

In this post we will learn different types of Android Layout and some basics of an Android App.
Make the most of your online learning experience.
How to create a custom search shortcut to site-search Experts Exchange using Google in the Firefox browser. This eliminates the need to type out site:experts-exchange.com whenever you want to search the site. Launch your Bookmark Menu: Press 'Ctrl +…
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…

649 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