-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from VeceluXa/develop
Release v1.0
- Loading branch information
Showing
168 changed files
with
4,589 additions
and
65 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,3 +13,4 @@ | |
.externalNativeBuild | ||
.cxx | ||
local.properties | ||
/app/google-services.json |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,41 @@ | ||
# Space Android App | ||
## Mars Photos | ||
App uses Nasa's API to display photos from Mars in a list. When clicking on a photo, details screen is opened. There user can zoom/move photo like in a gallery app. Also user can share photo with 3rd party apps. | ||
|
||
|
||
## Map | ||
|
||
User can view map of Earth in 3 different views (default, hybrid, satellite). When user clicks on a map the dialog opens up to type marker name. Upon saving marker it will be displayed in bottom sheet dialog that is visible to user but collapsed by default. | ||
|
||
--- | ||
# Tech stack | ||
- Android SDK | ||
- Clean Architecture | ||
- Moxy MVP | ||
- Cicerone Navigation | ||
- RxJava3 | ||
- Retrofit, OkHttp | ||
- Hilt | ||
- Splash Screen API | ||
- Google Maps SDK | ||
- Firebase Cloud Messaging | ||
- Moshi | ||
|
||
|
||
# Setup | ||
- Add Firebase's google-services.json to the root directory of app module to be able to send notification from Firebase Console | ||
- Add [NASA_API_KEY](https://api.nasa.gov/) to local.properties | ||
- Add [MAPS_API_KEY](https://developers.google.com/maps) to local.properties | ||
|
||
# Screenshots | ||
## Main Screen | ||
![](./assets/screen_home.jpg) | ||
|
||
## Details Screen | ||
![](./assets/screen_details_tutorial.jpg) | ||
![](./assets/screen_details.jpg) | ||
|
||
## Map Screen | ||
![](./assets/screen_map.jpg) | ||
![](./assets/screen_map_marker_dialog.jpg) | ||
![](./assets/screen_map_bottom_sheet_dialog.jpg) |
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file was deleted.
Oops, something went wrong.
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,7 @@ | ||
package com.danilovfa.space.presentation | ||
|
||
import android.app.Application | ||
import dagger.hilt.android.HiltAndroidApp | ||
|
||
@HiltAndroidApp | ||
class App : Application() |
54 changes: 54 additions & 0 deletions
54
app/src/main/java/com/danilovfa/space/presentation/di/AppModule.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,54 @@ | ||
package com.danilovfa.space.presentation.di | ||
|
||
import com.danilovfa.common.domain.usecase.GetRoverPhotosUseCase | ||
import com.danilovfa.common.domain.usecase.HasTutorialBeenShownUseCase | ||
import com.danilovfa.space.presentation.navigation.LocalNavigatorHolder | ||
import com.danilovfa.space.presentation.mvp.home.HomePresenter | ||
import com.danilovfa.space.presentation.mvp.main.MainPresenter | ||
import com.danilovfa.space.presentation.mvp.map.MapPresenter | ||
import com.danilovfa.space.presentation.mvp.photo.PhotoPresenter | ||
import com.danilovfa.space.utils.Constants.Companion.HOME_TAB_ID | ||
import com.danilovfa.space.utils.Constants.Companion.MAP_TAB_ID | ||
import com.github.terrakok.cicerone.Router | ||
import dagger.Module | ||
import dagger.Provides | ||
import dagger.hilt.InstallIn | ||
import dagger.hilt.android.components.ActivityComponent | ||
|
||
@Module | ||
@InstallIn(ActivityComponent::class) | ||
class AppModule { | ||
@Provides | ||
fun provideMainPresenter(router: Router): MainPresenter { | ||
return MainPresenter(router) | ||
} | ||
|
||
@Provides | ||
fun provideHomePresenter( | ||
localNavigatorHolder: LocalNavigatorHolder, | ||
getRoverPhotosUseCase: GetRoverPhotosUseCase, | ||
): HomePresenter { | ||
val router = localNavigatorHolder.getCicerone(HOME_TAB_ID).router | ||
return HomePresenter( | ||
getRoverPhotosUseCase = getRoverPhotosUseCase, | ||
router = router | ||
) | ||
} | ||
|
||
@Provides | ||
fun providePhotoPresenter( | ||
localNavigatorHolder: LocalNavigatorHolder, | ||
hasTutorialBeenShownUseCase: HasTutorialBeenShownUseCase | ||
): PhotoPresenter { | ||
val router = localNavigatorHolder.getCicerone(HOME_TAB_ID).router | ||
return PhotoPresenter(router, hasTutorialBeenShownUseCase) | ||
} | ||
|
||
@Provides | ||
fun provideMapPresenter(localNavigatorHolder: LocalNavigatorHolder): MapPresenter { | ||
val router = localNavigatorHolder.getCicerone(MAP_TAB_ID).router | ||
return MapPresenter(router) | ||
} | ||
|
||
|
||
} |
32 changes: 32 additions & 0 deletions
32
app/src/main/java/com/danilovfa/space/presentation/di/NavigationModule.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,32 @@ | ||
package com.danilovfa.space.presentation.di | ||
|
||
import com.danilovfa.space.presentation.navigation.LocalNavigatorHolder | ||
import com.github.terrakok.cicerone.Cicerone | ||
import com.github.terrakok.cicerone.NavigatorHolder | ||
import com.github.terrakok.cicerone.Router | ||
import dagger.Module | ||
import dagger.Provides | ||
import dagger.hilt.InstallIn | ||
import dagger.hilt.components.SingletonComponent | ||
import javax.inject.Singleton | ||
|
||
@Module | ||
@InstallIn(SingletonComponent::class) | ||
class NavigationModule { | ||
@Provides | ||
@Singleton | ||
fun provideCicerone(): Cicerone<Router> = Cicerone.create() | ||
|
||
@Provides | ||
@Singleton | ||
fun provideRouter(cicerone: Cicerone<Router>): Router = cicerone.router | ||
|
||
@Provides | ||
@Singleton | ||
fun provideNavigatorHolder(cicerone: Cicerone<Router>): NavigatorHolder = | ||
cicerone.getNavigatorHolder() | ||
|
||
@Provides | ||
@Singleton | ||
fun provideLocalNavigatorHolder(): LocalNavigatorHolder = LocalNavigatorHolder() | ||
} |
8 changes: 8 additions & 0 deletions
8
app/src/main/java/com/danilovfa/space/presentation/model/MapMarker.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,8 @@ | ||
package com.danilovfa.space.presentation.model | ||
|
||
import com.google.android.gms.maps.model.Marker | ||
|
||
data class MapMarker( | ||
val label: String, | ||
val marker: Marker | ||
) |
Oops, something went wrong.