cordova-plugins

Add android:name=“something” to AndroidManifest.xml “application” tag from Cordova plugin.xml

家住魔仙堡 提交于 2019-11-28 06:53:35
I decided to open new question because none of those that are already posted, has a good answer. I need to update AndroidManifest.xml "from plugin.xml" , so that the <application> tag has the following property, alongside those it already has: android:name="mypackage" How can do that? Thank you ndeverge I had the same issue, and I used a Cordova hook to do the work. First, edit your config.xml file to add the hook: <platform name="android"> <hook type="after_prepare" src="scripts/android_app_name.js" /> </platform> Create a file called scripts/android_app_name.js (set it executable), and

Can't test Cordova app when open it in browser

旧城冷巷雨未停 提交于 2019-11-28 06:17:13
问题 I created a Cordova app using the 4.3.0 version and the project for an iOS project. Whenever I open the index.html (www folder) file in a desktop browser, it gets stuck in an infinite loop requesting gap://ready . Why is this happening? How can I solve it? Thanks a lot. EDIT AND UPDATE: The iOS app was not working because there was a plugin missing: https://github.com/apache/cordova-plugin-network-information/blob/master/doc/index.md I added it, then build the project again, and it worked.

Get facebook user profile using cordova

点点圈 提交于 2019-11-28 06:08:14
问题 I want to get first name, last name, email when user login with facebook. My app is in Cordova. I am using cordova plugin for facebook authentication this one "https://github.com/Wizcorp/phonegap-facebook-plugin". I can login with Facebook but how can I get name, email from it. Thanks in advance. 回答1: add facebook cordova plugin using below command See Details cordova plugin add https://github.com/Wizcorp/phonegap-facebook-plugin --variable APP_ID="YOURAPPID" --variable APP_NAME="YOURAPPNAME"

Cordova File Plugin Has Wrong Directory

巧了我就是萌 提交于 2019-11-28 05:56:45
问题 So I am building a cordova/phonegap app in angularjs 1 and I'm trying to save and read from a file called calendar.txt in the app's private directory/sandbox and can't. My console logs while debugging show that there are no errors and the file is being created if it doesn't exist, and is being read correctly. However that is not the case. When I build and run on my device, the data is not saved. Also no file is created in the location specified. I console logged the path it was trying to use

How to get access to phonegap API from a remote page

纵饮孤独 提交于 2019-11-28 05:52:35
I have to following situation: I have a already existing remote webpage and i want to develope an app which uses this page. So far, so good. When I start the app the local index.html is loaded and it redirects ( window.open target: _self ) to the external website. This website is opened in the phonegap webview. On the external website I added the cordova.js in order to get access to the native phonegap API. But it doesn't work correctly. The deviceReady event is triggered correctly, but I have no access to the phonegap API, for example navigator.camera. How can I get it done, to get access to

Opening a PDF in cordova javascript

无人久伴 提交于 2019-11-28 05:25:22
问题 I have generated a PDF invoice using the file plugin. Now I want to open the file in the app. I tried inAppBrowser, but its giving an empty page. I tried fileopener, its neither giving a success or failed message. How do I specify the path to my file . please help!! In app Browser Method var cdr=''; window.resolveLocalFileSystemURL(cordova.file.externalDataDirectory, function(dir) { cdr=dir; alert("cdr "+cdr); dir.getFile("test.pdf", {create: true, exclusive: false}, function (fileEntry) {

cordova run with ios error .. Error code 65 for command: xcodebuild with args:

风流意气都作罢 提交于 2019-11-28 04:49:42
This error occur only when I try to cordova run ios --device Even after cordova build ios command executed, non error is reported. Whats I do wrong? And how to debug cordova projects on my iPhone (need this because need to test a Camera feature) WITH CONFIGURATION Debug === Check dependencies Code Sign error: No provisioning profiles found: No non–expired provisioning profiles were found. ** BUILD FAILED ** The following build commands failed: Check dependencies (1 failure) Error code 65 for command: xcodebuild with args: -xcconfig,/Users/ridermansb/Projects/jdapp/platforms/ios/cordova/build

Type HTTPOriginal is not assignable to type Provider, ionic error after plugin installation

邮差的信 提交于 2019-11-28 04:13:21
问题 After i install the cordova-plugin-advanced-http plugin, when i try to import it on providers in app.modules.ts, i get the following: I have reinstalled, clean cache, and it keeps happening. Here's the app.module.ts code: import { HTTP } from '@ionic-native/http'; import { GalleryPageModule } from './../pages/gallery/gallery.module'; import { HttpClient, HttpClientModule } from '@angular/common/http'; import { BrowserModule } from '@angular/platform-browser'; import { ErrorHandler, NgModule }

Unable to delete file using cordova?

纵然是瞬间 提交于 2019-11-28 01:42:54
I am saving my file here : /storage/emulated/0/myApp/helloworld.wav I am trying to delete this file window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, successCallback, errorCallback) function successCallback(fs) { fs.root.getFile('/storage/emulated/0/myApp/helloworld.wav', { create: false }, function(fileEntry) { fileEntry.remove(function() { alert('File removed.'); }, errorCallback); }, errorCallback); } function errorCallback(error) { alert("ERROR: " + error.code) } It does not delete the file and always returns error code 1 (not found). Can anybody help me in pointing what is wrong.

Cordova application using Angular 2

只谈情不闲聊 提交于 2019-11-28 01:23:40
Instead of ionic I would like to use cordova framework. So far, Step 1: I have created an angular 2 application. Step 2: I have created an cordova application and integrated angular 2 application in it. Its running successfully. Step 3: Next step is to load cordova.js file on load Step 4: Add cordova plugin(like camera , device ext) in my project. Step 1 and 2 completed. Please help me out to complete step 3 and step 4 . When I call plugin its throws an error as follows, Got an output with following steps, 1)Created an angular project (Optional)I am using the angular IDE to create angular