Connecting an Audio Jack Card Reader
import com.anywherecommerce.android.sdk.MeaningfulError;
import com.anywherecommerce.android.sdk.devices.CardReader;
import com.anywherecommerce.android.sdk.devices.CardReaderConnectionListener;
CardReader.connect(new CardReaderConnectionListener() {
@Override
public void onCardReaderConnected(CardReader connectedReader) {
// The connected card reader will be returned in this method. You can now use it.
// Card reader connected, name = cardReader.getModelDisplayName()
}
@Override
public void onCardReaderConnectionFailed(MeaningfulError meaningfulError) {
// Something went wrong. Check the error
// Error text in meaningfulError.toString();
}
});
- (IBAction)connectAudio:(id)sender {
[[ANPCardReaderController sharedController] connectAudioReader];
}
Updated over 5 years ago