cordova-plugins

www/index.html would like to use your current location - Ionic Framework

不羁岁月 提交于 2019-12-11 03:58:40
问题 I searched various forums and posts related to GeoLocation based alert issue; For some reason no technique worked in my case. Added "cordova-plugin-geolocation" plugin to my Ionic Framework Project. Added to my base Controller under $ionicPlatform.ready(...) navigator.geolocation.getCurrentPosition(function(position) { var coords = {}; coords.updated = new Date(); coords.latitude = position.coords.latitude.toFixed(6); coords.longitude = position.coords.longitude.toFixed(6); coords.altitude =

Cannot use asynchronous methods in Cordova 3.4. Onsuccess is not called after the first call of plugin method

点点圈 提交于 2019-12-11 03:55:48
问题 Following code does not work properly: public class TestPlugin extends CordovaPlugin { public static CallbackContext callbackContext; class TestRun implements Runnable { public void run() { try { Thread.sleep(10000); } catch (InterruptedException e) {} PluginResult result = new PluginResult(PluginResult.Status.OK, callbackContext.getCallbackId()); result.setKeepCallback(false); callbackContext.sendPluginResult(result); } } @Override public boolean execute(String action, JSONArray args,

Cordova created files not showing in Windows Explorer unless restart of device

做~自己de王妃 提交于 2019-12-11 02:53:33
问题 I have recently created a Cordova Application to work on a Android table. everything is working great and my application saves audio files that have been recorded by the user by using the org.apache.cordova.media plugin. I am saving recorded sound files to a specific directory within "mnt/sdcard/" and when exploring the device using ES File Explorer i can see the .mp3 files. However if i navigate to the same directory within Windows Explorer (with my device attached via USB) i am unable to

Ionic 2 Cordova and Typescript (App Preferences plugin)

空扰寡人 提交于 2019-12-11 02:25:26
问题 I am working on Ionic 2 application with Typescript. For setting up preferences I wish to use the cordova plugin https://github.com/chrisekelley/AppPreferences/. There are a few things I am strugling with. After a lot of googling there are a few things that I am not yet able to figure out. It would be great If anyone can help. Using the above Cordova Plugin with Ionic 2. There are a few posts on the internet which got me to where I am currently. But most of them refer to javascript so dont

Ionic + Capacitor - PWA Mobile Camera Access on iOS - Works in Safari - But not when from Home Screen icon

半世苍凉 提交于 2019-12-11 01:44:33
问题 As the title says, the camera works fine in the PWA when navigating to the app URL from within Safari. But after using "Add to Home Screen" to create a desktop icon and launching the PWA from the new icon, the PWA works in every respect as expected, but the camera doesn't open up. I also tried using the Chrome browser on the device, but unfortunately, the camera won't even open from within the PWA when launched via URL. When launching a PWA from the desktop, I assume that iOS will use Safari,

PhoneGap Geolocation is blocked in iOS10

陌路散爱 提交于 2019-12-11 01:22:11
问题 My Phonegap app leverages the (Cordova 3.8) webviews 'W3C Geolocation API'. Since upgrading from iOS 9.x to iOS 10 (beta) however, using navigator.geolocation.getCurrentPosition(...) now returns an error: Access to geolocation was blocked over insecure connection to http://localhost. ERROR(2): Origin does not have permission to use Geolocation service I do not currently use the Cordova Whitelist Plugin. Would using that help or is there a simpler fix? 回答1: I added the geolocation plugin

ionic plugin add phonegap-plugin-push results in a 404 Not Found Error

人走茶凉 提交于 2019-12-11 01:13:31
问题 I was following the official (and rather great) docs over at Ionic for how to get started with push notifications. However, once the instructions said to install the phonegap-plugin-push plugin, I received the following error: nikola@Nikolas-Mini ~/Desktop/ionicTesting/ionicPush > ionic plugin add phonegap-plugin-push Error: 404 Not Found: phonegap-plugin-push at RegClient.<anonymous> (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/npm/node_modules/npm-registry

Facebook Chatheads in a Phonegap app

僤鯓⒐⒋嵵緔 提交于 2019-12-11 01:07:43
问题 We already have a production Phonegap hybrid app. A new requirement is to implement a facebook's chatheads like overlay but I haven't find any plugin or documentation talking about this potential use-case with Cordova. Is it possible to implement something like this using Phonegap? If I try the native implementation, Will I be able to link that with my Cordova app? 回答1: The Microsoft Ace plugin for Cordova provides APIs that allow for building features like this. There's sadly no

ionic cordova build ios fail installing custom plugin with xcode swift 3 framework

纵然是瞬间 提交于 2019-12-11 00:45:32
问题 I'm trying to read a function from an iOS framework i have created which I have added into a custom cordova plugin. I have compiled the framework as "Generic iOS Device", as was suggested in some post but i still have a problem in using the framework function.. I'm working with cordova cli 7.0.1 and cordova-ios": ^4.4.0. in the plugin config.xml file I'm using which add my framework but calling my function (in the plugin which try to read a framework function) return: error: 'printer' is

Why ionic-native/contacts plugin crash the app when try to save contact at android 8?

二次信任 提交于 2019-12-11 00:40:59
问题 I try to save contact using ionic-native/contacts plugin , it works on all android versions except android 8, the app is stopped and closed. This is my code which is the same of ionic framework example: SaveToContact(phone, name) { try { let contact: Contact = this.contacts.create(); contact.name = new ContactName(null, name, ''); contact.phoneNumbers = [new ContactField('mobile', phone)]; this.global.presentToast('Will Save!'), contact.save().then( () => this.global.presentToast('Contact