Hi, I need location services for my app. I'm curre...
# getting-started
k
Hi, I need location services for my app. I'm currently asking to activate location services on launch, how can I do something when atleast 1 location has been emitted?
Copy code
locationUpdateSubscription = locationUpdatesObservable.subscribe({
            loc -> Log.d(TAG,"Loc") //When the first loc is emitted, (I just want to trigger it once) doSomething()
        } ,{
            err-> ... //error handling
        })
Copy code
when (resultCode) {
                    Activity.RESULT_OK ->
                        // All required changes were successfully made, location updates will start coming in
                    {
                        Log.d(TAG, "User enabled location")
                        
                    }