Skip to content

Commit 4f6374c

Browse files
committed
Merge remote-tracking branch 'origin/develop' into 24-feature-route-detail
# Conflicts: # presentation/src/main/java/com/stop/ui/route/RouteFragment.kt # presentation/src/main/java/com/stop/ui/route/RouteViewModel.kt # presentation/src/main/java/com/stop/ui/routedetail/RouteDetailFragment.kt # presentation/src/main/res/layout/fragment_map.xml # presentation/src/main/res/layout/fragment_route_detail.xml # presentation/src/main/res/navigation/nav_graph.xml # presentation/src/main/res/values/strings.xml
2 parents e4125f4 + fdae435 commit 4f6374c

File tree

147 files changed

+3290
-1252
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

147 files changed

+3290
-1252
lines changed

README.md

Lines changed: 42 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,43 @@
11
# android10-PlzStop
2-
버스 🚌, 지하철 🚋 멈춰! ⛔
2+
3+
![cover2](https://user-images.githubusercontent.com/48354989/205480662-4a958899-33a4-406b-87c1-2c16723a43e5.png)
4+
5+
# 프로젝트 소개
6+
7+
![plzstop_icon](https://user-images.githubusercontent.com/48354989/205480621-38dd340e-fbbb-4644-a673-386b241076bc.png) 버스 🚌, 지하철 🚋 멈춰! ⛔ - 대중교통 막차 알람 서비스 **Plz Stop**
8+
9+
10+
> 혹시 **막차 시간** 확인을 위해<br/>
11+
계속 핸드폰만 붙잡고 계시진 않으신가요? <br/>
12+
**Plz Stop**이 대신 확인해드릴게요!
13+
14+
### 🚌 원하는 경로의 **대중교통 막차 정보**를 확인해 보세요
15+
16+
출발지와 도착지를 입력하면 해당 경로의 대중교통 막차 정보를 제공합니다
17+
18+
### ⏰ 막차 알람을 등록해 보세요
19+
20+
해당 경로의 막차 알람을 등록하면 막차 시간 00분 전에 알람을 통해 알려드립니다
21+
22+
### 🏃🏻 정류장까지 대중교통보다 먼저 도착할지 시합해보세요
23+
24+
사용자의 현재 위치와 대중교통의 현재 위치를 실시간으로 지도에 보여줍니다
25+
26+
27+
28+
29+
# 주요 기능
30+
31+
|**화면 이미지**|**기능**|**설명**|
32+
|:---:|:---:|:--|
33+
|<img width=200 src="https://user-images.githubusercontent.com/48354989/205481015-7fdbfa1b-9dbe-4c3a-ba46-4e155e4f4178.png">|지도|- 사용자의 현재 위치를 **실시간으로 트래킹**하여 보여줍니다.<br/>- 지도상의 임의의 지점을 클릭하면 **현 위치로부터의 거리를 포함한 상세 정보**를 보여줍니다.<br/>- 막차 알람이 설정되어 있으면 화면 하단에 **알람 정보**를 보여줍니다.|
34+
|<img width=200 src="https://user-images.githubusercontent.com/48354989/205481015-7fdbfa1b-9dbe-4c3a-ba46-4e155e4f4178.png">|검색|- 원하는 장소를 검색할 수 있습니다.<br/>- 목적지에 갈 수 있는 대중교통 경로를 알려줍니다.<br/>|
35+
|<img width=200 src="https://user-images.githubusercontent.com/48354989/205481015-7fdbfa1b-9dbe-4c3a-ba46-4e155e4f4178.png">|막차|- 경로상에 있는 승차지의 **막차 시간**을 알려줍니다.<br/>- 승차지 사이의 이동 거리와 막차 시간을 고려하여, **첫 승차지에 탑승하러 출발해야 하는 찐-막차 시간**을 알려줍니다.<br/>|
36+
|<img width=200 src="https://user-images.githubusercontent.com/48354989/205481015-7fdbfa1b-9dbe-4c3a-ba46-4e155e4f4178.png">|알람|- 사용자가 원하는 경로의 막차 시간 00분 전에 알람을 설정할 수 있습니다.<br/>- 알람을 소리 또는 진동으로 선택할 수 있습니다.<br/>- 실시간으로 변동되는 막차 시간을 계산해서 알람을 알려줍니다.<br/>|
37+
|<img width=200 src="https://user-images.githubusercontent.com/48354989/205480897-3bb391fa-174e-4622-b16c-1a4817c74f78.png">|미션|- 사용자의 현재 위치, 목적지, 대중교통의 현재 **실시간 위치**를 보여줍니다.<br/>- 사용자와 대중교통이 **목적지까지의 경로**를 표시해줍니다.<br/>- 해당 목적지까지 대중교통과 사용자 중 누가 먼저 도착할지 **시합**할 수 있습니다.<br/>|
38+
39+
## 팀 소개 🧑‍🤝‍🧑
40+
| K008 김시진 | K037 이종성 | K039 이지민| K048 조경현|
41+
|:-----------:|:----------:|:----------:|:----------:|
42+
|<img src="https://user-images.githubusercontent.com/74500793/200560529-5c77f1a6-bcdc-4517-a13f-1f274683f530.png" width="150" height="150">|<img src="https://user-images.githubusercontent.com/74500793/200560658-e61ebec8-5e5d-42cf-9a65-a9f34bbebde7.png" width="150" height="150">|<img src="https://user-images.githubusercontent.com/74500793/200560030-6b96b399-e1c0-40d9-8901-2a959d437ab5.png" width="150" height="150">|<img src="https://user-images.githubusercontent.com/74500793/200560802-28af2528-a1e9-48cb-9e5e-889793bb53bb.png" width="150" height="150">|
43+
|[@koreatlwls](https://github.com/koreatlwls)| [@DoTheBestMayB](https://github.com/DoTheBestMayB) |[@jeeminimini](https://github.com/jeeminimini)|[@khcho226](https://github.com/khcho226)|

build.gradle

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
buildscript {
22
repositories {
33
google()
4+
mavenCentral()
45
}
56
dependencies {
67
classpath "androidx.navigation:navigation-safe-args-gradle-plugin:2.5.3"
8+
9+
// Firebase
10+
classpath 'com.google.gms:google-services:4.3.10'
711
}
812
}
913

data/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ dependencies {
6767
// Moshi
6868
implementation 'com.squareup.moshi:moshi-kotlin:1.14.0'
6969
implementation 'com.squareup.moshi:moshi:1.14.0'
70+
implementation 'com.squareup.moshi:moshi-adapters:1.14.0'
7071
kapt 'com.squareup.moshi:moshi-kotlin-codegen:1.14.0'
7172

7273
// xml parser

data/src/main/java/com/stop/data/di/LocalDataSourceModule.kt renamed to data/src/main/java/com/stop/data/di/AlarmDataSourceModule.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import javax.inject.Singleton
1313

1414
@Module
1515
@InstallIn(SingletonComponent::class)
16-
object LocalDataSourceModule {
16+
object AlarmDataSourceModule {
1717

1818
@Provides
1919
@Singleton

data/src/main/java/com/stop/data/di/DataSourceModule.kt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
package com.stop.data.di
22

3+
import com.stop.data.local.source.alarm.RecentPlaceSearchLocalDataSource
4+
import com.stop.data.local.source.alarm.RecentPlaceSearchLocalDataSourceImpl
35
import com.stop.data.remote.source.nearplace.NearPlaceRemoteDataSource
46
import com.stop.data.remote.source.nearplace.NearPlaceRemoteDataSourceImpl
57
import com.stop.data.remote.source.nowlocation.NowLocationRemoteDataSource
@@ -34,4 +36,10 @@ internal interface DataSourceModule {
3436
nowLocationRemoteDataSourceImpl: NowLocationRemoteDataSourceImpl
3537
): NowLocationRemoteDataSource
3638

39+
@Binds
40+
@Singleton
41+
fun provideRecentPlaceSearchLocalDataSource(
42+
recentPlaceSearchLocalDataSourceImpl: RecentPlaceSearchLocalDataSourceImpl
43+
) : RecentPlaceSearchLocalDataSource
44+
3745
}
Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,22 @@
11
package com.stop.data.di
22

3+
import android.content.Context
4+
import androidx.room.Room
5+
import com.stop.data.local.database.TroubleShooterApplicationDatabase
6+
import com.stop.data.local.database.TroubleShooterApplicationDatabase.Companion.DB_NAME
7+
import com.stop.data.local.database.dao.RecentPlaceSearchDao
38
import dagger.Module
9+
import dagger.Provides
410
import dagger.hilt.InstallIn
11+
import dagger.hilt.android.qualifiers.ApplicationContext
512
import dagger.hilt.components.SingletonComponent
13+
import javax.inject.Singleton
614

715
@InstallIn(SingletonComponent::class)
816
@Module
9-
class DatabaseModule {
17+
object DatabaseModule {
1018

11-
/* @Provides
19+
@Provides
1220
@Singleton
1321
fun provideApplicationDatabase(@ApplicationContext context: Context): TroubleShooterApplicationDatabase {
1422
return Room.databaseBuilder(
@@ -17,6 +25,14 @@ class DatabaseModule {
1725
DB_NAME
1826
).fallbackToDestructiveMigration()
1927
.build()
20-
}*/
28+
}
29+
30+
@Provides
31+
@Singleton
32+
fun provideRecentPlaceSearchDao(
33+
troubleShooterApplicationDatabase: TroubleShooterApplicationDatabase
34+
): RecentPlaceSearchDao {
35+
return troubleShooterApplicationDatabase.getRecentPlaceSearchDao()
36+
}
2137

2238
}

data/src/main/java/com/stop/data/di/NetworkModule.kt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
package com.stop.data.di
22

33
import com.squareup.moshi.Moshi
4+
import com.squareup.moshi.adapters.PolymorphicJsonAdapterFactory
45
import com.squareup.moshi.kotlin.reflect.KotlinJsonAdapterFactory
56
import com.stop.data.BuildConfig
67
import com.stop.data.remote.ResultCallAdapter
8+
import com.stop.domain.model.route.tmap.custom.Route
9+
import com.stop.domain.model.route.tmap.custom.TransportRoute
10+
import com.stop.domain.model.route.tmap.custom.WalkRoute
711
import com.tickaroo.tikxml.TikXml
812
import com.tickaroo.tikxml.retrofit.TikXmlConverterFactory
913
import dagger.Module
@@ -46,6 +50,11 @@ internal object NetworkModule {
4650
@Singleton
4751
fun provideMoshi(): Moshi {
4852
return Moshi.Builder()
53+
.add(PolymorphicJsonAdapterFactory
54+
.of(Route::class.java,"Route")
55+
.withSubtype(TransportRoute::class.java, "TransportRoute")
56+
.withSubtype(WalkRoute::class.java, "WalkRoute")
57+
)
4958
.addLast(KotlinJsonAdapterFactory())
5059
.build()
5160
}

data/src/main/java/com/stop/data/di/RepositoryModule.kt

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,7 @@
11
package com.stop.data.di
22

3-
import com.stop.data.repository.AlarmRepositoryImpl
4-
import com.stop.data.repository.NearPlaceRepositoryImpl
5-
import com.stop.data.repository.NowLocationRepositoryImpl
6-
import com.stop.data.repository.RouteRepositoryImpl
7-
import com.stop.domain.repository.AlarmRepository
8-
import com.stop.domain.repository.NearPlaceRepository
9-
import com.stop.domain.repository.NowLocationRepository
10-
import com.stop.domain.repository.RouteRepository
3+
import com.stop.data.repository.*
4+
import com.stop.domain.repository.*
115
import dagger.Binds
126
import dagger.Module
137
import dagger.hilt.InstallIn
@@ -33,10 +27,20 @@ internal interface RepositoryModule {
3327

3428
@Binds
3529
@Singleton
36-
fun provideAlarmRepository(alarmRepositoryImpl: AlarmRepositoryImpl): AlarmRepository
30+
fun provideAlarmRepository(
31+
alarmRepositoryImpl: AlarmRepositoryImpl
32+
): AlarmRepository
3733

3834
@Binds
3935
@Singleton
40-
fun provideNowLocationRepository(nowLocationRepositoryImpl: NowLocationRepositoryImpl): NowLocationRepository
36+
fun provideNowLocationRepository(
37+
nowLocationRepositoryImpl: NowLocationRepositoryImpl
38+
): NowLocationRepository
39+
40+
@Binds
41+
@Singleton
42+
fun provideRecentPlaceSearchRepository(
43+
recentPlaceSearchRepositoryImpl: RecentPlaceSearchRepositoryImpl
44+
): RecentPlaceSearchRepository
4145

4246
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
package com.stop.data.local.database
2+
3+
import androidx.room.Database
4+
import androidx.room.RoomDatabase
5+
import com.stop.data.local.database.dao.RecentPlaceSearchDao
6+
import com.stop.data.local.model.RecentPlaceSearchEntity
7+
8+
@Database(
9+
entities = [RecentPlaceSearchEntity::class],
10+
version = 1
11+
)
12+
abstract class TroubleShooterApplicationDatabase : RoomDatabase() {
13+
14+
abstract fun getRecentPlaceSearchDao(): RecentPlaceSearchDao
15+
16+
companion object {
17+
const val DB_NAME = "TroubleShooter.db"
18+
}
19+
}

data/src/main/java/com/stop/data/local/database/dao/AlarmDao.kt

Whitespace-only changes.

0 commit comments

Comments
 (0)