fix NPE on older phones

This commit is contained in:
Eric House 2013-11-24 18:13:54 -08:00
parent 7743fc52d5
commit 8260fb1437

View file

@ -76,7 +76,9 @@ public class NFCUtils {
NfcManager manager =
(NfcManager)activity.getSystemService( Context.NFC_SERVICE );
NfcAdapter adapter = manager.getDefaultAdapter();
adapter.setNdefPushMessageCallback( cb, activity );
if ( null != adapter ) {
adapter.setNdefPushMessageCallback( cb, activity );
}
}
}