【问题标题】:Honeywell Captuvo IOS Develop霍尼韦尔 Captuvo IOS 开发
【发布时间】:2014-07-08 12:26:20
【问题描述】:

我正在寻求将 Captuvo SL22 SDK 集成到 appcelerator 中的帮助。 Captuvo SDK 随附用于 ipod 的 Captuvo 扫描仪/msr。我正在尝试在自定义模块中使用 Captuvo SDK 并在主应用程序中调用它。我可以通过在自定义模块 startDecoder 方法中使用以下代码与 Captuvo 设备建立连接:

- (IBAction)startDecoder:(id)sender {

ProtocolConnectionStatus state=  [[Captuvo sharedCaptuvoDevice] startDecoderHardware];

NSString *mess=nil;



switch (state) {
    case ProtocolConnectionStatusAlreadyConnected:
        mess=@"already connected";
        break;
        case ProtocolConnectionStatusUnableToConnect:
        mess=@"error connecting";
        break;
        case ProtocolConnectionStatusConnected:
        mess=@"connecting";
        break;
        case ProtocolConnectionStatusUnableToConnectIncompatiableSledFirmware:
        mess=@"incompatible firmware";
        break;
        case ProtocolConnectionStatusBatteryDepleted:
        mess=@"battery depleted";
        break;

    default:
        break;
}
{UIAlertView* alert = [[UIAlertView alloc]initWithTitle:nil
                                                message:mess
                                               delegate:self
                                      cancelButtonTitle:@"OK"
                                      otherButtonTitles:nil];
    [alert show];}}
- (void)viewDidLoad
{
[super viewDidLoad];

// Do any additional setup after loading the view, typically from a nib.


[[Captuvo sharedCaptuvoDevice] addCaptuvoDelegate:self];}

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
if (self) {

}

return self;}

设备响应我连接没有错误,然后我使用以下方法打开扫描仪:

- (IBAction)scanningBtn:(id)sender {

[[Captuvo sharedCaptuvoDevice] startDecoderScanning];}

不幸的是,没有任何反应,我正在尝试按下侧按钮,也没有任何反应......

IOS 版本 7.1.2 Xcode 5.1 版

【问题讨论】:

    标签: ios


    【解决方案1】:

    试试这个:

    在您的 ViewController.h 中:

    @interface ViewController : UIViewController<CaptuvoEventsProtocol>
    

    在您的 ViewController.m 中:

    - (void)viewDidLoad
    {
        [super viewDidLoad];
        [[Captuvo sharedCaptuvoDevice] addCaptuvoDelegate:self];
        [[Captuvo sharedCaptuvoDevice] startDecoderHardware];
    }
    
    - (void)decoderReady
    {
        // called when scanner is ready (might take a second)
    }
    
    - (void)decoderDataReceived:(NSString *)barcode
    {
        // called when you press the side button and a barcode was scanned
    }
    

    在你的 info.plist 添加这个键和数组:

    ...
    <key>UISupportedExternalAccessoryProtocols</key>
        <array>
          <string>com.honeywell.scansled.protocol.decoder</string>
        </array>
        ...
    </dict>
    </plist>
    

    希望这会有所帮助...

    【讨论】:

      【解决方案2】:

      将霍尼韦尔 SLed 功能的扫描仪和 MSR 集成到您的应用程序中;请阅读 CaptuvoSDK 快速入门和发行说明。

      而且 CaptuvoSDK 在这个 zip 包中也有简单的代码。

      【讨论】:

        猜你喜欢
        • 2013-08-07
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2019-01-21
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多