diff --git a/app/src/main/kotlin/io/treehouses/remote/BaseInitialActivity.kt b/app/src/main/kotlin/io/treehouses/remote/BaseInitialActivity.kt index 7909c5512..397e0a2c9 100644 --- a/app/src/main/kotlin/io/treehouses/remote/BaseInitialActivity.kt +++ b/app/src/main/kotlin/io/treehouses/remote/BaseInitialActivity.kt @@ -2,6 +2,7 @@ package io.treehouses.remote import android.content.Context import android.content.SharedPreferences +import android.os.Bundle import android.os.Handler import android.os.Looper import android.os.Message @@ -36,6 +37,13 @@ open class BaseInitialActivity: PermissionActivity(), NavigationView.OnNavigatio protected lateinit var currentTitle: String + lateinit var mChatService: BluetoothChatService + + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + mChatService = BluetoothChatService() + } + override fun setChatService(service: BluetoothChatService) { mChatService = service mChatService.updateHandler(mHandler) @@ -166,6 +174,5 @@ open class BaseInitialActivity: PermissionActivity(), NavigationView.OnNavigatio companion object { @JvmStatic var instance: BaseInitialActivity? = null - lateinit var mChatService: BluetoothChatService } } \ No newline at end of file