Tag: phonegap插件

未find插件,或者不是CDVPlugin。 在config.xml中检查你的插件映射

我已经在plugin.xml中声明了我的插件文件,如下所示: <config-file target="config.xml" parent="/*"> <feature name="CDVOP"> <param name="ios-package" value="CDVOP"/> </feature> </config-file> <header-file src="src/ios/CDVOP.h" /> <source-file src="src/ios/CDVOP.m" /> 在插件JavaScript文件中,我有这个function,我稍后从JavaScript应用程序调用 showCatPictures: function(interval) { exec(null, null, 'CDVOP', 'showCatPictures', [interval]); }, 我正在运行从xcode使用这个插件的应用程序来查看debugging输出。 我在调用showCatPictures函数时得到这个: OP Cordova Tests[1122:60b] ERROR: Plugin 'CDVOP' not found, or is not a CDVPlugin. Check your plugin mapping in config.xml. 2014-02-14 16:23:45.233 OP Cordova Tests[1122:60b] -[CDVCommandQueue executePending] […]

Phonegap的本地通知

我想在我的iOS Phonegap应用程序中有一个本地通知。 我遵循了很多教程和代码,但没有帮助。 任何人都可以请指导我。

在Ionic中接收URL

我正在使用ionic framework。 我试图设置一种方法来接收来自另一个应用程序的url。 就像,你在浏览器中,点击共享,并发送链接到另一个应用程序(我的应用程序)。 我find了这个cordova插件,并将其集成到我的应用程序中。 但是这是Android的 pulgin。 我需要IOS中的相同function。 任何想法哪个插件我需要用于ios Android为我采取的步骤 1)cordova插件添加git://github.com/Initsogar/cordova-webintent.git 2)检查config.xml文件并findwebintent的代码 <intent-filter> <action android:name="android.intent.action.SEND" /> <category android:name="android.intent.category.DEFAULT" /> <data android:mimeType="text/plain" /> </intent-filter> 和app.js代码 if (window.plugins && window.plugins.webintent) { window.plugins.webintent.getUri(function(url) { alert("getUri url:"+url); }); } 任何build议在function上相同的ios? 谢谢

Phonegap生成iOS camera.getPicture()质量参数不起作用

我写了一个Phonegap应用程序,并使用Build服务编译它。 我的应用程序在这段代码中调用相机: 函数capturePhoto(){ // Take picture using device camera and retrieve image navigator.camera.getPicture(onPhotoDataSuccess, onFail, { quality: 20, destinationType: destinationType.FILE_URI }); } 生成的图像通过ajax上传到服务器。 当我查看上传的图像时,一些到达的质量适当降低,但有些到达的文件大小为4 MB。 我已经意识到,在iPhone 4和5上运行我的应用程序的用户(我还没有testing人员,还有6个)一直在上传大图片。 我将质量降低到了10和5. Android提交的图像的图像大小被适当地减小了,但IOS图像仍然很大。 任何人都可以告诉我,如果有一个已知的问题在这里? API Docs说,你不能减less从画廊或相机卷select的图像质量 – 但这些不是。 他们从相机加载。

如何在android或ios中使用phonegapredirect到GPS设置窗口打开或closuresGPS

我想在Phonegap中实现Native android等function,当用户想要通过button点击时启用gps,它将被redirect到android或IOS的设置部分,以便用户可以在GPSbutton上因为编程我们不能直接在设备上的GPS或closuresGPS我们只能redirect用户设置,所以如何redirect到设置Android和IOS的phonegap 我想实现下面的function在phonegap任何人都可以帮助我。 /** * Function to check if best network provider * @return boolean * */ public boolean canGetLocation() { return this.canGetLocation; } /** * Function to show settings alert dialog * */ public void showSettingsAlert(){ AlertDialog.Builder alertDialog = new AlertDialog.Builder(mContext); // Setting Dialog Title alertDialog.setTitle("GPS is settings"); // Setting Dialog Message alertDialog.setMessage("GPS is […]

Cordova / Phonegap获取设备的电话号码(Android和iOS)

是否有可能使用Phonegap / Cordova开发混合移动应用程序并访问Android和iOS设备的手机号码?

当用户从Cordova的iOS通知中心select通知时更改状态

当用户点击通知中心的消息推送通知时,我试图在特定消息/状态(给定ID)下打开iOS / Ionic / Cordova应用程序。 有没有办法告诉,如果通过通知中心打开了应用程序,使用cordova?

PhoneGap 3.3 iOS键盘缩略图

在PhoneGap / Cordova 3.3(和3.2)中,优先级为iOS的KeyboardShrinksView消失了,并被replace为enableViewPortScale 。 任何人都可以向我解释如何实现与使用KeyboardShrinksView,但使用enableViewPortScale和视口 Metatag相同的结果? 在iOS中,如果用户打开键盘,我需要缩小整个视图。

PhoneGap Notification.Alert不起作用

好吧,我一直在这个问题上工作了一段时间,不能把这件事情弄清楚。 简单的PhoneGaptesting应用程序,试图显示一个提醒。 使用cordova2.9.0的iOS 。 我已经添加了一些简单的testing代码,并在chrome中testing它,以查看它在哪里中断,因为它不在模拟器中工作 当我在Chrome中testing(当然模拟器的结果相同,但没有显示错误信息) 它执行onDeviceReady,因为它应该 它将tb2文本框的值设置为“alert”之前 然后它打破了错误:Uncaught TypeError:不能调用未定义的方法“警报”,在这一行:navigator.notification.alert(… 它应该正确引用cordova.js,这里是我的应用程序文件夹的结构: cordova_plugins.js cordova.js /规格 spec.html config.xml中 / CSS home.html的 / IMG 的index.html / JS / RES 这是我的config.xml代码: <?xml version='1.0' encoding='utf-8'?> <widget id="com.blahblahblah.hello" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0"> <name>Hello World</name> <description> Test blahblahblah Application </description> <author email="blahblahblah@blahblahblah.com" href="http://blahblahblah.com"> blahblahblah </author> <access origin="*" /> <preference name="fullscreen" value="true" /> <preference […]

iOS上的com.facebook.sdk错误2

我有一个在iOS和Android上运行的Phonegap应用程序。 该应用程序有一个Facebookloginfunction,直到几天前工作。 我们的一些testing者已经报告了“操作无法完成com.facebook.sdk错误2”的错误。 这些testing者的设备各不相同:iPhone 5,iPhone 4s,iPod Touch,iOS 5.1.1和iOS 6.0。 我们使用最新的Facebook SDK和一个Phonegap Facebooklogin插件( https://github.com/davejohnson/phonegap-plugin-facebook-connect/ )。 我已经做了一些研究,发现了这个错误可能发生的原因如下: 我的info.plist文件中的BundleIdentifier和BundleURLName与我的Facebook应用的设置中的Native iOS应用下的Bundle ID不匹配。 该应用程序仍处于沙盒模式 该应用程序在Facebook设置(设备的设置 – > Facebook – >允许这些应用程序使用您的帐户)被禁用。 iOS 6.0不允许同时询问读写权限(不确定是否有这个权限)。 以下是这种情况: BundleIdentifier和BundleURLName匹配。 该应用程序不在沙盒模式。 该应用程序不会出现在每个用户的“允许这些应用程序使用您的帐户” Phonegap插件的build设者表示已经修复了iOS 6.0的权限错误( https://github.com/davejohnson/phonegap-plugin-facebook-connect/pull/216 ) 这是一个非常不一致的错误(在我的情况)。 如果我closures“允许这些应用程序使用您的帐户”(我的应用程序在那里列出)的应用程序,我只能自己重现错误,但我可以通过再次允许应用程序轻松修复错误。 目前大多数testing人员没有这个错误,但是错误仍然存​​在于iPod上(应用程序未在“允许这些应用程序使用您的帐户”中列出)。 有没有人有任何想法,为什么我有这个错误?