Kotlin obserwowalny przykład

This class was deprecated in API level Tiramisu.

This class and the Observer interface have been deprecated. The event model 
supported by Observer and Observable is quite limited, the order of notifications
delivered by Observable is unspecified, and state changes are not in one-for-one 
correspondence with notifications. For a richer event model, consider using the 
java.beans package. For reliable and ordered messaging among threads, consider 
using one of the concurrent data structures in the java.util.concurrent package. 
For reactive streams style programming, see the java.util.concurrent.Flow API.
android developer