-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ActivityLifecycleObserver RxBilling
- Loading branch information
gsanmartin
committed
May 12, 2023
1 parent
34aaf9d
commit c1ba058
Showing
33 changed files
with
243 additions
and
52 deletions.
There are no files selected for viewing
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
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
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
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
5 changes: 2 additions & 3 deletions
5
app/src/main/java/net/kelmer/correostracker/initializer/AdsInitializer.kt
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
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
18 changes: 13 additions & 5 deletions
18
app/src/main/java/net/kelmer/correostracker/initializer/Initializer_AppModule.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,40 @@ | ||
package net.kelmer.correostracker.initializer; | ||
|
||
import androidx.lifecycle.LifecycleObserver; | ||
|
||
import net.kelmer.correostracker.AppInitializer; | ||
|
||
import java.util.Set; | ||
|
||
import dagger.Binds; | ||
import dagger.Module; | ||
import dagger.hilt.InstallIn; | ||
import dagger.hilt.components.SingletonComponent; | ||
import dagger.multibindings.IntoSet; | ||
import dagger.multibindings.Multibinds; | ||
|
||
@Module | ||
@InstallIn(SingletonComponent.class) | ||
abstract class Initializer_AppModule { | ||
|
||
|
||
@Binds | ||
@IntoSet | ||
abstract Initializer bindsNotificationInitializer(NotificationInitializer impl); | ||
abstract AppInitializer bindsNotificationInitializer(NotificationInitializer impl); | ||
|
||
@Binds | ||
@IntoSet | ||
abstract Initializer bindsTimberInitializer(TimberInitializer impl); | ||
abstract AppInitializer bindsTimberInitializer(TimberInitializer impl); | ||
|
||
@Binds | ||
@IntoSet | ||
abstract Initializer bindsCrashlyticsInitializer(CrashlyticsInitializer impl); | ||
abstract AppInitializer bindsCrashlyticsInitializer(CrashlyticsInitializer impl); | ||
|
||
@Binds | ||
@IntoSet | ||
abstract Initializer bindsWorkerInitializer(WorkerFactoryInitializer impl); | ||
abstract AppInitializer bindsWorkerInitializer(WorkerFactoryInitializer impl); | ||
|
||
@Binds | ||
@IntoSet | ||
abstract Initializer bindsAdsInitializer(AdsInitializer impl); | ||
abstract AppInitializer bindsAdsInitializer(AdsInitializer impl); | ||
} |
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
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
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
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
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
21 changes: 21 additions & 0 deletions
21
app/src/main/java/net/kelmer/correostracker/ui/activity/MainActivity_ActivityModule.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package net.kelmer.correostracker.ui.activity; | ||
|
||
import androidx.lifecycle.LifecycleObserver; | ||
|
||
import net.kelmer.correostracker.ActivityLifecycleObserver; | ||
|
||
import java.util.Set; | ||
|
||
import dagger.Module; | ||
import dagger.hilt.InstallIn; | ||
import dagger.hilt.android.components.ActivityComponent; | ||
import dagger.multibindings.Multibinds; | ||
|
||
@Module | ||
@InstallIn(ActivityComponent.class) | ||
abstract class MainActivity_ActivityModule { | ||
|
||
@Multibinds | ||
@ActivityLifecycleObserver | ||
abstract Set<LifecycleObserver> processLifecycleObservers(); | ||
} |
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
4 changes: 2 additions & 2 deletions
4
...correostracker/initializer/Initializer.kt → ...t/kelmer/correostracker/AppInitializer.kt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
package net.kelmer.correostracker.initializer | ||
package net.kelmer.correostracker | ||
|
||
import android.app.Application | ||
|
||
interface Initializer { | ||
interface AppInitializer { | ||
|
||
fun initialize(application: Application) | ||
} |
19 changes: 19 additions & 0 deletions
19
core/src/main/java/net/kelmer/correostracker/ProcessLifecycleObserver.kt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package net.kelmer.correostracker | ||
|
||
import javax.inject.Qualifier | ||
|
||
/** | ||
* Annotate a [androidx.lifecycle.LifecycleObserver] with this qualifier to let it be registered in the | ||
* [androidx.lifecycle.ProcessLifecycleOwner]. | ||
*/ | ||
@Qualifier | ||
@Retention(AnnotationRetention.RUNTIME) | ||
annotation class ProcessLifecycleObserver | ||
|
||
/** | ||
* Annotate a [androidx.lifecycle.LifecycleObserver] with this qualifier to let it be registered in the | ||
* Activity Lifecycle. | ||
*/ | ||
@Qualifier | ||
@Retention(AnnotationRetention.RUNTIME) | ||
annotation class ActivityLifecycleObserver |
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
Oops, something went wrong.