title: Honeywell's Captuvo SL22 SDK
body: <p>I am looking for help in integrating Captuvo SL22 SDK within appcelerator. The Captuvo SDK comes with the Captuvo scanner/msr for ipod. I am trying to use Captuvo SDK in a custom module and call it in the main app. I am able to establish a connection with the Captuvo Device by using the following code in the custom module startup method:</p>
  
  <pre><code>-(void) startup{
      self.captuvo = [Captuvo sharedCaptuvoDevice];
      [self.captuvo addCaptuvoDelegate:self];
      [self.captuvo startDecoderHardware];
  }
  
  -(void) DecoderReady{
      //Fire Event successfully to Titanium App
  }
  </code></pre>
  
  <p>After the startup I try to turn the scanner on by hitting a button in the app, this is my code:</p>
  
  <pre><code>-(void) turnScannerOn{
      if([self.captuvo isDecoderRunning]){
          //Fire event successfully to Titanium App
          [self.captuvo startDecoderScanning];
      }
  }
  </code></pre>
  
  <p>However, no matter what I try I cannot get the scanner to turn on for the life of me. I am using Titanium 3.1.1 for an iPod touch running iOS 6.1. Any help would be much appreciated! If I figure it out I will be sure to let others know!</p>
  
  <p>Update:
  So an update on this is that I was able to get the this to kind of work. This to the tiapp.xml to scan:</p>
  
  <pre><code>&lt;ios&gt;
      &lt;plist&gt;
          &lt;dict&gt;
              &lt;key&gt;UISupportedExternalAccessoryProtocols&lt;/key&gt;
              &lt;array&gt;
                  &lt;string&gt;com.honeywell.scansled.protocol.decoder&lt;/string&gt;
                  &lt;string&gt;com.honeywell.scansled.protocol.msr&lt;/string&gt;
                  &lt;string&gt;com.honeywell.scansled.protocol.pm&lt;/string&gt;
              &lt;/array&gt;
          &lt;/dict&gt;
      &lt;/plist&gt;
  &lt;/ios&gt;
  </code></pre>
  
  <p>However, when you first startup the app, I am unable to turn on the scanner using a button, but the triggers on the side work, but no data is returned. Honeywell provided some sample code and I noticed that this code added to a native app makes the scanner work on the initial start up so I was wondering if there is a way to replicate this objective C code inside of titanium:</p>
  
  <pre><code>- (void)viewWillAppear:(BOOL)animated
  {
      [[Captuvo sharedCaptuvoDevice] removeCaptuvoDelegate:self] ;
      [[Captuvo sharedCaptuvoDevice] addCaptuvoDelegate:self];
      [[Captuvo sharedCaptuvoDevice] startPMHardware];
      [[Captuvo sharedCaptuvoDevice] startDecoderHardware];
  }
  
  - (void)viewDidDisappear:(BOOL)animated
  {
      [[Captuvo sharedCaptuvoDevice] stopDecoderHardware];
      [[Captuvo sharedCaptuvoDevice] stopPMHardware];
      [[Captuvo sharedCaptuvoDevice] removeCaptuvoDelegate:self];
  }
  </code></pre>