cordova-plugins

How to Create Custom Inapp Browser?

限于喜欢 提交于 2019-12-12 04:28:04
问题 Hi I want to add Some buttons over the inAppbrowser in my android application how to add here is my code $scope.customInappbrowser = function() { $cordovaInAppBrowser.open('https://www.google.co.in', '_blank', options) .then(function(event) { // success }) .catch(function(event) { // error }); // window.open(v, "_system", "location=yes"); } $scope.customInappbrowser(); 回答1: You can try following plugin that is already modified. cordova-plugin-themeablebrowser. You can refer its code for

PushNotification is undefined (ng-cordova)

試著忘記壹切 提交于 2019-12-12 04:24:50
问题 In my ionic application when running the application in browser i get following error ng-cordova.js:6378 Uncaught ReferenceError: PushNotification is not defined in my console, as well as when i build the application for android and run in my phone it doesnot work there as well i.e there is no popup for registration Id : alert(data.registrationId); . app.run(function($ionicPlatform, $cordovaPushV5) { $ionicPlatform.ready(function() { // For Push Notification var options = { android: {

upload contact on server in phonegap

╄→гoц情女王★ 提交于 2019-12-12 03:54:16
问题 I have installed plugin cordova-plugin-contacts to fetch a single contact. Here is the code snippet $('body').on("click", "#btnAttachment", function () { navigator.contacts.pickContact(function(contact){ alert(JSON.stringify(contact)); },function(err){ console.log('Error: ' + err); }); }); I am getting all things in contact object. Now I want to upload a contact on server as a vcf file or by any other suitable method. I have the url provided just want to make a post call. Can anyone help me

OnLocationStateChange cordova application crashes

喜欢而已 提交于 2019-12-12 03:45:51
问题 The application i am working is basically fetches users location using cordova geolocation plugin, and then show the location on the google maps. The problem i'm facing is that when i kill the app and turn off/on the location services from settings the application crashes. java.lang.RuntimeException: Unable to start receiver cordova.plugins.Diagnostic$LocationProviderChangedReceiver: java.lang.NullPointerException: Attempt to invoke virtual method 'void cordova.plugins.Diagnostic

Ionic2,Angular2: How to hide the content under the keyboard on a device when keyboard pops out?

旧巷老猫 提交于 2019-12-12 03:39:34
问题 I tried to debug my app on an android device but I came across this weird problem that the keyboard which pops on clicking an input field pushes the whole page content(including the tabs at the bottom) to the top along with it. I might be missing out something silly. Kindly help me. I've gone through many links which were not very clear and a few were not working. https://github.com/driftyco/ionic/issues/7047 https://github.com/driftyco/ionic/issues/5432 https://forum.ionicframework.com/t

Cordova FIle Transfer plugin how to pass transloadit parameters?

妖精的绣舞 提交于 2019-12-12 03:31:06
问题 Update Trying to post the file to transloadit using the FileTransfer plugin using the following code var uri = encodeURI("https://api2-eu-west-1.transloadit.com/assemblies"); var options = new FileUploadOptions(); options.fileKey = "file"; options.fileName = filepath.substr(filepath.lastIndexOf('/') + 1); var params = new Object(); params.auth =new Object(); params.auth.key ="***************" ; options.params = params; var ft = new FileTransfer(); ft.upload(filepath, uri, win, fail, options);

Can't read a file from android directory using cordova-plugin-file plugin

独自空忆成欢 提交于 2019-12-12 03:25:41
问题 I'm trying to read a txt file located in the "sdcard" directory of my android phone. but the "onloadend" event of the "FileReader" never fires, in fact none of the events seem to work. I'm building the app with "phonegap-build" and I'm importing the cordova-plugin-file plugin by adding to the "config.xml" file the line: <gap:plugin name="cordova-plugin-file" source="npm" /> The code is the following (the variables and functions are in portuguese, sorry): // Importar dados $("#ImportarDados")

cordova admob pro not displaying banner

牧云@^-^@ 提交于 2019-12-12 03:09:59
问题 I am using Cordova 6.3.1, when I use cordova-plugin-admobpro, I am getting error, AdMob not defined. I have tried many codes and suggestions but it's still not working. Please help me on these. I am building app in only android and build is always successful, just only it's just banners are not displayed. 回答1: few things you need to check before you add the banner id etc. Make AutoShow: true Make AdId to PublisherId Check the testing mode and banner id is entered correct Make sure that your

Speech recognition plugin not working in Cordova 6

你说的曾经没有我的故事 提交于 2019-12-12 03:06:48
问题 I am using Visual studio tools for Apache Cordova to develop Android app. I started new project and added speech recognition plugin using GIT url. https://github.com/macdonst/SpeechRecognitionPlugin It installed successfully and project build is also successful. When I run application, In below code, It shows one alert before Speech recognition plugin initialization and never reaches second alert after that in below code. function onDeviceReady() { // Handle the Cordova pause and resume

Cordova inAppBrowser opens www.google.com but not my custom facebook login page?

守給你的承諾、 提交于 2019-12-12 02:43:52
问题 I am working on a Cordova based mobile app. I want to open a facebook login page in InAppBrowser. Below is my code to open the page $scope.InAppBrowser = cordova.InAppBrowser.open('https://onboarding.roialty.com/social/facebook/start?login_key=login_key', '_blank', 'location=no'); $scope.InAppBrowser.show(); But it opens to a white blank page. When I edit the link to www.google.com then it opens in the browser. But it does not open my facebook login link. I have also tried adding <access