phonegap-plugins

Show Interstitial Ad via AdMob in Ionic every 2 minutes

牧云@^-^@ 提交于 2019-12-03 21:23:35
I'm using AdMob plugin in Ionic and with this code I show an Interstital ad: function initAd(){ // it will display smart banner at top center, using the default options if(AdMob) AdMob.createBanner( { adId: admobid.banner, bannerId: admobid.banner, position: AdMob.AD_POSITION.BOTTOM_CENTER, autoShow: true, isTesting: false, success: function() { console.log('banner created'); }, error: function() { console.log('failed to create banner'); } }); window.AdMob.prepareInterstitial({ adId:admobid.interstitial, autoShow:false }); window.AdMob.showInterstitial(); } Is there a way to show intersitial

cordova[phonegap] Setting splash screen is not working fine in ios

寵の児 提交于 2019-12-03 21:03:45
I have added splash screen for my phonegap app. I am building phonegap app online at http://build.phonegap.com . Splash Screen is working fine for android .But on ios splash screen hides before the defined time. Config.xml For Splash Screen <?xml version="1.0" encoding="UTF-8" ?> <widget xmlns = "http://www.w3.org/ns/widgets" xmlns:gap = "http://phonegap.com/ns/1.0" xmlns:android = "http://schemas.android.com/apk/res/android" id = "com.clerisy.arcade" versionCode = "10" version = "1.0.0" > <!-- versionCode is optional and Android only --> <name>xxxxxxxxxxxxx</name> <description>

Android: phonegap/cordova: switch full screen mode while app is running

无人久伴 提交于 2019-12-03 20:27:39
I want to switch between full screen mode and normal mode while my app is running. is there any phonegap plugin to do this for me (Android) ? if no, Please tell me how can I switch between full screen and normal in java, called in javascript. It's possible to do using this plugin: https://github.com/mesmotronic/cordova-plugin-fullscreen it has functions AndroidFullScreen.showSystemUI, AndroidFullScreen.leanMode, AndroidFullScreen.immersiveMode to do the switch. Try the following method. It displays full screen. Set Fullscreen as following method. call this method before "super.LoadURL("....");

PhoneGap/Cordova calendar integration (Android)

风流意气都作罢 提交于 2019-12-03 17:28:36
I'm building an Android app using PhoneGap (aka Cordova), and am having trouble getting a calendar integration to work. Disclaimer: I'm a noob to both Android and PhoneGap, please bear with me. All I'm trying to do is add an event to the user's calendar. Following this tutorial , I've created a Plugin that attempts to launch a Calendar Intent. The code looks like this: public class CalendarPlugin extends Plugin { public static final String NATIVE_ACTION_STRING="addToCalendar"; public static final String SUCCESS_PARAMETER="success"; @Override public PluginResult execute(String action, JSONArray

How to copy a custom ios framework using plugin.xml on Phonegap 3

半城伤御伤魂 提交于 2019-12-03 15:33:38
问题 I am currently making a plugin for phonegap 3. I have a custom framework to copy using the source-file directive. In the plugin.xml I tried: <source-file src="libs/ios/mylib.framework" /> but I get the error when I add the plugin to my project: mylib.framework is a directory (not copied) I tried to copy the framework file by file but it is going in the wrong directory. How can I copy a custom ios framework using the plugin.xml file? 回答1: Good news: it seems that the Cordova folks are working

Error in Phonegap Application: Uncaught module cordova/plugin_list already defined

旧时模样 提交于 2019-12-03 14:53:33
问题 I have been trying to resolve many issues from having updated from Phonegap 2 to Phonegap 3.3 but I can't seem to fix this one. I have read from some users that uncaught module exceptions can cause imported plugins to stop functioning. I am having some odd bugs with a local notification plugin so I would like to fix this issue and see if it helps. Here is the error as it appears in logcat within Eclipse: [INFO:CONSOLE(79)] "Uncaught module cordova/plugin_list already defined", source: file://

phonegap: how to check if gps is enabled

穿精又带淫゛_ 提交于 2019-12-03 13:59:19
问题 I want to show an alert saying that "Please turn on your GPS". How can I get GPS status using phonegap? I have used following code but I don't get any alert message if GPS is turned off. Instead nothing happens. <!DOCTYPE html> <html> <head> <title>Device Properties Example</title> <script type="text/javascript" charset="utf-8" src="cordova.js"></script> <script type="text/javascript" charset="utf-8"> // Wait for device API libraries to load // document.addEventListener("deviceready",

Facebook app settings on PhoneGap application

蹲街弑〆低调 提交于 2019-12-03 13:02:32
I have a phonegap application that uses the main facebook-plugin for connecting. I'm also using the phonegap build to directly get the apk/ipa without generating an android/ios project. Inside the facebook for developers, however, I have to complete some settings for my application that seem to require more than the simple phonegap build. I saw some tutorial in generating the hash key for an android app, but, what should I complete into the "Class Name" field(the activity that facebook will launch) since I don't have any class in my javascript-phonegap code? I have provided screenshots of the

difference between window.openDatabase() and window.sqlitePlugin.openDatabase() functions?

£可爱£侵袭症+ 提交于 2019-12-03 12:39:10
Using Cordova version 3.x and Android version 2.x to 4.x. I am wondering: Is my understanding correct that all android devices by default have an sqlite program/interface for creating sqlite database? Do both the above database function calls create a sqlite database in the device? If the above answer is no , then what type of Database do both the above function calls create? If the answer is yes , then is window.sqlite.openDatabase() function wrapper around window.openDatabase() ? Are the databases created by the call persistent? That is, is the data available after closing and reopening the

How to add Live Reload when using the command cordova serve?

亡梦爱人 提交于 2019-12-03 12:10:35
问题 I am using this command to open up my app in the browser: cordova serve but it does not refresh itself when I update my code. How can I do that? I have tried to use phonegap serve instead which has a live reload but it keeps sending me alerts and crashes my browser. So, if you can please tell me how can I solve either of the two issues that will be wonderful. 回答1: You could try the Cordova Browsersync plugin. Instructions to use the plugin are in the plugin's repo. Once you add this plugin