ThibaudCrespin / iBeaconReader

Projet d'application Android permettant la détection à proximité de puces iBeacon.
GNU General Public License v3.0
1 stars 0 forks source link

NfcAdapter issue #1

Open ferhatguneri opened 7 years ago

ferhatguneri commented 7 years ago

Hi,

I looking this mistake but i can't solve it can you take a look it. when i start the application(iBeaconReader), application is stopped and i get this error.

08-09 18:48:24.164 24496-24496/com.iut.lr.ibeaconreader E/AndroidRuntime: java.lang.RuntimeException: Unable to resume activity {com.iut.lr.ibeaconreader/com.iut.lr.ibeaconreader.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.nfc.NfcAdapter.enableForegroundDispatch(android.app.Activity, android.app.PendingIntent, android.content.IntentFilter[], java.lang.String[][])' on a null object reference

ThibaudCrespin commented 7 years ago

Hi @Shade21, Thanks for your feedback ! I'm afraid this is an old project I did for school on a older version of android, and I don't have much time to spend on it... My apologies ! I think the problem comes from the NFCAdapter library I use, maybe you can try to use it another way. I wish you good luck debugging it ! And let me know if you fix the issue ;)

ferhatguneri commented 7 years ago

Thanks for your answer. I want to ask another question. I have a beacon and Is your project can detect it's uuid, major, minor, RSSI ? or distance?

ThibaudCrespin commented 7 years ago

UUID, major, minor and RSSI yes I guess, it's provided by the NFCAdapter library. But distance you'll need to create a function, I wanted to do it but totally forgot !