{"action":"opened","issue":{"url":"https://api.github.com/repos/Polidea/RxAndroidBle/issues/65","repository_url":"https://api.github.com/repos/Polidea/RxAndroidBle","labels_url":"https://api.github.com/repos/Polidea/RxAndroidBle/issues/65/labels{/name}","comments_url":"https://api.github.com/repos/Polidea/RxAndroidBle/issues/65/comments","events_url":"https://api.github.com/repos/Polidea/RxAndroidBle/issues/65/events","html_url":"https://github.com/Polidea/RxAndroidBle/issues/65","id":173968615,"number":65,"title":"While auto reconnecting the library will try to send again previous successfully written characteristics ","user":{"login":"aldoborrero","id":82811,"avatar_url":"https://avatars.githubusercontent.com/u/82811?v=3","gravatar_id":"","url":"https://api.github.com/users/aldoborrero","html_url":"https://github.com/aldoborrero","followers_url":"https://api.github.com/users/aldoborrero/followers","following_url":"https://api.github.com/users/aldoborrero/following{/other_user}","gists_url":"https://api.github.com/users/aldoborrero/gists{/gist_id}","starred_url":"https://api.github.com/users/aldoborrero/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aldoborrero/subscriptions","organizations_url":"https://api.github.com/users/aldoborrero/orgs","repos_url":"https://api.github.com/users/aldoborrero/repos","events_url":"https://api.github.com/users/aldoborrero/events{/privacy}","received_events_url":"https://api.github.com/users/aldoborrero/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-08-30T09:15:31Z","updated_at":"2016-08-30T09:15:31Z","closed_at":null,"body":"Hi guys!\r\n\r\n(Feel free to categorise this issue as question and I will forward them to StackOverflow if you believe that is more a question than an issue but I wanted to stay sure).\r\n\r\nFor now what I observed is when I establish a connection, pretty much like this:\r\n\r\n```java\r\nconnectionObservable = rxBleDevice.establishConnection(context, false)\r\n          .takeUntil(disconnectionTrigger)\r\n          .doOnUnsubscribe(this::onUnsubscribeConnection)\r\n          .compose(new ConnectionSharingAdapter())\r\n          .retryWhen(this::onShouldRetryOperation);\r\n\r\n      connectionObservable.subscribe(this::onConnectionSuccess, this::onConnectionFailure);\r\n```\r\n\r\nAnd later on when I write a characteristic (triggered by the user at some point of time after establishing the connection, just like clicking on a button, I don't care about the result of the operation):\r\n\r\n```java\r\nconnectionObservable\r\n          .observeOn(Schedulers.computation())\r\n          .flatMap(\r\n              connection -> connection.writeCharacteristic(command.getCommandUuid(), command.getData())\r\n          )\r\n          .doOnNext(bytes ->Log.d(TAG, \"Command written successfully! Command: \" + command))\r\n          .subscribe();\r\n```\r\n\r\nThe behaviour that I'm facing is that if for whatever reason I change the BT adapter state (from on to off and the again to on), those previous commands that I sent successfully in a response to a user behaviour will again be fired (i.e if I sent 10 write operations, will again send those 10 operations).\r\n\r\nIs this behaviour expected?"}}
{"actor":{"display_login":"aldoborrero"}}