- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi all,
I developed an Intel XDK app which need connection to the internet (WIFI or using mobile data) for transferring file, I added the device plugin and file transfer. But when I tested the app it works fine in some mobiles, but didn't work on Samsung node4 ,iPhone 6plus and iPhone 4s(get An error has occurred code 3). when I opened the properties of the app and find what the app can access, I find it can access the camera and the photo but didn't access the WIFI or mobile data.
Although it is working fine and can access internet on other mobiles. I don't know what is the problem.
Can anyone help me please.
- Tags:
- HTML5
- Intel® XDK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Content-Security-Policy or any whitelist settings should be checked for all external urls your app uses. Some phone versions enforces these settings and some don't.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I recommend contacting the developer of the plugins in question that you are having problems with via their github pages or web sites. They will be able to fully answer or resolve your issue with the functionality that you are trying to access via their plugins.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
thanks, I send mail for the developer of the plugins. I hope they can help
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I send them E-mail, but no reply
this is my code
var pictureSource; var destinationType; document.addEventListener("deviceready", onDeviceReady, false); function onDeviceReady() { pictureSource = navigator.camera.PictureSourceType; destinationType = navigator.camera.DestinationType; } function onPhotoDataSuccess(imageURI) { console.log(imageURI); var cameraImage = document.getElementById('image'); cameraImage.style.display = 'block'; cameraImage.style.width = '95%'; cameraImage.src = imageURI; } function onPhotoURISuccess(imageURI) { console.log(imageURI); var galleryImage = document.getElementById('image'); galleryImage.style.display = 'block'; galleryImage.style.width = '95%'; galleryImage.src = imageURI; } function capturePhoto() { navigator.camera.getPicture(onPhotoDataSuccess, onFail, { quality: 30, targetWidth: 600, targetHeight: 600, destinationType: destinationType.FILE_URI, saveToPhotoAlbum: true }); } function getPhoto(source) { navigator.camera.getPicture(onPhotoURISuccess, onFail, { quality: 80, targetWidth: 600, targetHeight: 600, destinationType: destinationType.FILE_URI, sourceType: source }); } function onFail(message) { //alert('Failed because: ' + message); } function upload() { var img = document.getElementById('image'); var imageURI = img.src; var params = "server URL/webservice.asmx/SaveImage"; var options = new FileUploadOptions(); options.fileKey = "file"; options.fileName = imageURI.substr(imageURI.lastIndexOf('/') + 1); options.mimeType = "image/jpeg"; options.chunkedMode = false; options.httpMethod = "POST"; options.headers = { Connection: "close" }; var ft = new FileTransfer(); ft.upload(imageURI, params, 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); }
this works fine in all android systems, but doesn't work in some IPhone devices like: Iphone6 plus, IPhone 4s(the app can't access WIFI or Mobile data)
can anyone tell me why?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Content-Security-Policy or any whitelist settings should be checked for all external urls your app uses. Some phone versions enforces these settings and some don't.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks a lot SithLord, this solved my problem. I tested it before publishing on Apple store, then I published on the store and it is working fine.
Really many thanks to you.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page