Solved

Android programming

Posted on 2012-12-27
5
481 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
  • 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Often, people trade privacy and security for convenience. However in today's concrete jungle, this is an extremely foolish decision considering the vast amount of technologies being used against consumer interest. First off, I won't waste any time e…
You should read OS supplied guidelines before developing. I can't stress that enough. The guidelines will help you understand the reasons mobile app developers do what they do.  Apple is very particular when they review appstore submissions.
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…
This video is in connection to the article "The case of a missing mobile phone (https://www.experts-exchange.com/articles/28474/The-Case-of-a-Missing-Mobile-Phone.html)". It will help one to understand clearly the steps to track a lost android phone.

860 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