How to get value time
from this code
val TAG = MainActivity::class.java.name
TrueTimeRx.build()
.initializeRx("time.google.com")
.subscribeOn(Schedulers.io())
.subscribe({ time ->
Log.v(TAG, "TrueTime was initialized and we have a time: $time") },
{ throwable -> throwable.printStackTrace() }
)
and put it in this code
helloWorld=findViewById(R.id.helloWorld)
val newTime=getString(R.string.hello, time)
helloWorld.text=newTime
how to take time
from the first part of the code and to put it in the second
code above is in onCreate()
and if it's important i have this
internal lateinit var helloWorld: TextView