Created
February 15, 2020 13:53
-
-
Save amritlalsahu5/aa92e6be53067b8a08bf1a1802619e9a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.codehangouts.sampleapp.memoryleak.kotlin.listener | |
import android.os.Bundle | |
import androidx.appcompat.app.AppCompatActivity | |
class RegisterListenerActivity : AppCompatActivity() { | |
override fun onCreate(savedInstanceState: Bundle?) { | |
super.onCreate(savedInstanceState) | |
} | |
override fun onStart() { | |
super.onStart() | |
registerLocationUpdates() | |
} | |
override fun onStop() { | |
super.onStop() | |
unRegisterLocationUpdates() | |
} | |
private fun registerLocationUpdates() { | |
// register for location updates here | |
} | |
private fun unRegisterLocationUpdates() { | |
// unregister here | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment