Estimote / Android-Fleet-Management-SDK

Estimote Fleet Management SDK for Android
https://developer.estimote.com
MIT License
836 stars 451 forks source link

Connection Time Out #288

Closed Rkr999 closed 5 years ago

Rkr999 commented 6 years ago

Prerequisites

Basic information

Estimote SDK version: 1.0.12

Android devices affected: Samsung Galaxy tab

Android OS version affected: Lollipop 5.1

Beacon hardware version: J1.6

Description

1.We are unable to create connection for proximity beacons with Estimote/Android-SDK. 2.We are able to create connection for location beacons. (Optional) Steps to reproduce:

  1. [First Step]
  2. [Second Step]
  3. [and so on...]

Expected behavior: Read and Write configuration

Actual behavior: Connection time out

Logs and code

ConfigurableDevice configurableDevice =(ConfigurableDevice)getIntent().getParcelableExtra("ConfigurableDevice");

DeviceConnectionProvider connectionProvider = new DeviceConnectionProvider(this);
        connectionProvider.connectToService(new DeviceConnectionProvider.ConnectionProviderCallback() {
            @Override
            public void onConnectedToService() {
                // Handle your actions here. You are now connected to connection service.
                // For example: you can create DeviceConnection object here from connectionProvider.
                Log.d(TAG, "onConnectedToService");
                sample_text.setText(sample_text.getText().toString() + " \n " + " Called onConnectedToService" + "\n");
                connectToBeacon();
            }
        });
void connectToBeacon(){
DeviceConnection connection = connectionProvider.getConnection(configurableDevice);
        connection.connect(new DeviceConnectionCallback() {
            @Override
            public void onConnected() {
                // Do something with your connection.
                // You can for example read device settings, or make an firmware update.
                Log.d(TAG, "onConnected Read device details." );
                readDeviceDetails();
            }

            @Override
            public void onDisconnected() {
                // Every time your device gets disconnected, you can handle that here.
                // For example: in this state you can try reconnecting to your device.
                Log.d(TAG, "onDisconnected");
            }

            @Override
            public void onConnectionFailed(final DeviceConnectionException exception) {
                // Handle every connection error here.
                Log.d(TAG, "onConnectionFailed " + exception.getMessage());
            }
        });
}
heypiotr commented 5 years ago

[Cleaning up stale issues following the rebranding of Estimote SDK to Estimote Fleet Management SDK]

Feel free to re-open this issue if the problem still persists with the latest version of the SDK.