Pergunta

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.

Foi útil?

Solução

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. 
   }
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top