cordova

Force iOS app opens external links in safari

亡梦爱人 提交于 2020-01-13 05:37:12
问题 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

Cordova File Transfer to Node Server

萝らか妹 提交于 2020-01-13 05:00:26
问题 I'm using the ng-Cordova fileTransfer plugin to try to upload a photo from the user's camera roll to a Node/Express server. I'm getting the local URI of a photo and trying to pass it to the plugin as such: $cordovaFileTransfer.upload('http://135.23.98.169:8069/upload_avatar', fileURI) .then(function (result) { console.log('success'); }, function (error) { console.log('what'); }); The server endpoint is reached, but req.files is undefined. What am I doing wrong? 回答1: In Express 4.x, you have

Phonegap/Cordova with Multiple CDVViewController

谁说胖子不能爱 提交于 2020-01-13 03:57:26
问题 my Idea is to use Phonegap for the business logic of my app, but use native transitions. So I need CDVWebView in every UIViewController. This works fine with normal UIWebviews, but if I use multiple CDVViewControllers for e.g. a TabBar, the deviceReady event only fires for the first CDVWebView. Here is what I do in the App Delegate: - (BOOL) application:(UIApplication*)application didFinishLaunchingWithOptions:(NSDictionary*)launchOptions { NSURL* url = [launchOptions objectForKey

deviceready has not fired in phonegap 2.9.0 with sencha touch 2

十年热恋 提交于 2020-01-13 03:40:11
问题 I use PhoneGap 2.9.0 and SenchaTouch to develop my Android application (targetSdkVersion 16). When I start the app in Chrome, I got such logs : Falling back on PROMPT mode since _cordovaNative is missing. Expected for Android 3.2 and lower only. cordova.js:912 deviceready has not fired after 5 seconds. cordova.js:6725 Channel not fired: onCordovaConnectionReady cordova.js:6718 Channel not fired: onCordovaInfoReady cordova.js:6718 When I test it in Samsung tablet (Android 4.1.2), the first

Beep not working when phonegap app is in background on iOS

假如想象 提交于 2020-01-13 03:36:07
问题 I’m working on the iOS version of my phonegap-based navigation app. My app tracks the user’s location around a walk route using GPS and alerts the user using audio (navigator.notification.beep) and tactile (navigator.notification.vibrate) feedback when they reach a location at which there’s new instructions for them to follow. When my app is running in the foreground, both the audible beep and the vibration fire on reaching the geographic location but when the app is paused in the background,

cordova-ionic ngCordova ios or iPhone file read error code 5 ENCODING_ERR

放肆的年华 提交于 2020-01-13 03:12:18
问题 i am using cordova-ionic framework to build app. i am new to the iOS or iPhone in my requirement, i have to read a file in the app. i am reading file in the android app but same code showing error (code: 5). i am following code types: in android: $cordovaFile.writeFile(( 'user.json', data, {'append':false} )).then(function(result) { alert('file created.'); alert(JSON.stringify(result)); }, function(err) { // An error occured. Show a message to the user alert('file writed'); alert(JSON

How do you use the Cordova CLI to add a specific version of the Cordova framework

守給你的承諾、 提交于 2020-01-13 02:50:32
问题 Cordova provides a CLI for instantiating and building a Cordova framework. For example you can type: cordova create ... to create the directory structure for building a Cordova app. You can also type: cordova platform add android cordova plugin add ... cordova build android to add the files for an android project, add plugins and build it. These commands however seem to add the latest version of Cordova itself currently cordova3.4.0. What if you wanted to build with an earlier, post 3.0,

Android + PhoneGap intercept URL (equivalent of iOS shouldStartLoadWithRequest)

て烟熏妆下的殇ゞ 提交于 2020-01-13 02:44:13
问题 My PhoneGap wrapped, locally hosted Sencha Touch app makes some fake URL callbacks to communicate with the native wrapper. (ie. app_callback://do_function_a ). In iOS I implement the following - (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType; Check for the app_callback:// URLs, call a native function and return NO (to stop navigation actually happening). Is there an equivalent in Android I can

cannot uninstall Cordova plugin

不羁的心 提交于 2020-01-13 02:28:22
问题 In my Ionic app, I just uninstalled a Cordova plugin this way : $ cordova plugin remove phonegap-facebook-plugin Uninstalling phonegap-facebook-plugin from android but when I list the plugins it still appears as installed : $ cordova plugins cordova-plugin-googleplayservices 19.0.3 "Google Play Services for Android" cordova-plugin-googleplus 4.0.3 "Google+" cordova-plugin-whitelist 1.1.1-dev "Whitelist" ionic-plugin-keyboard 1.0.7 "Keyboard" phonegap-facebook-plugin 0.12.0 "Facebook Connect"

Phone GAP SessionStorage

时光毁灭记忆、已成空白 提交于 2020-01-12 19:04:44
问题 I working on an iPhone Application using phone GAP.In my app we are using an external DB .User login using web service, i need to store user ID after login .How i store the user ID using phone GAP.can i use phone GAP Session Storage for this?is possible? Any one knows please helps. Thanks, Companion. 回答1: You really don't have the concept of "session" in Phonegap - you have HTML5 localStorage to store persistent data (think "application scope"): var userId = localStorage.getItem("userId"); if