This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

I am using android ble with kotlin. I ported the Blinky example to kotlin. There is a reference escaped in object construction when on construction the BLEManager invokes getGattCallbacks on the child class which isn't constructed until after the paren

I am using android ble with kotlin. I ported the Blinky example to kotlin. There is a reference escaped in object construction when on construction the BLEManager invokes getGattCallbacks on the child class which isn't constructed until after the parent object. This creates an unworkable bug and the Kotlin folks recommend never calling non-final instance methods during initialization.

Parents
  • Hi,

    I am not sure I understand what you are asking me about here. It seems your issue is that the blinkey example port to Kotlin does not work as expected?
    Could you elaborate on what example you are trying to port, from which SDK version. Please also describe what functionality you are trying to achieve in general. 
    I am not familiar with the Kotlin language and their recommendations.

    Please clarify your question.

    Best regards,
    Karl

Reply
  • Hi,

    I am not sure I understand what you are asking me about here. It seems your issue is that the blinkey example port to Kotlin does not work as expected?
    Could you elaborate on what example you are trying to port, from which SDK version. Please also describe what functionality you are trying to achieve in general. 
    I am not familiar with the Kotlin language and their recommendations.

    Please clarify your question.

    Best regards,
    Karl

Children
No Data
Related