Hi,
I am new on framework7. I have successfully created an android app with framework7 and I am glad with it.
But the problem was created when I added admob pro plugin in this project.
After added it, shown a message in alert “admob plugin not ready”
therefore I have already used window.cordova.plugins.AdMob; ,window.AdMob;,
window.plugins.AdMob; and window.plugins, but problem still here.
But when I remove Framework7 files and run project on my device, so admob plugin working perfectly and show me test ad.
But when I add Framework7 files and run project on my device, so admob plugin not working and show me the message again on alert “admob plugin not ready”.
If someone have the solution of this problem so kindly reply.
Hello,
i have installed cordova admob pro plugin.
The command have successfully when i execute the command into a “cordova” directory but not in root directory of project.
After i have add this code :
// select the right Ad Id according to platform
var admobid = {};
if( /(android)/i.test(navigator.userAgent) ) { // for android & amazon-fireos
admobid = {
banner: 'ca-app-pub-xxx/xxx', // or DFP format "/6253334/dfp_example_ad"
interstitial: 'ca-app-pub-xxx/yyy'
};
} else if(/(ipod|iphone|ipad)/i.test(navigator.userAgent)) { // for ios
admobid = {
banner: 'ca-app-pub-xxx/zzz', // or DFP format "/6253334/dfp_example_ad"
interstitial: 'ca-app-pub-xxx/kkk'
};
} else { // for windows phone
admobid = {
banner: 'ca-app-pub-xxx/zzz', // or DFP format "/6253334/dfp_example_ad"
interstitial: 'ca-app-pub-xxx/kkk'
};
}
I have this error into android app :
index.html:68 Uncaught ReferenceError: AdMob is not defined
Ok. i have removed the admob-pro plugin and i have tried to install admob plus.
After insert the command i have an error:
$ cordova plugin add cordova-admob-plus --variable APP_ID_ANDROID=ca-app-pub-xxx~YYY
Installing "cordova-admob-plus" for android
Subproject Path: CordovaLib
Subproject Path: app
Installing "cordova-admob-plus" for ios
Plugin dependency "[email protected]" already fetched, using that version.
Dependent plugin "cordova-plugin-add-swift-support" already installed on ios.
"framework" tag with type "podspec" is deprecated and will be removed. Please use the "podspec" tag.
Running command: pod install --verbose
Failed to install 'cordova-admob-plus': Error: pod: Command failed with exit code 31
at ChildProcess.whenDone (/.../cordova/node_modules/cordova-common/src/superspawn.js:135:23)
at ChildProcess.emit (events.js:315:20)
at maybeClose (internal/child_process.js:1021:16)
at Socket.<anonymous> (internal/child_process.js:443:11)
at Socket.emit (events.js:315:20)
at Pipe.<anonymous> (net.js:674:12)
pod: Command failed with exit code 31
MacBook:cordova$