Skip to content

Update android admob plugin#1

Open
BarryDam wants to merge 2 commits into
acyl:masterfrom
BarryDam:master
Open

Update android admob plugin#1
BarryDam wants to merge 2 commits into
acyl:masterfrom
BarryDam:master

Conversation

@BarryDam

Copy link
Copy Markdown

I've updated the plugin so it can be used in phonegap 2.2 + (tested in 2.7)

Also I've added an option to hide (and later show) the advertisement

in the AdMobPlugin.js add:

AdMob.prototype.showHide =  function(showorhide, successCallback, failureCallback) {
  if(!(showorhide == 'hide' || showorhide == 'show')){
      console.log('AdMob: ',' hide or show');
      return false;
  }
  cordova.exec(
     successCallback,
     failureCallback,
     'AdMobPlugin',
     'showHide',
     [showorhide]
 );
};

and in your project js you can hide the add :

 window.plugins.AdMob.showHide('hide',onSucces(){},onError(){});

or show the add :

 window.plugins.AdMob.showHide('show',onSucces(){},onError(){});

BarryDam added 2 commits June 27, 2013 08:54
I've updated the plugin so it can be used in phonegap 2.2 + (tested in 2.7)

Also I've added an option to hide (and later show) the advertisement

in the AdMobPlugin.js add:

```javascript
AdMob.prototype.showHide =  function(showorhide, successCallback, failureCallback) {
  if(!(showorhide == 'hide' || showorhide == 'show')){
      console.log('AdMob: ',' hide or show');
      return false;
  }
  cordova.exec(
     successCallback,
     failureCallback,
     'AdMobPlugin',
     'showHide',
     [showorhide]
 );
};
```

and in your project js you can hide the add :
```javascript
 window.plugins.AdMob.showHide('hide',onSucces(){},onError(){});
```
or show the add : 
```javascript
 window.plugins.AdMob.showHide('show',onSucces(){},onError(){});
```
Added the option to hide (and later show) the adView (Admob advertisement)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant