1

In my application i need to scan the bar code. for that i am using Linea pro bar code scanning device attached with my iPhone. i need to know the presence of device through code. is it possible? I am new to objective C . Help me to fix this issue.

Thank you.

Wayne Hartman
  • 18,369
  • 7
  • 84
  • 116
Ganapathy
  • 4,594
  • 5
  • 23
  • 41

1 Answers1

1

Yes, it is possible.

All you have to do is this:

int lineaStatus = [[Linea sharedDevice] connstate];

Them just compare them to the different connection states like this.

   if(lineaStatus == CONN_DISCONNECTED) {
           //Device is connected
   } else if(status == CONN_CONNECTED) {
            //Device is disconnected. 
   }
Ares
  • 5,905
  • 3
  • 35
  • 51