@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_setup_beacon); tvHint = (TextView) findViewById(R.id.tvHint); tvStatus = (TextView) findViewById(R.id.tvStatus); ibBeacon = (ImageButton) findViewById(R.id.ibBeacon); if (!BeaconUtils.checkBluetoothAvaliability()) { BeaconUtils.turnOnBluetoothIfNotAvaliable(this); } BeaconTrackServiceHelper.restartBeaconTrackSerivce(getApplication()); }