Click here to Skip to main content
15,905,776 members

Comments by c.chirag (Top 4 by date)

c.chirag 14-Jul-15 2:06am View    
Means setup file need to install on the server or i just copy pest .dll file on the server.
c.chirag 15-Jan-15 0:26am View    
Thanks for your reply...

but my question is i create a mobile application based website and create a apk file for that. All the functionality work properly but now i want to use cordova feature like upload and download file, camera and the other feature provide by Cordova.

So my existing .aspx page can use cordova feature or not...
c.chirag 29-Nov-14 2:25am View    
sorry for that but right now i m in stuck
c.chirag 28-Nov-14 6:46am View    
My question is i have apk file but the page is aspx page. it's work fine in Mobile's browser but when i use this apk file it's not working... i am using phonegap script as given below :

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Upload File</title>
<%--<script type="text/javascript" charset="utf-8" src="cordova-1.5.0.js"></script>--%>
<script src="cordova-1.5.0.js" type="text/javascript" charset="utf-8"></script>

<script type="text/javascript" charset="utf-8">

// Wait for PhoneGap to load
//
document.addEventListener("deviceready", onDeviceReady, false);

// PhoneGap is ready
//
function onDeviceReady() {
//alert("Function call");
// Retrieve image file location from specified source
navigator.camera.getPicture(uploadPhoto,
function (message) { alert('get picture failed'); },
{ quality: 50,
destinationType: navigator.camera.DestinationType.FILE_URI,
sourceType: navigator.camera.PictureSourceType.PHOTOLIBRARY
}
);

}

function uploadPhoto(imageURI) {
var options = new FileUploadOptions();
options.fileKey = "file";
options.fileName = imageURI.substr(imageURI.lastIndexOf('/') + 1);
options.mimeType = "image/jpeg";

var params = new Object();
params.value1 = "test";
params.value2 = "param";

options.params = params;

var ft = new FileTransfer();
ft.upload(imageURI, "http://some.server.com/upload.php", win, fail, options);

}

function win(r) {
console.log("Code = " + r.responseCode);
console.log("Response = " + r.response);
console.log("Sent = " + r.bytesSent);
}

function fail(error) {
alert("An error has occurred: Code = " = error.code);
console.log("upload error source " + error.source);
console.log("upload error target " + error.target);
}

</script>

</head>
<body >
<form id="form1" runat="server">
<div>

Example

<p>Upload File</p>
<br />
<br />
<asp:Button ID="BtnUpload" Text="UploadFile" runat="server" OnClientClick="onDeviceReady()" />
</div>
</form>
</body>
</html>