ASRManager 1.1.0

ASRManager 1.1.0

TestsTested
LangLanguage Objective C++Objective C++
License MIT
ReleasedLast Release Sep 2015

Maintained by koda.



  • By
  • Asterisk.inc Technical Team

Convenience library for AsReader

ASRManager is a delightful library to use AsReader for iOS. ASRManager provides singleton instance including AsReader SDK.

Installation

ASRManager is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "ASRManager"

Usage

Import header file.

#import <ASRManager.h>

Add protocol to Supported external accessory protocols in plist.

  • Barcode => 'jp.co.asx.asreader.barcode'
  • RFID => 'jp.co.asx.asreader.rfid'

Instance Method

Open connection with AsReader.

[[ASRManager sharedInstance] open];

Close connection with AsReader.

[[ASRManager sharedInstance] close];

Start to read a barcode.

[[ASRManager sharedInstance] startReadBarcodeOnce];

Stop to read a barcode.

[[ASRManager sharedInstance] stopReadBarcode];

Delegate Method

Receive connection status with AsReader

- (void)ASRManagerPlugged:(ASRManager *)manager isPlugged:(BOOL)isPlugged{
    if(isPlugged){
        NSLog(@"First ViewController : AsReader Plugged");
    }else{
        NSLog(@"First ViewController : AsReader Unplugged");
    }
}

Receive barcode data read with AsReader.

- (void)ASRManagerOnBarcodeScanned:(ASRManager *)manager value:(NSString *)value
{
    dispatch_async(dispatch_get_main_queue(), ^{
        _inputTextField.text = value;
    });
}

Received battery charge(%).

-(void)ASRManagerBattery:(ASRManager *)manager battery:(int)battery
{
    NSLog(@"battery %d%%",battery);
}

To run the example project, clone the repo, and run pod install from the Example directory first.

Author

Asterisk.inc Technical Team, [email protected]

License

ASRManager is available under the MIT license. See the LICENSE file for more info.