Search code examples
androidibeaconaltbeacon

Altbeacon warning: Can't read macs from BluetoothCrashResolverState.txt


I tried to follow the steps as stated here, https://github.com/RadiusNetworks/bluetooth-crash-resolver but couldn't succeed. I copied the file BluetoothCrashResolver.java from bluetooth package and pasted it in my codebase(src/main/myProject) and tried to use it in the following way in my MainActivity (Its just the ranging example from code altbeacon site).

public class RangingActivity extends Activity implements BeaconConsumer {
    protected static final String TAG = "RAAAAAAAAAAAAANNNNNNNNGGGGEEEEE";
    private BeaconManager beaconManager;
    private BlutoothCrashResolver bluetoothCrashResolver=null;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_ranging);
        bluetoothCrashResolver = new BlutoothCrashResolver(this.getApplicationContext());
        bluetoothCrashResolver.start();
  1. The first error i get is that BlutoothCrashResolver cannot be resolved, that means my import is not right, i also had an import statement (import com.project.package.BluetoothCrashResolver;) at the top, but didnt work.

  2. If I somehow get it to work, where should i put this statement

    bluetoothCrashResolver.notifyScannedDevice(device, myLeScanCallback);

  3. And finally why is it happening for the beacon Ranging? Monitoring code worked fine for me. Is it specific to my device (LG Tab 7) or in general (I tried both the latest altbeacon arr files).

Special attention to @davidyoung. Some reflection on this topic will be highly appreciable.


Solution

  • Finally got it working. It was just a silly mistake of not adding a beacon parser.