phonegap

cordova / phonegap 3.0 device properties

匿名 (未验证) 提交于 2019-12-03 03:03:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am new to phonegap / cordova 3.0 and it seems that I have a similar problem as PhoneGap Help: device properties, cordova v phonegap, xcode debugging . Unfortunately I couldn't find a solution in the internet by now. After having created the Hello World example for ios everything works fine in the simulator. But after having changed the content in the index.html with the code of the example given for device properties in den documentation the screen of the simulator shows only "Loading device properties.." Nothing more. For some reason the

PhoneGap readAsDataURL

匿名 (未验证) 提交于 2019-12-03 02:59:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am writing my first Android app using PhoneGap, but I'm a little confused by the documentation for the FileReader. I need to take an image file and convert it to a Base64 string using the readAsDataURL() method. From their documentation: function win(file) { var reader = new FileReader(); reader.onloadend = function(evt) { console.log("read success"); console.log(evt.target.result); }; reader.readAsDataURL(file); }; var fail = function(evt) { console.log(error.code); }; entry.file(win, fail); I understand pretty much all of that except for

LocalFileSystem is not defined PhoneGap (Build) in Android

匿名 (未验证) 提交于 2019-12-03 02:54:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I have the following code: function wait (){ $ ( document ). ready ( function () { //alert("Dentro de ready"); document . addEventListener ( "deviceready" , init (), true ); }); } Where "wait" is a Javascript function called from the onload event. I use the onload event, as well as $(document).ready and "deviceready" event to make sure every single thing is loaded when i start coding. The "init()" method does a few things and then calls the following method: function download_img ( imgToDownload ){ var url = remote_url +

XCode/PhoneGap - Apple Mach-O Linker Error

匿名 (未验证) 提交于 2019-12-03 02:53:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I just finished programming my application. I tried to archive the App for submission , but it didn't work, the following error was displayed. This problem only happens when I want to archive the app, running on Test device or Simulator works perfect (no errors). Ld /Users/Admin/Library/Developer/Xcode/DerivedData/MyApp-ekptdmvfytpoeoaedgfvjzqudoqa/Build/Intermediates/ArchiveIntermediates/MyApp/InstallationBuildProductsLocation/Applications/MyApp.app/MyApp normal armv7 cd /Users/Admin/Desktop/MyApp3 setenv IPHONEOS_DEPLOYMENT_TARGET 6.1

Directory structure for cross-platform phonegap project

匿名 (未验证) 提交于 2019-12-03 02:50:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: What's a good directory structure for a single source repository that holds both Android and iOS versions of a phonegap project? I'm okay using sym-links since I don't expect any development to happen on PCs. (But if there's a clean way to do it without, I'm all ears, since git and symlinks on PCs are a nightmare.) I've tried this: www/ index.html js/ *.js xpjs-ios/ *.js xpjs-android/ *.js css/ *.css html/ *.html (all other files) android/ (lots of java and config files) android/assets/www/index.html -> www/index.html js -> www/js xpjs ->

Playing video inline in Ionic/Phonegap (webkit-playsinline not working)

匿名 (未验证) 提交于 2019-12-03 02:48:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm using the HTML5 video tag to get a video playing in my ionic app. Here's my code: <video autoplay loop class="video" webkit-playsinline> <source src="videos/polina.mp4" type='video/mp4; codecs="h.264"' > <source src="videos/polina.webm" type="video/webm"> </video> The video autoplays fine, however the video opens up into the native player and doesn't play inline. After some research I came to understand that webkit-playsinline should solve this issue, at least on iOS, but this doesn't seem to be the case for me testing on iOS8&9. I tried

Connect facebook phonegap login with django allauth

匿名 (未验证) 提交于 2019-12-03 02:47:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I'm building up an app that should allow the user to sign up / sign in with Facebook and then he should be able to login (always via Facebook ) to the "main" website To be honest it's a bit more complicated than this. That's because I'm using django-tastypie and django-allauth in the main website to allow sign up, login, and browsing of our API Basically I want to make the mobile app user browse the tastypie API (accessible only if logged and if you're an user in the main website) and grant him the rights to add rows (like orders)

Phone Gap [error] cmd: Command failed with exit code ENOENT

匿名 (未验证) 提交于 2019-12-03 02:45:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am trying to get phone gap to work on android and my command outputs the following: phonegap build android [phonegap] detecting Android SDK environment... [phonegap] using the local environment [phonegap] adding the Android platform... [error] cmd: Command failed with exit code ENOENT When searching this error message I get a lot of hits, but everyone else seems to have much more verbose error messages, when this is all I get. Even with the -d or -v option that is what I get. I am using Windows 7 x64 My PATH variable looks like this: %JAVA

Phonegap Xcode iOS app crashes when status bar is tapped

匿名 (未验证) 提交于 2019-12-03 02:38:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I'm using Xcode 4.3.1 with Phonegap 1.4.1 to build an iPhone app. Whenever I tap the status bar to scroll to top, the app crashes with an EXC_BAD_ACCESS error. I've tried implementing a number of suggestions such as this . I've also tried adding variations of the below code: [[[ theWebView subviews ] objectAtIndex : 0 ] setScrollsToTop : NO ]; (( UIScrollView *)[ theWebView . subviews objectAtIndex : 0 ]). scrollsToTop = NO ; to the - ( void ) webViewDidFinishLoad :( UIWebView *) theWebView { ... } within the AppDelegate.m However,

Phonegap setting wallpaper from www assets? Android

匿名 (未验证) 提交于 2019-12-03 02:35:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm building a phonegap app for Android and need a way to set wallpapers from a .jpg included in the www directory of the app using javascript. How would I go about building a phonegap plugin that works with resources in my phonegap apps www folder? 回答1: just read file from asset folder. with Plugin import java.io.IOException; import org.apache.cordova.api.Plugin; import org.apache.cordova.api.PluginResult; import org.apache.cordova.api.PluginResult.Status; import org.json.JSONArray; import android.app.WallpaperManager; import android