From c878f8edf94c30b42e53fb33fea7cd2bbe1b0d75 Mon Sep 17 00:00:00 2001 From: zhxnlai Date: Thu, 17 Jan 2019 17:56:46 -0800 Subject: [PATCH] Rename method --- README.md | 4 ++-- .../main/java/com/tinder/service/ChatRoomSocketIoService.kt | 4 ++-- gradle.properties | 2 +- .../com/tinder/scarlet/lifecycle/android/AndroidLifecycle.kt | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 3105d8b6..9cde5aed 100644 --- a/README.md +++ b/README.md @@ -87,7 +87,7 @@ While we are working on Bintray support, Scarlet is available via [JitPack][jitp com.github.tinder.scarlet scarlet - 0.2.3-alpha1 + 0.2.4-alpha1 ``` @@ -98,7 +98,7 @@ repositories { maven { url "https://jitpack.io" } } -implementation 'com.github.tinder.scarlet:scarlet:$0.2.3-alpha1' +implementation 'com.github.tinder.scarlet:scarlet:$0.2.4-alpha1' ``` ### Plug-in Roadmap diff --git a/demo/src/main/java/com/tinder/service/ChatRoomSocketIoService.kt b/demo/src/main/java/com/tinder/service/ChatRoomSocketIoService.kt index ab7513ba..e570a822 100644 --- a/demo/src/main/java/com/tinder/service/ChatRoomSocketIoService.kt +++ b/demo/src/main/java/com/tinder/service/ChatRoomSocketIoService.kt @@ -40,7 +40,7 @@ class ChatRoomSocketIoService : LifecycleService() { super.onCreate() val config = Scarlet.Configuration( - lifecycle = AndroidLifecycle.ofLifecycleServiceForeground(application, this), + lifecycle = AndroidLifecycle.ofLifecycleServiceStarted(application, this), messageAdapterFactories = listOf(MoshiMessageAdapter.Factory()), streamAdapterFactories = listOf(RxJava2StreamAdapterFactory()) ) @@ -106,7 +106,7 @@ class ChatRoomSocketIoService : LifecycleService() { Timber.e(e) }) - Flowable.fromPublisher(AndroidLifecycle.ofLifecycleServiceForeground(application, this)) + Flowable.fromPublisher(AndroidLifecycle.ofLifecycleServiceStarted(application, this)) .subscribe({ Timber.d("chatroom lifecycle: $it") diff --git a/gradle.properties b/gradle.properties index 04789687..2dda6e76 100644 --- a/gradle.properties +++ b/gradle.properties @@ -4,4 +4,4 @@ android.enableJetifier=true android.useAndroidX=true -version=0.2.3-alpha1 +version=0.2.4-alpha1 diff --git a/scarlet-lifecycle-android/src/main/java/com/tinder/scarlet/lifecycle/android/AndroidLifecycle.kt b/scarlet-lifecycle-android/src/main/java/com/tinder/scarlet/lifecycle/android/AndroidLifecycle.kt index 5b0f62cb..483eacbc 100755 --- a/scarlet-lifecycle-android/src/main/java/com/tinder/scarlet/lifecycle/android/AndroidLifecycle.kt +++ b/scarlet-lifecycle-android/src/main/java/com/tinder/scarlet/lifecycle/android/AndroidLifecycle.kt @@ -43,7 +43,7 @@ object AndroidLifecycle { @JvmStatic @JvmOverloads - fun ofLifecycleServiceForeground( + fun ofLifecycleServiceStarted( application: Application, lifecycleOwner: LifecycleOwner, throttleTimeoutMillis: Long = ACTIVITY_THROTTLE_TIMEOUT_MILLIS