Want to change Major Minor ID with my app


I am developer with estimote beacon and android studio application.

I want to change my beacon’s major, minor ID with my own app(Android studio)!!!

How can I do??

Are there sample android studio codes about that?

Hey @yeon,

first you have to connect to your beacon. After, you will be able to change the settings of your beacon (major & minor for example).

  1. initialize the connection to the Estimote cloud with EstimoteSDK.initialize() using your app’ ID and token,

  2. set a DiscoverableDevice listener on your BeaconManager instance,

  3. start the discovery with BeaconManager.startConfigurableDevicesDiscovery(),

  4. when having the scan result, choose the beacon you want to connect to,

  5. connect to this beacon with DeviceConnection.connect(),

  6. change the settings with DeviceConnection.edit(),

  7. disconnect from the beacon with DeviceConnection.close(),


Thanks for your detail answer.

But I can’t handle about that well because of my bad coding ability.

Could you teach me with some sample codes…?? Sorry.TT


So basically you will have an Android Activity in you app’ to connect to the beacon. Let’s name the activity ConnectActivity. Your app’s name will be MyApplication.

public class MyApplication extends Application {
    private final static String APP_ID = "my app' ID here as a string";
    private final static String APP_TOKEN = "my app' token here as a string";

    public void onCreate() {

        // This will initialize the connection with the Estimote cloud (1):
        EstimoteSDK.initialize(this.getApplicationContext(), APP_ID, APP_TOKEN);

After, you will have to use the BeaconManager class.

public class ConnectActivity extends AppCompatActivity {
    private BeaconManager beaconManager;
    private ConfigurableDevice device;

    protected void onCreate(Bundle savedInstanceState) {

        // Get an instance of the BeaconManager class (2.1):
        this.beaconManager = new BeaconManager(this);

        this.device = null;

        // Set a listener to the BeaconManager instance (2.2):
        this.beaconManager.setConfigurableDevicesListener(new BeaconManager.ConfigurableDevicesListener() {
            public void onConfigurableDevicesFound(List<ConfigurableDevice> configurableDevices) {
                // Choose here which device on the list you want to connect to (4):
                device = [...]

                // Connect to the device to change settings (5):

    protected void onResume() {

        if (this.device == null) {
            this.beaconManager.connect(BeaconManager.ServiceReadyCallback() {
                public void onServiceReady() {
                    // Start the scanning after being connected to the BeaconService (3):

    protected void onPause() {


    protected void onDestroy() {


    private void connectAndWriteToDevice(ConfigurableDevice device) {
        DeviceConnectionProvider deviceConnectionProvider = new DeviceConnectionProvider(this);

        deviceConnectionProvider.connectToService(new DeviceConnectionProvider.ConnectionProviderCallback() {
            public void onConnectedToService() {
                DeviceConnection deviceConnection = connectionProvider.getConnection(device);

                deviceConnection.connect(new DeviceConnectionCallback() {
                    public void onConnected() {
                        // Change the settings in the device (6):

                        // Disconnect from the device (7):


If you need more help, see the JavaDoc.

Hope it helps :slight_smile:

1 Like

What a kind man!

I envy you because you are so smart about this beacon and Android studio.

I just copy and paste your code in my application… But there are some problems about “beaconManager.setConfigurableDevicesListener”.

I will study with your sample codes.

Thank you for your good will.

1 Like