I had recently implemented ads for my android game app. Through AdWhirl, I have integrated Admob and Millennial Media. Now, I am looking for the possibility to integrate ads Smaato through Adwhirl as I have integrated Admob & Millennial Media.
The AdWhirl SDK which I have downloaded does not have any adapter class for Smaato so far. I also want to know whether it is possible to write adapter class for Smaato & integrate with Adwhirl SDK?
Thanks in advance.
Regards,
Atul Prakash Singh
We have build such an adapter for iOS but not for Android yet. It should be possible to write it for Android as well.
Regards
Michael
Smaato Inc.
You have to write function for Custom event on top hierarchy.
This is a sample code :satrt_SUMO
May it helps you.
public class XXXX extends Activity implements AdWhirlInterface {
SOMABanner mBanner;<br>
AdWhirlLayout MAdWhirlLayout;
......
#Override
public void adWhirlGeneric() {
// TODO Auto-generated method stub
}
com.smaato.SOMA.AdListener adls=new com.smaato.SOMA.AdListener(){
#Override
public void onFailedToReceiveAd(AdDownloader arg0, ErrorCode arg1) {
// TODO Auto-generated method stub
//AdWhirl will now load from another ad network you have added
mBanner.setAutoRefresh(false);
mBanner.removeAdListener(adls);
MAdWhirlLayout.rollover();
}
#Override
public void onReceiveAd(AdDownloader arg0, SOMAReceivedBanner arg1) {
// TODO Auto-generated method stub
Log.v("SUMO Listener", "Ad Received.");
//AdWhirl will wait for 30 seconds or so before it will start requesting ad
mBanner.setAutoRefresh(false);
mBanner.removeAdListener(adls);
MAdWhirlLayout.adWhirlManager.resetRollover();
MAdWhirlLayout.rotateThreadedDelayed();
}
};
public void start_SUMO() {
mBanner= new SOMABanner(this);
mBanner.setPublisherId(**your publisher ID**);
mBanner.setAdSpaceId(**your space ID**);
mBanner.asyncLoadNewBanner();
mBanner.setAutoRefresh(true);
mBanner.addAdListener(adls);
MAdWhirlLayout.pushSubView(mBanner);
}
.....
Related
I'm using the linphone sip library to build an android voip app. I see a function called LinphoneCore.setPlayLevel() but i'm not sure what it does. I tried using it but it seems to have no effect.
Does anyone know what it does?
OK, so both setPlayLevel() and getPlayLevel() do absolutely nothing.
I took a look at the core code file submodules/linphone/java/impl/org/linphone/core/LinphoneCoreImpl.java only to find these placeholder function that do nothing and return nothing useful.
public int getPlayLevel() {
// TODO Auto-generated method stub
return 0;
}
public void setPlayLevel(int level) {
// TODO Auto-generated method stub
}
linphone team should update their api documentation and say these functions are deprecated
I followed this link to use the +1 button in my Android application to +1 a link or a website, but unfortunately it didn't work as expected and it didn't respond when I click on it. I tried to use the following:
mPlusOneButton.setOnPlusOneClickListener(new OnPlusOneClickListener() {
#Override
public void onPlusOneClick(Intent arg0) {
// TODO Auto-generated method stub
startActivityForResult(arg0, 0);
}
});
But also no response. As an example I tried to use the following line of code:
mPlusOneButton.initialize(plusClient, "http://www.googleplustoday.net", PLUS_ONE_REQUEST_CODE);
And there is no effect on my Google plus profile at the +1 tab.
Who can help? Thanks in advance.
Make sure to be connected to Google Plus:
mPlusOneButton.setOnPlusOneClickListener(new OnPlusOneClickListener() {
#Override
public void onPlusOneClick(Intent intent) {
if(!plusClient.isConnected()) {
plusClient.connect();
} else {
startActivityForResult(intent, 0);
}
}
}
Be sure that you initialize your mPlusOneButton prior to handling clicks such as in the onResume method. When I tested by not initializing before the click then I could get it to fail.
In the androidsdk/extras/google/google_play_services/samples/plus/src/com/google/android/gms/samples/plus/PlusOneActivity.java contains a skeleton activity for getting the PlusOne button working.
If you can post your full activity code and any applicable errors from logcat that would help further identify the issue.
I just finished my android app and I want to try LeadBolt ads.
LeadBolt information:
Java code:
#Override
public void onLoadComplete() {
// TODO Auto-generated method stub
myController = new AdController(this, "169901169");
myController.loadAd();
}
LeadBolt notification isn't shown. Why?!
You are running notifications, but in your code you have the following lines :
myController = new AdController(this, "169901169");
myController.loadAd();
Please change them to (as mentioned in the PDF documentation):
myController = new AdController(getApplicationContext(), "169901169");
myController.loadNotification();
The notification ads should then be working correctly.
Notifications requires more operations. First of all, change Manifest, then follow LeadBolt documantation
I made a previous post and I fixed the issue in that problem but I get something weirder now. So I'm following http://developers.facebook.com/docs/mobile/Android/build/#register and everything goes fine until I actually start my app. Instead of getting an app log in page, I get this:
http://imgur.com/DHpde
I have no clue why it won't go to the app log-in page like it does for everyone else. The only thing that perhaps might be different is that I had to remove the "#Override" notations for the Facebook.authorize method call.
#Override
public void onComplete(Bundle values) {
// TODO Auto-generated method stub
}
#Override
public void onFacebookError(FacebookError e) {
// TODO Auto-generated method stub
}
#Override
public void onError(DialogError e) {
// TODO Auto-generated method stub
}
#Override
public void onCancel() {
// TODO Auto-generated method stub
See this surely you will solve your error
you need to install an extension, similar to the core Android SDK, but no, here is what you need to do:
1.) go to github.com/facebook/facebook-android-sdk
2.) download the facebook directory ONLY! The other directories are only examples.
3.) Put the files from the src (you can copy the drawables too, if you want to) in the package, you are currently working with
4.) You are good to go, you can use the facebook "SDK"
see also this example https://github.com/facebook/facebook-android-sdk/tree/master/examples/Hackbook download it , it is working example provided by facebook
I'm using an adview in my application and want to know when someone has clicked that Adview!
How I can do that?
The onclicklistener does not seem to work.
You can set the listener this way:
adView.setAdListener(this);
And then implement this:
#Override
public void onPresentScreen(Ad arg0) {
//OnClick here
}
The click is handled inside of the AdMob API, and I don't think there is a way to do what you are asking with the API as its against the TOS to use a "unlock feature by clicking X number of ads" model. For that reason I don't believe it is available in the API where the onclicklistener is.
Try this
mAdView.setAdListener(new AdListener() {
#Override
public void onAdOpened() {
super.onAdOpened();
}
});