cordova

Phonegap Build with phonegap 3 and media plugin

假如想象 提交于 2020-01-17 01:30:10
问题 I work on an application build with phonegap build and phonegap 3. I want to let the user to play some external audio files with the app. But I should have miss something because the media can't be find and play. Here is my config.xml : <?xml version="1.0" encoding="UTF-8" ?> <widget xmlns = "http://www.w3.org/ns/widgets" xmlns:gap = "http://phonegap.com/ns/1.0" id = "com.phonegap.example" versionCode = "10" version = "1.0.0" > <preference name="phonegap-version" value="3.0.0" /> <!--

Send string to a tcp socket using GapSocket

最后都变了- 提交于 2020-01-17 01:13:11
问题 I am trying to establish a socket connection using GapSocket and send some data (strings) to a tcp socket from an PhoneGap to a computer with port 8888 open. I have included all dependencies: Both asyncsocket.m and asynsocket.h from cocoaasyncsocket Both GapSocketCommand.m and GapSocketCommand.h from GapSocket Included GapSocket.js and referenced the js file from index.html under www folder. Following is my index.html file: <!DOCTYPE html> <html> <head> <title>Socket Test</title> <script type

cordova cant access external scripts, files, images

老子叫甜甜 提交于 2020-01-16 21:57:36
问题 This is driving me nuts. I have two versions of my app, a barebones version and an advanced version. I messed up some modules/plugins in the advanced version so I rebuilt it from scratch in a new directory. Copied all the necessary www/js/img folders to the newly created one. I verified i have installed all the same plugins, modules and packages - I then am able to build the app successfully and run it successfully. However, any reference to external scripts or files are getting a "404 (Not

cordova cant access external scripts, files, images

痞子三分冷 提交于 2020-01-16 21:56:26
问题 This is driving me nuts. I have two versions of my app, a barebones version and an advanced version. I messed up some modules/plugins in the advanced version so I rebuilt it from scratch in a new directory. Copied all the necessary www/js/img folders to the newly created one. I verified i have installed all the same plugins, modules and packages - I then am able to build the app successfully and run it successfully. However, any reference to external scripts or files are getting a "404 (Not

acess token for getting nearby places

本小妞迷上赌 提交于 2020-01-16 19:22:29
问题 I am developing phonegap application and I want to show a list for nearby places using facebook. I understand that I need to get access_token in order to use the graph api, but it seems akward and strange to ask the user login to facebook so I can get list of places that has nothing with you (I am not looking for places the user like/visited). There is another way without asking the user to log-in? 回答1: You can get places with an App Access Token, which does not require the user to log in.

Upload multiple images to the api - phonegap

我的未来我决定 提交于 2020-01-16 19:20:06
问题 Iam in a phonegap project, i have a page with some contents to post to the server. I have posted the textual contents to the server as shown below" $.ajax({ url:"http://xxxx.xxx.xx/mobapp/api/save-data", type:"POST", crossDomain: true, dataType:"json", data: {pliid: document.pliform.pliid.value,idate:document.pliform.date.value, snum:document.pliform.street_no.value, sname:document.pliform.street_name.value,state:document.pliform.state.value, pcode:document.pliform.PostCode.value, suburb

Saving image to SD Card in a Worklight application

隐身守侯 提交于 2020-01-16 19:02:07
问题 I have created a Worklight application and added to it the Android environment. This application has a button to take a photo using the device camera, and an img tag in the HTML which displays the captured photo. I followed this PhoneGap Camera API. Now I am trying to store that image into the SD Card but fail doing so. my EDIT: I changed my code as below: function takeimage() { // Retrieve image file location from specified source navigator.camera.getPicture(getImageURI, function(message) {

Issue with SMS cordova 3.5 plugin for android?

☆樱花仙子☆ 提交于 2020-01-16 18:48:11
问题 I have installed the SMS plugin via CLI, and the installation was done properly. Then I wrote JavaScript code as follows: function sendsms() { alert("click"); var number = $("#numberTxt").val(); var message = $("#messageTxt").val(); var intent = ""; //leave empty for sending sms using default intent var success = function() { alert('Message sent successfully'); }; var error = function(e) { alert('Message Failed:' + e); }; sms.send(number, message, intent, success, error); } HTML code: <input

Cordova / Ionic database(Web SQL) disappears randomly

偶尔善良 提交于 2020-01-16 16:48:09
问题 A Cordova/Ionic app I've built is having a little trouble. The problem is only appearing on one user's phone (out of about 6 different phones) Essentially when randomly using the app, sometimes the user will return to the app to find the database / state is completely blank. I have a function that they can trigger to send me the entire db, and it's as if it just randomly resets itself. There is a single call to reset the database, but it is behind a yes/no prompt so I don't think it's user

I'm trying to send a picture with phonegap on wp8 but I'm getting an error

老子叫甜甜 提交于 2020-01-16 12:04:52
问题 I'm trying to send a picture, taken in my application, to my remote server using javascript and php, but so far I'm stuck: This is the code from my application function onPhotoDataSuccess(imageData) { alert(imageData);// returns:"/CapturedImagesCache/WP_20130605_021.jpg" //send picture to server var options = new FileUploadOptions(); options.fileKey="file"; options.fileName=imageData.substr(imageData.lastIndexOf('/')+1); options.mimeType="image/jpeg"; var params = new Object(); params.value1