@Override public void onCreate() { Log.i(TAG, "iBeaconService version is starting up"); getBluetoothAdapter(); bluetoothCrashResolver = new BluetoothCrashResolver(this); bluetoothCrashResolver.start(); // Look for simulated scan data try { Class klass = Class.forName("com.radiusnetworks.ibeacon.SimulatedScanData"); java.lang.reflect.Field f = klass.getField("iBeacons"); this.simulatedScanData = (List<IBeacon>) f.get(null); } catch (ClassNotFoundException e) { if (IBeaconManager.LOG_DEBUG) Log.d(TAG, "No com.radiusnetworks.ibeacon.SimulatedScanData class exists."); } catch (Exception e) { Log.e( TAG, "Cannot get simulated Scan data. Make sure your com.radiusnetworks.ibeacon.SimulatedScanData class defines a field with the signature 'public static List<IBeacon> iBeacons'", e); } }
/** * default constructor, internally setting up the {@link * com.radiusnetworks.bluetooth.BluetoothCrashResolver} * * @param application parameter, required for the initialization of the {@link * com.radiusnetworks.bluetooth.BluetoothCrashResolver} */ public CrashCallBackWrapper(Context application) { bluetoothCrashResolver = new BluetoothCrashResolver(application); bluetoothCrashResolver.start(); }