从煎茶触摸访问本机API /系统 [英] Accessing native API/system from Sencha Touch

查看:178
本文介绍了从煎茶触摸访问本机API /系统的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

煎茶触摸是我的项目相当完美。但为了呼吁在iOS和Android的硬件吧code扫描仪驱动程序,就必须拥有访问底层系统。

Sencha Touch is quite perfect for my project. But in order to call a driver for an hardware barcode scanner on iOS and Android, it would be necessary to have access to the underlying system.

这个现象的原因可能与煎茶触摸自己当改造成一个本机应用程序(在煎茶SDK允许这种)?

Is that somehow possible with Sencha Touch itself when "transforming" it into a native app (the Sencha SDK allows this)?

我知道这是可能的PhoneGap。但我怕使用所有这些技术融合在一起(的PhoneGap +煎茶触摸)可能使UI响应少,但就是在这个项目中的一个决定性因素。

I know that it is possible with PhoneGap. But I'm afraid using all these technologies together (PhoneGap + Sencha touch) could make the UI less responsive, but that is a decisive factor in this project.

编辑:<一href=\"http://stackoverflow.com/questions/11610961/how-to-access-native-ios-file-system-using-sencha-touch-2-alone\"标题=此>这个线程,用户说以下内容:

in this thread, a user says the following:

你不能访问本地的iOS文件系统,除非你使用煎茶
  SDK工具和本地包装

"you cannot access the native iOS file system, unless you use Sencha SDK Tools and native packaging"

那么,这可能与煎茶触摸?

So is it possible with Sencha touch?

推荐答案

您必须保持两件事情分开,你开发一个Web应用程序或具有嵌入Web应用程序的本地应用程序?即在用户将导航到特定URL才能到应用程序或者他们打算从App Store中下载/播放谷歌?

You have to keep two things separated, are you developing a web app or a native app that has a web app embedded? I.e. are users going to get to the app by navigating to a certain URL or are they going to download it from App Store/Google Play?

有关本地我会建议使用的PhoneGap的壳,并使用栏code扫描插件,可在的 GitHub上

For native I would suggest using PhoneGap as the "shell" and use the bar code scan plugin that is available on GitHub

对于纯粹的Web应用程序的开发,我能想到的唯一的事情是从的 ZXing 这就需要用户已经安装了吧code扫描仪(或它们重定向到相应的商店,如果我没记错的话)。在这种情况下,你不过是根据ZXing保持自己开放的服务,并在他们的部分的任何变化可能对你的应用程序有直接影响。

For pure web app development, the only thing I can think of is the Bar code Scanner service from ZXing which requires users to already have the bar code scanner installed (or redirects them to the appropriate store if I remember correctly). In this scenario you are however depending on ZXing to maintain their open service and any changes on their part could have a direct impact on your app.

希望这可以帮助您!

从OP评论后编辑:

啊,所以你需要在本地环境一般访问。至于我所知没有它似乎根据要对接入的方式比在煎茶文件规定的其他其他本地组件的记录方式<一个href=\"http://www.sencha.com/forum/showthread.php?242576-Phonegap-vs-Sencha-Cmd&p=889921&viewfull=1#post889921\"相对=nofollow>米切尔煎茶。

Ah so you need general access to the native environment. As for as I know there isn't a documented way of accessing other native components other than those specified in the Sencha Docs it seems to be on the way according to mitchell at sencha.

问题是真的但如果PhoneGap的使一个不太敏感的应用程序比煎茶手机包装。这两个创建调用Web视图的外壳应用程序,我还没有看到任何两者之间的性能测试。

The question is really though if Phonegap makes a less responsive app than the Sencha Mobile Packager. Both creates a shell application that invokes a web view and I haven't seen any performance tests between the two.

这篇关于从煎茶触摸访问本机API /系统的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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