I want to recognize the ibeacon signal on Android and write processing, but I don't know how to specify UUID, mahor, etc.

Asked 2 years ago, Updated 2 years ago, 113 views

Thank you for your help.The ibeacon signal is recognized on Android and the app is screen-transitioned according to the signal.I would like to take care of it.
However, I am not good enough, but I don't know how to describe it.

If you specify UUID, major, and minor respectively

For example
UUID is AAAAAAAAAABBBBBBCCCCC
major is 01
minor is 01
In , I would like to specify UIID, major, and minor, and perform a screen transition when receiving the signal.

I think LeScanCallback will describe the process, but how do you describe it?
I can recognize beacon, UUID, major, minor.
I'm very sorry, but could I ask for your advice?
Thank you for your cooperation.

private BluetoothAdapter.LeScanCallback mLeScanCallback=new
BluetoothAdapter.LeScanCallback() {@Override public void
onLeScan(final BluetoothDevice device, intrssi, byte[]scanRecord) {

};

android ibeacon

2022-09-30 14:29

1 Answers

if(uuid.equals("UUID you want to specify")&major.equals("major you want to specify"){
  Intent = new Intent(getApplicationContext(), TestActivity.class);
  startActivity (intent);
};

Resolved above


2022-09-30 14:29

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.