Search Results

Search found 64 results on 3 pages for 'cordova'.

Page 1/3 | 1 2 3  | Next Page >

  • Add 1.6.0 Cordova plugin to 2.2.0 Cordova project

    - by BlackFlam3
    How do I add a cordova plugin made on 1.6.0 to a 2.2.0 cordova project for iOS? Upgrade the 1.6.0 project to 1.7.0, then 1.8.0 and so on (doesn't feel right)? Or how do I resolve the current callback signature on the new Cordova(2.2.0) that uses "(CDInvokedURL *)command" as parameter instead of (NSDictionary *)options? More specifically, I am trying to add the Calendar Plugin for iOS to a Cordova 2.2.0 project.

    Read the article

  • window.requestFileSystem fails/events firing multiple times in PhoneGap Cordova 3

    - by ezycheez
    cordova 3.1.0-0.2.0 Droid Razr M Android 4.1.2 Windows 7 New to PhoneGap/Cordova. Running one of the filesystem demos from http://docs.phonegap.com/en/3.1.0/cordova_file_file.md.html#File. Using "cordova run android" to compile the code and run it on the phone attached via USB. Problem #1: When the app first starts I get alert("1") twice and then nothing else. Problem #2: When I kick of the code via the button onclick I get the following alert pattern: 1, 2, 2, 3, 3, 4, 6, 5, 7, 4, 6, 5, 7. Some of that makes sense based on the code flow but most of them are firing twice. I'm suspecting problem #2 is being caused by some asynchronous calls hanging out from the first attempt but no matter how long I wait those events don't fire until I kick of the code via the button. So why is the requestFileSystem call failing even though it is waiting for deviceready and why is the other code getting intermingled? Any thoughts are appreciated. <!DOCTYPE html> <html> <head> <title>FileReader Example</title> <script type="text/javascript" charset="utf-8" src="cordova.js"></script> <script type="text/javascript" charset="utf-8"> // Wait for device API libraries to load // document.addEventListener("deviceready", onDeviceReady, false); // device APIs are available // function onDeviceReady() { alert("1"); window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, gotFS, fail); } function gotFS(fileSystem) { alert("2"); fileSystem.root.getFile("readme.txt", null, gotFileEntry, fail); } function gotFileEntry(fileEntry) { alert("3"); fileEntry.file(gotFile, fail); } function gotFile(file) { alert("4"); readDataUrl(file); alert("5"); readAsText(file); } function readDataUrl(file) { alert("6"); var reader = new FileReader(); reader.onloadend = function (evt) { console.log("Read as data URL"); console.log(evt.target.result); }; reader.readAsDataURL(file); } function readAsText(file) { alert("7"); var reader = new FileReader(); reader.onloadend = function (evt) { console.log("Read as text"); console.log(evt.target.result); }; reader.readAsText(file); } function fail(error) { alert("8"); console.log(error.code); } </script> </head> <body> <h1>Example</h1> <p>Read File</p> <button onclick="onDeviceReady();">Read File</button> </body> </html>

    Read the article

  • Phonegap/Cordova geolocation not working on Android

    - by Kreeki
    I'm having a trouble to get Geolocation working on Android in both emulator (even when I geo fix over telnet) and on device. Works on iOS, WP8 and in the browser. When I ask device for location using the following code, I always get an error (in my case custom Retrieving your position failed for unknown reason. with null both error code and error message). Related code: successHandler = (position) -> resolve App.Location.create lat: position.coords.latitude lng: position.coords.longitude errorHandler = (error) -> error = switch error.code when 1 App.LocationError.create message: 'You haven\'t shared your location.' when 2 App.LocationError.create message: 'Couldn\'t detect your current location.' when 3 App.LocationError.create message: 'Retrieving your position timeouted.' else App.LocationError.create message: 'Retrieving your position failed for unknown reason. Error code: ' + error.code + '. Error message: ' + error.message reject(error) options = maximumAge: Infinity # I also tried with 0 timeout: 60000 enableHighAccuracy: true navigator.geolocation.getCurrentPosition(successHandler, errorHandler, options) platforms/android/AndroidManifest.xml <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> <uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" /> www/config.xml (just in case) <feature name="Geolocation"> <param name="android-package" value="org.apache.cordova.GeoBroker" /> </feature> Using Cordova 3.1.0. Testing on Android 4.2. Plugin installed. Cordova.js included in index.html (other plugins like InAppBrowser are working fine). $ cordova plugins ls [ 'org.apache.cordova.console', 'org.apache.cordova.device', 'org.apache.cordova.dialogs', 'org.apache.cordova.geolocation', 'org.apache.cordova.inappbrowser', 'org.apache.cordova.vibration' ] I'm clueless. Am I missing something?

    Read the article

  • Phonegap Screenshot plugin in Cordova 2.0.0

    - by ObjectiveJ
    I have set up the screenshot plugin from github, located here: https://github.com/phonegap/phonegap-plugins/tree/master/Android/Screenshot I set it up as instructed and with 1.8.1 of cordova. It worked and the screenshot was saved to the phone. However it fails with cordova 2.0.0. Screenshot.java code: https://github.com/phonegap/phonegap-plugins/blob/master/Android/Screenshot/src/org/apache/cordova/Screenshot.java Screenshot.js code: https://github.com/phonegap/phonegap-plugins/blob/master/Android/Screenshot/www/Screenshot.js Due to the advice of a very clever man called Simon MacDonald, I removed line 31 and 38 from the JS file shown above. However when I try to use the screenshot plugin with cordova 2.0.0 I receive these errors: ERROR: org.json.JSONException: Value undefined of type java.lang.String cannot be converted to JSONArray. Error: Status=8 Message=JSON error file:///android_asset/www/cordova-2.0.0.js: Line 938 : Error: Status=8 Message=JSON error Error: Status=8 Message=JSON error at file:///android_asset_/www/cordova-2.0.0.js:938 line 938 of the cordova.js is: // If error, then display error else { console.log("Error: Status="+v.status+" Message="+v.message); but im almost certain this is a compatibility error. Does anyone know a fix for this, or even a reason. Im abit lost. Any help is appreciated. I call the screenshot.js with this code: function takeScreenShot() { cordovaRef.exec("Screenshot.saveScreenshot"); } Any help massively appreciated.

    Read the article

  • Phonegap/Cordova orientation change Android 4

    - by user1477576
    I have a problem changing the orientation of the device (Android 4). In other versions it works fine. Versión of Cordova: cordova-1.8.0.js / cordova-1.8.1.js In Android 4 the app crash or show: "A network error occurred. (file:///android_asset/www/index.html)" I searched a lot about this and no answer solves the problem. In most cases users suggest adding: android:configChanges="orientation|keyboardHidden|screenSize" In other cases: super.setIntegerProperty("loadUrlTimeoutValue",60000); That not work for me :( My manifest activity: <activity android:name=".AppNameActivity" android:label="@string/app_name" android:configChanges="orientation|keyboardHidden|screenSize"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> The application should run on Android 2.2 to 4. Thank you very much for the help.

    Read the article

  • WP7: play MP3 using Media with phonegap/Cordova

    - by Loda
    My problem: I use the Media Class from Cordova. The MP3 file is only played once (the first time). Code: Add this code to the Cordova Starter project to reproduce my problem: var playCounter = 0; function playMP3(){ console.log("playMP3() counter " + playCounter); var my_media = new Media("app/www/test.mp3");//ressource buildAction == content my_media.play(); playCounter++; } [...] <p onclick="playMP3();">Click to Play MP3</p> VS output: [...] GapBrowser_Navigated :: /app/www/index.html 'UI Task' (Managed): Loaded 'System.ServiceModel.Web.dll' 'UI Task' (Managed): Loaded 'System.ServiceModel.dll' Log:"onDeviceReady. You should see this message in Visual Studio's output window." 'UI Task' (Managed): Loaded 'Microsoft.Xna.Framework.dll' Log:"playMP3() counter 0" 'UI Task' (Managed): Loaded 'System.SR.dll' Log:"media on status :: {\"id\": \"fa123123-bc55-a266-f447-8881bd32e2aa\", \"msg\": 1, \"value\": 1}" A first chance exception of type 'System.ArgumentException' occurred in mscorlib.dll Log:"media on status :: {\"id\": \"fa123123-bc55-a266-f447-8881bd32e2aa\", \"msg\": 1, \"value\": 2}" Log:"media on status :: {\"id\": \"fa123123-bc55-a266-f447-8881bd32e2aa\", \"msg\": 2, \"value\": 2.141}" Log:"media on status :: {\"id\": \"fa123123-bc55-a266-f447-8881bd32e2aa\", \"msg\": 1, \"value\": 4}" Log:"playMP3() counter 1" A first chance exception of type 'System.ArgumentException' occurred in mscorlib.dll A first chance exception of type 'System.IO.IOException' occurred in mscorlib.dll A first chance exception of type 'System.IO.IsolatedStorage.IsolatedStorageException' occurred in mscorlib.dll Log:"media on status :: {\"id\": \"2de3388c-bbb6-d896-9e27-660f1402bc2a\", \"msg\": 9, \"value\": 5}" My Config: cordova-1.6.1.js Lumia 800 WP 7.5 (7.10.7740.16) WorkAround (kind of): Desactivate the app (turn off the screen) reactivate the app (turn on the screen) - you get one more shot. Any help is welcome as I am blocked on this since may days and I found no usefull information anywhere. Also, Can you tell me if this code work on your config ? . . . Update: add a demo code using a global var. Keeping the instance alive. result The test2.mp3 is played and can replay fine. the test.mp3 is not played at all. It is the first file you play that will work. Code function onDeviceReady() { document.getElementById("welcomeMsg").innerHTML += "Cordova is ready! version=" + window.device.cordova; console.log("onDeviceReady. You should see this message in Visual Studio's output window."); my_media = new Media("app/www/test.mp3");//ressource buildAction == content my_media2 = new Media("app/www/test2.mp3");//ressource buildAction == content } var playCounter = 0; var my_media = null; function playMP3(){ console.log("playMP3() counter " + playCounter); my_media.play(); playCounter++; } var my_media2 = null; function playMP32(){ console.log("playMP32() counter " + playCounter); my_media2.play(); playCounter++; } </script> [...] <p onclick="playMP3();">Click to Play MP3</p> <p onclick="playMP32();">Click to Play MP3 2</p> VS output: Log:"onDeviceReady. You should see this message in Visual Studio's output window." INFO: startPlayingAudio could not find mediaPlayer for 71888b14-86fe-4769-95c9-a9bb05d5555b Log:"playMP32() counter 0" INFO: startPlayingAudio could not find mediaPlayer for 71888b14-86fe-4769-95c9-a9bb05d5555b Log:"playMP32() counter 1" Log:"playMP3() counter 2" INFO: startPlayingAudio could not find mediaPlayer for b60fa266-d105-a295-a5be-fa2c6b824bc1 A first chance exception of type 'System.ArgumentException' occurred in System.Windows.dll Error: El parámetro es incorrecto. Log:"playMP32() counter 3" INFO: startPlayingAudio could not find mediaPlayer for 71888b14-86fe-4769-95c9-a9bb05d5555b Can anybody reproduce this ? link to bug report: https://issues.apache.org/jira/browse/CB-941

    Read the article

  • PhoneGap 1.5 (Cordova) + ChildBrowser Whitelist Issue

    - by dSquared
    I am creating an app using PhoneGap 1.5 (Cordova) and the ChildBrowser Plugin (newest version with naming for PG 1.5 / Cordova.) I use the ChildBrowser plugin to display webpages, PDFs etc. in the app. In previous versions of PG the Whitelist wasn't as restrictive and would load external resources (css/js etc.) located on remote servers / CDNs called from webpages displayed in the ChildBrowser as long as the main URL was Whitelisted. This appears to have changed and I cannot find a way around it. Is there a way to allow all URLs to be whitelisted as long as they are loaded through an already whitelisted URL, or is whitelisting every single possible URL the only way? Any help would be greatly appreciated!

    Read the article

  • Phonegap (Cordova) iOS button click

    - by JNM
    I am trying to create a very simple phone gap application for iOS. I am using query mobile. the problem is, that i can't get javascript event to fire on button click. Code i have now: <!DOCTYPE html> <html> <head> <title>Title</title> <meta name="viewport" content="width=device-width, minimum-scale=1, maximum-scale=1"> <meta charset="utf-8"> <link rel="stylesheet" type="text/css" href="js/jquery.mobile-1.2.0.css" /> <script type="text/javascript" charset="utf-8" src="cordova-1.8.1.js"></script> <script type="text/javascript" charset="utf-8" src="js/jquery-1.8.2.min.js"></script> <script type="text/javascript" charset="utf-8" src="js/jquery.mobile-1.2.0.min.js"></script> <script type="text/javascript"> document.addEventListener("deviceready", onDeviceReady, false); function onDeviceReady() { } function showAlert() { navigator.notification.alert("Cordova is working"); } </script> </head> <body> <div data-role="page" id="options" data-add-back-btn="true" data-back-btn-text="Atgal"> <div data-role="header" data-position="fixed"> <h1>Title</h1> </div> <div data-role="content"> <h1>Alert</h1> <p><a href="#" onclick="showAlert(); return false;" data-role="button">Show alert</a></p> </div> </div> </body> </html> I tried multiple solutions to fix my problem, but none of them works. When have button with # in href, it doesn't event change the color on click. When i add url, it changes color. But it never call javascript function. Another problem is, that document.addEventListener("deviceready", onDeviceReady, false); works only in the index page. If i press button in initial page which redirects to another page, OnDeviceReady function is never called. Anybody has any ideas?

    Read the article

  • cordova :: XMLHttpRequest :: setRequestHeader does not work with JSONP

    - by Aaron Saunders
    in hello world cordova 2.3.0 app trying to work with ripple added basic BackboneJS code and I get error shown above <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script> <script type="text/javascript" src="http://static.stackmob.com/js/json2-min.js"></script> <script type="text/javascript" src="http://static.stackmob.com/js/underscore-1.4.3-min.js"></script> <script type="text/javascript" src="http://static.stackmob.com/js/backbone-0.9.10-min.js"></script> I have started google with the proper flags --allow-file-access-from-files

    Read the article

  • cordova 2.0.0 download file Android

    - by N0rA
    I tried to use cordova 2.0.0 API FileTransfer().download() and i got 2 consecutive errors 1) download error source file 2) download error target file here is my code... function downloadMaterial() { var fileTransfer = new FileTransfer(); var serverURL = 'http://img.youm7.com/images/NewsPics/large/S2200921125437.jpg'; var uri = encodeURI(serverURL); var filePath = persistent_root.fullPath+"/" + fileName; //filePath = file:///data/data/com.example.studyapp/S2200921125437.jpg var onSuccess = function (entry) { console.log("download complete: " + entry.fullPath); }; var onError = function (error) { console.log("download error source " + error.source); console.log("download error target " + error.target); console.log("upload error code " + error.code); }; fileTransfer.download(uri, filePath , onSuccess, onError); } Do you have any idea what should I do? Thanks in advance ...

    Read the article

  • Cordova - Scrolling with a fixed header and footer (ios)

    - by Samu Singh
    Using Cordova (phonegap) & bootstrap to make a mobile application, testing on IOS for now. Getting an issue with a header and footer bar that are fixed with scrollable content in the middle. When tapping to scroll, the header/footer bar moves down or up with the content but then snaps back to place as soon as the scrolling completes. If I use -webkit-overflow-scrolling: touch; it works as expected, but it makes it really awkward to scroll through the content, and if you scroll passed the end, it only scrolls the header or footer (with elastic overflow) until you stop for a second. here's my html for the header/footer bars: <div id="headerBar"> <div class="container-fluid" style="background-color: #1569C7"> <div class="row"> <div class="col-xs-3 text-left"> <button id="logoutButton" type="button" class="btn btn-default"> Log Out </button> <button type="button" class="btn btn-default" id="restoreQuestionFeedButton"> <span class="glyphicon glyphicon-chevron-left"></span> </button> </div> <div class="col-xs-6 text-center" style="height: 55px"> <strong id="usernameText"></strong> </div> <div class="col-xs-3 text-right"> <button id="oldCreatQuestionButton" type="button" class="btn btn-default"> <span class="glyphicon glyphicon-plus"></span> </button> </div> </div> </div> </div> <div id="footerBar"> <div class="container-fluid" style="padding: 0"> <div class="row text-center"> <button id="createQuestionButton" type="button" class="btn btn-default footerButton"> <span class="glyphicon glyphicon-plus"></span> <strong>Ask a new free question!</strong> </button> </div> </div> </div> And here is the related CSS: #headerBar { position: fixed; z-index: 100; top: 0; left: 0; width: 100%; background-color: #1569C7; } #footerBar { position: fixed; z-index: 100; bottom: 0; left: 0; width: 100%; background-color: #1569C7 !important; }

    Read the article

  • PhoneGap/Cordova. childBrowser plugin giving starnge URL (iOS)

    - by MeltingDog
    I am having a great deal of difficulty getting the childBrowser plugin to work Currently when I click my link it does nothing on my iOS simulator and when I click it using a browser I get a Web Page Not Found error with the web address looking something like: file://myapp/www/%C3%A2%E2%82%AC%C2%9D#??????? I am really stuck for ideas on whats going on and what is causing this, any advice would be greatly appreciated. My code is: <script type="text/javascript" charset="utf-8" src="js/ChildBrowser.js"></script> <script> function onDeviceReady() { childbrowser = ChildBrowser.install(); var root = this; cb = window.plugins.childBrowser; if(cb != null) { cb.onLocationChange = function(loc){ root.locChanged(loc); }; cb.onClose = function(){root.onCloseBrowser(); }; cb.onOpenExternal = function(){root.onOpenExternal(); }; //cb.showWebPage(“http://google.com”); } } function onCloseBrowser() { console.log(“onCloseBrowser!”); } function locChanged(loc) { console.log(“locChanged!”); } function onOpenExternal() { alert(“onOpenExternal!”); } <body onLoad=”onBodyLoad()”> <a href=”#” onclick=’cb.showWebPage(“http://www.google.com”);’>Click Me</a>

    Read the article

  • Apache Cordova (Phonegap): is jsop needed for cross-site scripting?

    - by DEX
    I've just started using Apache Cordova. I have an library that makes calls (via ajax) to a soap server. When I run these on my local machine in chrome, I get cross site scripting errors when trying to make calls to the service. When I run the same exact code using the Cordova browser in the iOS emulator, the scripts seem to hit the server fine and the response data is received properly. So my question is how is the Cordova browser able to make these requests without cross-site scripting permissions & JSONP ? One thing I noticed is that when the request is sent from iOS, there is no "Origin" header. Is this allowing the Cordova browser to stealthily circumvent cross-site scripting requirements? Is it possible that the node.js server on the device (I believe this is how Cordova works) is manipulating the headers to allow this? I'd like to avoid enabling cross-site scripting on my site so I think this "feature" is nice, but I'm wondering if it's a security hole as well. Anyone have experience with this?

    Read the article

  • How to make Web Storage persistent in Cordova using JS?

    - by ett
    I have a small quiz app, which is a cross-platform mobile app, that I plan for it to run on Android, iOS, and WP8. I want to store a local highscore, where it will keep track how many points the user had, and if he/she does better than the already stored highscore, update the current highscore. Though, I want the highscore to be persistent, what I mean is, every time the user opens the app I want the last highscore to be present and it to be compared with the new quiz score. Meaning, I don't want the highscore to be deleted after each time the app is closed. I also want for the first time when the app is ran, the highscore to be set to 0, so obviously the first time the user finishes the quiz gets a new highscore. I have those codes so far: scoredb.js // Wait for device API libraries to load document.addEventListener("deviceready", initScoreDB, false); // Device APIs are available function initScoreDB() { window.localStorage.setItem("score", 0); highscore = window.localStorage.getItem("score"); } main.js var correct = 0; var highscore; // In between I have some code that keeps incrementing // correct variable for each correct answer. if (correct > highscore) { window.localStorage.setItem("score", correct); highscore = correct; } It does seem to work okay once the app is started. I did the quiz three times, in the simulator, and it keeps the score as it should. Though, each time I open the app, highscore is reseted to 0. I guess it is due to the fact that I call initScoreDB when the device is ready, and I initialize the score to 0 there and give that value to highscore. Can someone help me to initialize the score to 0 only when the app is ran for the first time, and all the other times to keep the latest highscore as the current highscore and compare it each time with the score that is achieved when the quiz is finished. If someone can help me, I would be glad.

    Read the article

  • "loading" div automatically appended when using cordova (phonegap)

    - by Vlad Ioffe
    I am using cordova for mobile app development on android platform. I have this html code in www/index.html file: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-Language" content="en" /> <script src="cordova-2.2.0.js" type="text/javascript"></script> <script src="jquery/jquery.js" type="text/javascript"></script> <script src="jquery.mobile/jquery.mobile-1.1.0.js" type="text/javascript"></script> <script src="JS/main.js" type="text/javascript"></script> <link rel="stylesheet" href="CSS/main.css"/> </head> <body id="body" class="body"> <div id="box" class="bodyBlack"> </div> </body> </html> I don't know why but when I am running this app (also when just opening on pc browser) i am having this div appended at the bottom of the page: <div ui-loader ui-corner-all ui-body-a ui-loader-default> <span ui-loader ui-corner-all ui-body-a ui-loader-default></span> <h1>loading</h1> Why and from where dose it getting from? how I am preventing it to do so? Thanks!!!

    Read the article

  • Cordova polluted logs with persistent.js add()

    - by slaver113
    I am using the latest phonegap/cordova version 2.1. and my log in Eclipse logcat get polluted with code when i do var allItems = Item.all(); allItems.list(null, function (results) { results.forEach(function (r) { console.log(r.id+ " " + r.lat + " " + r.long + " " + r.state); }); }); I get a output like (for 100s of lines) 10-29 10:56:13.270: I/Web Console(5961): } function (value) { 10-29 10:56:13.270: I/Web Console(5961): if (value === undefined) { 10-29 10:56:13.270: I/Web Console(5961): return getterCallback(); 10-29 10:56:13.270: I/Web Console(5961): } else { 10-29 10:56:13.270: I/Web Console(5961): setterCallback(value); 10-29 10:56:13.270: I/Web Console(5961): return scope; 10-29 10:56:13.270: I/Web Console(5961): } 10-29 10:56:13.270: I/Web Console(5961): } function (value) { 10-29 10:56:13.270: I/Web Console(5961): if (value === undefined) { 10-29 10:56:13.270: I/Web Console(5961): return getterCallback(); 10-29 10:56:13.270: I/Web Console(5961): } else { 10-29 10:56:13.270: I/Web Console(5961): setterCallback(value); 10-29 10:56:13.270: I/Web Console(5961): return scope; 10-29 10:56:13.270: I/Web Console(5961): } 10-29 10:56:13.270: I/Web Console(5961): } function (value) { 10-29 10:56:13.270: I/Web Console(5961): if (value === undefined) { 10-29 10:56:13.270: I/Web Console(5961): return getterCallback(); 10-29 10:56:13.270: I/Web Console(5961): } else { 10-29 10:56:13.270: I/Web Console(5961): setterCallback(value); 10-29 10:56:13.270: I/Web Console(5961): return scope; 10-29 10:56:13.270: I/Web Console(5961): } 10-29 10:56:13.270: I/Web Console(5961): } at :1149822901

    Read the article

  • xcode 5.1: libCordova.a architecture problems

    - by inorganik
    Yesterday (3/10/14) when iOS 7.1 was released I also upgraded to Xcode 5.1 and found that my PhoneGap/Cordova project would no longer compile to my iPhone 5s. I also upgraded Cordova to the most recent release: v 3.4.0-0.1.3. I have read many different solutions on SO that relate so changing active architectures and building only active architectures, and none of them work. So here's what I've tried and the errors I get. Initially I got the error: missing required architecture arm64 in file <long file path omitted> libCordova.a Undefined symbols for architecture arm64 So I tried the following. I selected the CordovaLib sub-project in my project, and in both the project and target, I went to Build Settings under Architectures and made sure that arm64 was not included in any of the Debug or Release architectures. At this time Build Active Architecture Only is set to "Yes". That resulted in the following error: file was built for archive which is not the architecture being linked (armv7): <long file path omitted> libCordova.a Undefined symbols for architecture armv7 Setting Build Active Architecture Only to "No", the error again becomes: missing required architecture arm64 in file <long file path omitted> libCordova.a Undefined symbols for architecture arm64 I'm not sure what else to try. The project's architecture settings only includes the key "Base SDK" which is set to iOS 7.1. The project's target does not have architectures settings. Anyway I'm fairly certain the problem lies with the embedded CordovaLib sub-project. What can I do to make this thing compile to my device successfully? Update: same issue on Apache's Jira: https://issues.apache.org/jira/browse/CB-6223

    Read the article

  • Phonegap bluetooth plugin not working

    - by user2907333
    First time poster here , so I'm sorry if this question is asked incorrect or if there are any issues. I'm working on a phonegap app for which I need to be able to set up a bluetooth connection between a tablet (android in this case) and a Win CE PC. Currently i'm trying to get the bluetooth part to work on the tablet and i'm using the plug in you can find at https://github.com/tanelih/phonegap-bluetooth-plugin And for the momemt I'm just trying to enable and disable the Bluetooth on the device. In my bluetoothpage.js file i'm using the following method window.bluetooth.prototype.enable(bluetoothTestSucces(),bluetoothTestFail()); The bluetoothTestSucces and bluetoothTestFail functions just show an alert, nothing else. And if i understand the working of phonegap plugins correctly this uses the following code in my bluetooth.js file Bluetooth.prototype.enable = function(onSuccess, onError) { exec(onSuccess, onError, "Bluetooth", "enable", []); } which calls private void enable(JSONArray args, CallbackContext callbackCtx) { try { _bluetooth.enable(); callbackCtx.success(); } catch(Exception e) { this.error(callbackCtx, e.getMessage(), BluetoothError.ERR_UNKNOWN); } } in my BluetoothPlugin.java file. And if the java file returns Succes bluetoothTestSucces() is used and if the java file returns an error bluetoothTestFail() is used. But for some reason it runs both and does not turn on bluetooth on my device. I'm almost certain I've forgotten a link to a file or have linked it wrong somewhere. But I've followed the instructions that were included in the plugin. I've included the Bluetooth permission in my AndoridManifest file which is located in the root directory of my app I've included the plugin in my config.xml file which is located in res/xml I've required the plugin after the deviceready event as follows document.addEventListener("deviceready", onDeviceReady, false); function onDeviceReady() { window.bluetooth = cordova.require("cordova/plugin/bluetooth"); } Could anyone tell me how to fix this or what i've done wrong? thanks Martijn PS: I'm sorry for any language errors, English isn't my native language. edit: forgot to include some code

    Read the article

  • PhoneGap + JqueryMobile on Xcode

    - by aeternus828
    Attempting a beginner's tutorial. I have the following in my head: <script type="text/javascript" charset="utf-8" src="cordova-1.5.0.js"></script> <linkrel="stylesheet"href="http://code.jquery.com/mobile/1.0.1/jquery.mobile1.0.1.min.css" /> <script src="http://code.jquery.com/jquery-1.7.1.min.js"></script> <script src="http://code.jquery.com/mobile/1.0.1/jquery.mobile-1.0.1.min.js"></script> My result is just text, no Jquery mobile styling.

    Read the article

  • Phonegap: Slow response with vibrate notification

    - by jjei
    I created a simple android application with jquery and phonegap. When testing the app with phone, I noticed that vibration effect, that I have used to indicate that user touches a button, comes after a delay of maybe 0,5 seconds. This is way too long delay and just confuses the user. Is this just the downside of using phonegap? Or is there any configuration or additional frameworks which could be used to make the app response and produce the vibration more quickly? I installed the vibration plugin like this: phonegap local plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-vibration.git I use the code below to create the vibration effect. navigator.notification.vibrate(200); My phone gap version is 3.0.0-0.14.3

    Read the article

  • Dynamically add new HTML elements on page load after getting JSON data from Web API

    - by Luis D Urraca
    I'm building an hybrid Android App using Phonegap/Apache Cordova. My app should get data from my web api. I'm using JSON to serve the data to the APP. So i got a the following code: function init() { document.addEventListener('deviceready', onDeviceReady, false); var url = "http://23.21.128.153:3000/regions.json";var jsonresults; $.getJSON(url,function(data){ jsonresults = data; $.each(jsonresults, function(i,v){ $('#main-content').append('<li>'+jsonresults[i].name+'</li>'); }); }); } and also on the body of the html i have a div called main-content. Everythings works fine in the Eclipse browser, but on the Android Emulator is not working. Not sure if there's another way to pull data from Web API using JSON and dinamically create HMTL elements after getting the data. https://gist.github.com/2956660

    Read the article

  • Phonegap jqm mixing local and server html files

    - by DavidVdd
    I would like to add some online pages to an application keep them up to date without releasing a new store version. For this I taught I could use jqm ajax navigation to load the external page. (I'm aware that might not be allowed for all platforms.) I have set: $.mobile.allowCrossDomainPages = true; $.mobile.pushStateEnabled = false; This seems to work but the problem is that all my href's and $.mobile.ChangePages would have to be changed to <a href='http://mydomain.com/mypage.html'>link</a> $.mobile.changePage('http://mydomain.com/mypage.html'); in stead of <a href='mypage.html'>link</a> $.mobile.changePage('http://mydomain.com/mypage.html'); I was thinking about overriding the changepage method(found this somewhere) to add a domain when the user is online, but the problem is that this method get's called more then once. var originalChangePage = $.mobile.changePage; $.mobile.changePage = function(to, options) { var o = JSON.stringify(o); try { to = to.replace('file:///android_asset/www/', 'http://mydomain.com/'); } catch (err) { //to isn't always filled in. } originalChangePage(to, options); }; Is there a better way to load html pages locally and online using jqm ajax navigation? Extra info: Phonegap/Cordova version 3.5.0 jqm 1.3.2

    Read the article

  • CSS3 Transitions in PhoneGap: Div Width issues

    - by MeltingDog
    I am building a PhoneGap/Cordova app and have a simple code that uses http://ricostacruz.com/jquery.transit/ to display a div when another div is clicked. <style> #hiddendiv { top: -2000px; position:absolute; } </style> <script> $('#clickme').click( function() { //SHOW DIV $('#hiddendiv').transition({ y: '2100px' }); }); </script> <!--HTML--> <div id="hiddendiv"> Lorem Ipsum blah blah blah Loooong piece of text </div> <div id="clickme"> Click Me </div> And it works fine. The issue is that I cannot scroll on my device once the #hiddendiv is displayed. I this is partly because the page is only about 500px height (not actually set anywhere) whilst the #hiddendiv is about 1500px height Does anyone know of a work around for this?

    Read the article

  • jQuery line 67 saying "TypeError: 'undefined' is not a function."

    - by dfdf
    var dbShell; function doLog(s){ /* setTimeout(function(){ console.log(s); }, 3000); */ } function dbErrorHandler(err){ alert("DB Error: "+err.message + "\nCode="+err.code); } function phoneReady(){ doLog("phoneReady"); //First, open our db dbShell = window.openDatabase("SimpleNotes", 2, "SimpleNotes", 1000000); doLog("db was opened"); //run transaction to create initial tables dbShell.transaction(setupTable,dbErrorHandler,getEntries); doLog("ran setup"); } //I just create our initial table - all one of em function setupTable(tx){ doLog("before execute sql..."); tx.executeSql("CREATE TABLE IF NOT EXISTS notes(id INTEGER PRIMARY KEY,title,body,updated)"); doLog("after execute sql..."); } //I handle getting entries from the db function getEntries() { //doLog("get entries"); dbShell.transaction(function(tx) { tx.executeSql("select id, title, body, updated from notes order by updated desc",[],renderEntries,dbErrorHandler); }, dbErrorHandler); } function renderEntries(tx,results){ doLog("render entries"); if (results.rows.length == 0) { $("#mainContent").html("<p>You currently do not have any notes.</p>"); } else { var s = ""; for(var i=0; i<results.rows.length; i++) { s += "<li><a href='edit.html?id="+results.rows.item(i).id + "'>" + results.rows.item(i).title + "</a></li>"; } $("#noteTitleList").html(s); $("#noteTitleList").listview("refresh"); } } function saveNote(note, cb) { //Sometimes you may want to jot down something quickly.... if(note.title == "") note.title = "[No Title]"; dbShell.transaction(function(tx) { if(note.id == "") tx.executeSql("insert into notes(title,body,updated) values(?,?,?)",[note.title,note.body, new Date()]); else tx.executeSql("update notes set title=?, body=?, updated=? where id=?",[note.title,note.body, new Date(), note.id]); }, dbErrorHandler,cb); } function init(){ document.addEventListener("deviceready", phoneReady, false); //handle form submission of a new/old note $("#editNoteForm").live("submit",function(e) { var data = {title:$("#noteTitle").val(), body:$("#noteBody").val(), id:$("#noteId").val() }; saveNote(data,function() { $.mobile.changePage("index.html",{reverse:true}); }); e.preventDefault(); }); //will run after initial show - handles regetting the list $("#homePage").live("pageshow", function() { getEntries(); }); //edit page logic needs to know to get old record (possible) $("#editPage").live("pageshow", function() { var loc = $(this).data("url"); if(loc.indexOf("?") >= 0) { var qs = loc.substr(loc.indexOf("?")+1,loc.length); var noteId = qs.split("=")[1]; //load the values $("#editFormSubmitButton").attr("disabled","disabled"); dbShell.transaction( function(tx) { tx.executeSql("select id,title,body from notes where id=?",[noteId],function(tx,results) { $("#noteId").val(results.rows.item(0).id); $("#noteTitle").val(results.rows.item(0).title); $("#noteBody").val(results.rows.item(0).body); $("#editFormSubmitButton").removeAttr("disabled"); }); }, dbErrorHandler); } else { $("#editFormSubmitButton").removeAttr("disabled"); } }); } Dats my code, awfully long, huh? Well anyways I got most of it from here, however I get an error on line 67 saying "TypeError: 'undefined' is not a function.". I'm using Steroids (phonegap-like) and testing dis on an iPhone simulator. I'm sure it uses some cordova for the database work. Thank you for your help :-)

    Read the article

  • OTA plist app install from within phonegap app for iPad

    - by Farhan Ahmad
    I am trying to initiate a OTA app install from within a phonegap iPad app. I have tried this: var url = "http://www.example.com/test.plist"; window.open("itms-services://?action=download-manifest&url=" + url, "_blank"); This works in iOS 5 but NOT iOS 6. I have also tried using the ChildBrowser plugin to point to a page with a link to the OTA app install but that doesn't work either. (If I visit the webpage directly from within the native iPad browser, it works fine) Does anyone know how I can initiate a OTA app install from within the phonegap iPad app? (must work in iOS 5 and iOS 6) I am trying to implement an auto update feature within a Ad-Hock iPad app (not through App Store). So when the app detects that there is a new update, it will prompt the user to install the new update and thats where I need this functionality.

    Read the article

1 2 3  | Next Page >