android - Dataconnection is not there, then instead AD want to draw something -
i have ad in application. if not connected internet, want draw text instead of ad. how can find out once ad has come application? there methods detect that? in advance
you can use adlistener
detect whether adview receives ads or not.
adview adview = new adview(activity, adsize.banner, "xxxxxxxxxx"); adview.setadlistener(new adlistener() { @override public void onreceivead(ad arg0) { // method called when ad received } @override public void onfailedtoreceivead(ad arg0, errorcode arg1) { // method called when ad cannot received } @override public void onpresentscreen(ad arg0) { } @override public void onleaveapplication(ad arg0) { } @override public void ondismissscreen(ad arg0) { } });
Comments
Post a Comment