Monday, July 25, 2011

[android-developers] NFC write error handling

Hello,
How to implement code inside catch if error is occurred, like TAG is
not available, for the following code. why the program don't execute
code inside catch? i tried using finally statment and this also didn't
work.
try {
tag.connect();
if(tag.isConnected() && tag.isWritable()){
tag.writeNdefMessage(message);
tag.close();
}

} catch (IOException e) {
// TODO Auto-generated catch block

} catch (FormatException e) {
// TODO Auto-generated catch block

}

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate