如何在Cordova显示照片库权限对话框? [英] How to display photo library permissions dialog in Cordova?

查看:502
本文介绍了如何在Cordova显示照片库权限对话框?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,我们正在开发基于IBM MobileFirst Platform的混合应用程序。在我们的应用程序中,我们访问的用户库(上传照片)。对于这个在iPhone中我们需要明确要求用户权限,要求用户在iPhone中的权限,我们需要显示对话框。这里我的问题是我们要向用户显示的对话框是自定义对话框,还是有在MobileFirst中内置的任何本机功能,或在任何cordova插件的帮助下?

Hi we are developing an IBM MobileFirst Platform-based Hybrid Application. In our application we are accessing user gallery (to upload photos). for this in iPhone we need to ask the user permission explicitly, to ask user permission in iPhone we need to display dialog box. Here my question is the dialog box which we are going to show to the user is custom dialog box or is there any native feature built-in in MobileFirst, or with the help of any cordova plugin?

推荐答案

MobileFirst不会为您处理任何权限 - 它不是那种框架。这真的涉及到您的应用程序中的Cordova图层,它访问照片库。

MobileFirst does not handle any permissions for you - it is not that kind of a framework. This really relates to the Cordova layer in your app, which access the photo library.

您需要显示一个对话框,询问用户是否允许用于访问照片库。例如,您可以使用WL.SimpleDialog。

You need to display a dialog box asking the user whether or not does s/he allow for the access to access the photo library. You can use WL.SimpleDialog for this purpose, for example.

阅读更多:

  • http://docs.phonegap.com/en/3.3.0/guide_appdev_privacy_index.md.html#Privacy%20Guide
  • Cordova Camera Plugin in IOS 9
  • perhaps to check if there is access given, create also a Cordova plug-in that will check for it using native code: Determine if the access to photo library is set or not - iOS 8

这篇关于如何在Cordova显示照片库权限对话框?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆