cordova

Phonegap File Download to device - Which device path to take?

我与影子孤独终老i 提交于 2020-01-13 09:45:22
问题 i was researching on how to download a file to the native filesystem via a URL with phonegap. I then read about this method: http://docs.phonegap.com/en/1.4.1/phonegap_file_file.md.html#FileTransfer_download It should allow one to save files directly via a URL to the device. But it needs a specified target where to save the file. target - Full path of the file on the device What would be best practise to choose here, so the file does not just get hidden in some folder, but is accessible. What

Zipping files with javascript - corrupt archive

孤街醉人 提交于 2020-01-13 09:41:13
问题 I'm trying to use JSZip to zip some text and then open it with 7Zip. The problem is, the archive is apparently corrupted at some point. I can't open it. I'm guessing it's not created correctly, possibly because I'm not using the correct encoding, but there could also be a slight chance that it's happening during transfer from my Android device (this is a Phonegap project) to my PC (I use adb to transfer the archive). My code is: var zip = new JSZip(); zip.add("hi.txt", "Hello World"); var

Export sqlite db in phonegap app

独自空忆成欢 提交于 2020-01-13 09:40:12
问题 We have an app using cordova (phonegap) and his own sqlite DB (I mean we didn't install an external sqlite). We need to backup the DB into the SD memory but we have problems to export the sqlite file from phonegap to SD. May anybody help us? 回答1: A couple years late, I know, but this is working for me on Cordova 5.4.1 and running on Android (I think iOS uses cordova.file.application too, but I have not tested yet): this.getdbfilename = function () { return "dbfile.db"; }; this.getdbdirectory

Load assets from www folder on iOS 8 with Cordova 3.7 (file://)

别说谁变了你拦得住时间么 提交于 2020-01-13 09:24:12
问题 I have an hybrid app that works perfectly on iOS 7 using Cordova 3.7 and jQuery Mobile 1.3.2 I am testing it on iOS 8 and it is broken. I am requesting each page(view) of my app using absolute paths, using the file:// protocol, like: file:///var/mobile/Applications/<UUID>/MyApp.app/www/views/add-project.html but i get the error: Failed to load resource: The requested URL was not found on this server. I read about this bug, is that the problem? Also, on iOS 8, the location of the www folder is

Build cordova apps via ssh on a remote Mac

自闭症网瘾萝莉.ら 提交于 2020-01-13 08:13:48
问题 I've been building Android Phonegap apps locally on my Windows PC and using Phonegap Build to build IOS apps. The design guys have a Mac that we're already using to publish the app in iTunes. But even if Phonegap build is a great tool, there are many drawbacks : build time can sometimes be quite long, not all plugins are available, plugins submission seems sometimes quite long and not always successfull, building debugging a home-made plugin using Phonegap build seems just impossible. For all

Build cordova apps via ssh on a remote Mac

不打扰是莪最后的温柔 提交于 2020-01-13 08:13:10
问题 I've been building Android Phonegap apps locally on my Windows PC and using Phonegap Build to build IOS apps. The design guys have a Mac that we're already using to publish the app in iTunes. But even if Phonegap build is a great tool, there are many drawbacks : build time can sometimes be quite long, not all plugins are available, plugins submission seems sometimes quite long and not always successfull, building debugging a home-made plugin using Phonegap build seems just impossible. For all

Invalid JAVA_HOME when build with cordova

我的梦境 提交于 2020-01-13 08:07:43
问题 I am trying to emulate an app on my device with cordova in OpenSuse Leap 42.1. But when I tried to emulate the app with the cordova run I get the error below: cordova run Running command: /home/soufraz/Projects/apps/myproject/platforms/android/cordova/run ERROR: Error: Failed to run "java -version", make sure that you have a JDK installed. You can get it from: http://www.oracle.com/technetwork/java/javase/downloads. Your JAVA_HOME is invalid: /usr/lib64/jvm/java-1.8.0-openjdk-1.8.0 ERROR

Invalid JAVA_HOME when build with cordova

时光毁灭记忆、已成空白 提交于 2020-01-13 08:07:03
问题 I am trying to emulate an app on my device with cordova in OpenSuse Leap 42.1. But when I tried to emulate the app with the cordova run I get the error below: cordova run Running command: /home/soufraz/Projects/apps/myproject/platforms/android/cordova/run ERROR: Error: Failed to run "java -version", make sure that you have a JDK installed. You can get it from: http://www.oracle.com/technetwork/java/javase/downloads. Your JAVA_HOME is invalid: /usr/lib64/jvm/java-1.8.0-openjdk-1.8.0 ERROR

Phonegap websocket plugin with android version >4.0.3 not working

烂漫一生 提交于 2020-01-13 06:45:20
问题 I'm currently implementing a cross-plattform mobile app with Phonegap , using HTML5 and Javascript. I decided to use Websockets to establish a connection to our backend server for communication and exchanging data. Websockets are supported by Blackberry and iOs browsers by default. For Android there are some promising plugins to integrate websockets into Android java code and execute it in Phonegap using Javascript. I chose this one: websocket-android-phonegap I integrated that plugin into my

Force iOS app opens external links in safari

╄→гoц情女王★ 提交于 2020-01-13 05:37:30
问题 I have an iOS app that I made using PhoneGap and JQuery mobile. The app has some external links that I want to open in mobile safari but as of now, they just open in the app view. The links are written like this : <a rel="external" href="wwww.example.com">Click Here</a> I read JQuery mobiles docs and it stated that adding rel="external" would solve this but apparently not. Any ideas? Keep in mind, this is a HTML base app. 回答1: Finally was able to do it by navigating to MainviewController.m