Skip to content

Commit

Permalink
Merge pull request #253 from tukcomCD2024/develop_front
Browse files Browse the repository at this point in the history
rls : FCM(SkinMake) - Front
  • Loading branch information
seokho-1116 authored Mar 14, 2024
2 parents 9b8a859 + d02dc4d commit c8602df
Show file tree
Hide file tree
Showing 140 changed files with 4,505 additions and 969 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/android-CI.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Android CI

on:
pull_request:
branches: [ "develop_front" ]

jobs:
build:
runs-on: ubuntu-latest

env:
LOCAL_PROPERTIES_CONTENTS: ${{ secrets.LOCAL_PROPERTIES_CONTENTS }}
GOOGLE_SERVICES_JSON: ${{ secrets.GOOGLE_SERVICES_JSON }}

steps:
- uses: actions/checkout@v1

- name: set up JDK 17
uses: actions/setup-java@v1
with:
java-version: 17
distribution: 'temurin'
cache: gradle

- name: Grant Permission for gradlew
run: chmod +x ./frontend/ARchive/gradlew
shell: bash

- name: Create google-services.json
run: echo "$GOOGLE_SERVICES_JSON" > frontend/ARchive/app/google-services.json

- name: Create local.properties
run: |
echo "$LOCAL_PROPERTIES_CONTENTS" > frontend/ARchive/app/local.properties
- name: Build debug
run: ./frontend/ARchive/gradlew
2 changes: 2 additions & 0 deletions frontend/ARchive/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ build/

# Local configuration file (sdk path, etc)
local.properties
keystore.properties
output-metadata.json

# Log/OS Files
*.log
Expand Down
22 changes: 20 additions & 2 deletions frontend/ARchive/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ plugins {
id 'kotlin-kapt'
id 'com.google.dagger.hilt.android'
id 'dagger.hilt.android.plugin'
id 'com.google.gms.google-services'
id 'com.google.firebase.crashlytics'
}

Properties properties = new Properties()
Expand Down Expand Up @@ -125,8 +127,8 @@ dependencies {
//circleImageView : https://github.com/hdodenhof/CircleImageView
implementation 'de.hdodenhof:circleimageview:3.1.0'

//circleIndicator : https://github.com/ongakuer/CircleIndicator
implementation 'me.relex:circleindicator:2.1.6'
//indicator : https://github.com/tommybuonomo/dotsindicator?utm_source=android-arsenal.com&utm_medium=referral&utm_campaign=7127
implementation "com.tbuonomo:dotsindicator:5.0"

// SMS Retriever API
implementation 'com.google.android.gms:play-services-auth:20.7.0'
Expand Down Expand Up @@ -160,6 +162,22 @@ dependencies {
// SceneView
implementation 'io.github.sceneview:arsceneview:2.0.2'

//exoplayer -> media3
implementation 'androidx.media3:media3-exoplayer:1.2.1'
implementation 'androidx.media3:media3-exoplayer-dash:1.2.1'
implementation 'androidx.media3:media3-ui:1.2.1'

//이미지 확대 : https://github.com/Baseflow/PhotoView
implementation 'com.github.chrisbanes:PhotoView:2.3.0'

//firebase
implementation platform('com.google.firebase:firebase-bom:32.7.2')
implementation 'com.google.firebase:firebase-analytics'
implementation 'com.google.firebase:firebase-messaging-ktx'
implementation 'com.google.firebase:firebase-crashlytics'

// Event Bus : https://github.com/greenrobot/EventBus
implementation("org.greenrobot:eventbus:3.3.1")
}
kapt {
correctErrorTypes true
Expand Down
73 changes: 53 additions & 20 deletions frontend/ARchive/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,13 @@
xmlns:tools="http://schemas.android.com/tools">

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.CAMERA" /> <!-- Sceneform requires OpenGL ES 3.0 or later. -->
<uses-permission android:name="android.permission.READ_CONTACTS" />
<uses-permission
android:name="android.permission.POST_NOTIFICATIONS"
android:minSdkVersion="33" />

<uses-feature
android:glEsVersion="0x00030000"
Expand All @@ -28,18 +32,33 @@
android:theme="@style/Theme.ARchive"
android:usesCleartextTraffic="true"
tools:targetApi="31">

<activity android:name="com.kakao.sdk.auth.AuthCodeHandlerActivity"
<activity
android:name=".presentation.ui.ErrorActivity"
android:exported="false" />
<activity
android:name=".presentation.ui.permission.PermissionActivity"
android:exported="false" />
<activity
android:name=".presentation.ui.capsule.ImagesActivity"
android:exported="false" />
<activity
android:name=".presentation.ui.capsule.VideoActivity"
android:exported="false" />
<activity
android:name="com.kakao.sdk.auth.AuthCodeHandlerActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.VIEW" />

<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:host="oauth"

<data
android:host="oauth"
android:scheme="kakao${KAKAO_NATIVE_APP_KEY}" />
</intent-filter>
</activity>

<meta-data
android:name="com.naver.maps.map.CLIENT_ID"
android:value="${NAVER_CLIENT_ID}" />
Expand All @@ -49,61 +68,75 @@
android:exported="false"
android:screenOrientation="portrait"
tools:ignore="LockedOrientationActivity" />

<activity
android:name=".presentation.ui.home.createcapsule.CreateCapsuleActivity"
android:exported="false"
android:windowSoftInputMode="adjustNothing"
android:screenOrientation="portrait"
android:windowSoftInputMode="adjustPan"
tools:ignore="LockedOrientationActivity" />

<activity
android:name=".presentation.ui.skin.skinmake.SkinMakeActivity"
android:exported="false"
android:screenOrientation="portrait"
tools:ignore="LockedOrientationActivity" />

<activity
android:name=".presentation.ui.MainActivity"
android:exported="true"
android:screenOrientation="portrait"
tools:ignore="LockedOrientationActivity">

tools:ignore="LockedOrientationActivity"
android:launchMode="singleTask">
</activity>

<activity
android:name=".presentation.ui.auth.AuthActivity"
android:windowSoftInputMode="adjustResize"
android:screenOrientation="portrait"
tools:ignore="LockedOrientationActivity"/>

android:windowSoftInputMode="adjustResize"
tools:ignore="LockedOrientationActivity" />
<activity
android:name=".presentation.ui.splash.SplashActivity"
android:exported="true"
android:screenOrientation="portrait"
tools:ignore="LockedOrientationActivity"
android:exported="true">
tools:ignore="LockedOrientationActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>

<meta-data
android:name="com.google.firebase.messaging.default_notification_icon"
android:resource="@drawable/app_symbol" />
<!-- Set color used with incoming notification messages. This is used when no color is set for the incoming
notification message. See README(https://goo.gl/6BKBk7) for more. -->

<meta-data
android:name="com.google.android.ar.API_KEY"
android:value="${GOOGLE_APP_KEY}" />
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="${GOOGLE_APP_KEY}" />

<service android:name="com.google.android.gms.metadata.ModuleDependencies"
<service
android:name="com.google.android.gms.metadata.ModuleDependencies"
android:enabled="false"
android:exported="false"
tools:ignore="MissingClass">
<intent-filter>
<action android:name="com.google.android.gms.metadata.MODULE_DEPENDENCIES" />
</intent-filter>
<meta-data android:name="photopicker_activity:0:required" android:value="" />

<meta-data
android:name="photopicker_activity:0:required"
android:value="" />
</service>
<service
android:name=".util.MyFirebaseMessagingService"
android:enabled="true"
android:exported="true"
android:stopWithTask="false">
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT" />
</intent-filter>
</service>

</application>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,21 @@ package com.droidblossom.archive
import android.annotation.SuppressLint
import android.app.Application
import android.content.Context
import android.content.SharedPreferences
import android.content.Intent
import android.os.Process
import androidx.annotation.StringRes
import androidx.lifecycle.DefaultLifecycleObserver
import androidx.lifecycle.LifecycleOwner
import com.droidblossom.archive.util.DataStoreUtils
import com.droidblossom.archive.presentation.ui.ErrorActivity
import com.droidblossom.archive.util.ExceptionHandler
import com.droidblossom.archive.util.NetworkStatusChecker
import com.droidblossom.archive.util.SharedPreferencesUtils
import com.kakao.sdk.common.KakaoSdk
import dagger.hilt.android.HiltAndroidApp
import kotlinx.coroutines.DelicateCoroutinesApi
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.GlobalScope
import kotlinx.coroutines.launch
import kotlin.system.exitProcess


@HiltAndroidApp
Expand All @@ -21,7 +27,9 @@ class ARchiveApplication : Application(), DefaultLifecycleObserver {
context = applicationContext
networkConnectionChecker = NetworkStatusChecker(context)
KakaoSdk.init(this, BuildConfig.KAKAO_NATIVE_APP_KEY)

//setCrashHandler()
Thread.setDefaultUncaughtExceptionHandler { _, _ -> caughtException() }
dummyCoroutines()

// 키 값 알아내기
// AppSignatureHelper(this@ARchiveApplication).apply {
Expand All @@ -31,6 +39,42 @@ class ARchiveApplication : Application(), DefaultLifecycleObserver {
// Kakao Sdk 초기화
}

@OptIn(DelicateCoroutinesApi::class)
private fun dummyCoroutines(){
GlobalScope.launch(Dispatchers.Default) {

GlobalScope.launch(Dispatchers.IO) {}

GlobalScope.launch(Dispatchers.Main) {}

GlobalScope.launch(Dispatchers.Unconfined) {}

}
}

private fun setCrashHandler() {
val crashlyticsExceptionHandler = Thread.getDefaultUncaughtExceptionHandler() ?: return
Thread.setDefaultUncaughtExceptionHandler(
ExceptionHandler(
this,
crashlyticsExceptionHandler
)
)
}

private fun caughtException(){
startErrorActivity()
Process.killProcess(Process.myPid())
exitProcess(-1)
}

private fun startErrorActivity(){
val intent = Intent(this, ErrorActivity::class.java)
intent.flags = Intent.FLAG_ACTIVITY_NEW_TASK
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK)
startActivity(intent)
}

override fun onStop(owner: LifecycleOwner) {
networkConnectionChecker.unregister()
super.onStop(owner)
Expand All @@ -53,6 +97,8 @@ class ARchiveApplication : Application(), DefaultLifecycleObserver {
private lateinit var networkConnectionChecker: NetworkStatusChecker
fun isOnline() = networkConnectionChecker.isOnline()

fun getContext() : Context = context

}

// private fun getHashKey() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package com.droidblossom.archive.data.dto.capsule_skin.request

import java.io.File

data class CapsuleSkinsMakeRequestDto (
val name : String,
val skinImage : File,
val motionName : String
val skinName : String,
val imageUrl : String,
val directory : String,
val motionName : String?,
val retarget : String?
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package com.droidblossom.archive.data.dto.capsule_skin.response

import com.droidblossom.archive.domain.model.capsule_skin.CapsuleSkinsMakeResponse

data class CapsuleSkinsMakeResponseDto(
val status : String,
val result : String
){
fun toModel() = CapsuleSkinsMakeResponse(
status = this.status,
result = this.result
)
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package com.droidblossom.archive.data.dto.member.request

data class FcmTokenRequsetDto(
val fcmToken: String
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package com.droidblossom.archive.data.dto.member.request

data class NotificationEnabledRequestDto(
val notificationEnabled: Boolean
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package com.droidblossom.archive.data.dto.member.response

import com.droidblossom.archive.domain.model.member.NotificationModel

data class NoficationListResponseDto(
val createdAt: String,
val imageUrl: String,
val text: String,
val title: String
) {
fun toModel() = NotificationModel(
createdAt = this.createdAt,
imageUrl = this.imageUrl,
text = this.text,
title = this.title
)
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package com.droidblossom.archive.data.dto.member.response

import com.droidblossom.archive.domain.model.member.NotificationPage

data class NotificationResponseDto(
val hasNext: Boolean,
val responseList: List<NoficationListResponseDto>
){
fun toModel() = NotificationPage(
hasNext = this.hasNext,
notifications = this.responseList.map { it.toModel() }
)
}
Loading

0 comments on commit c8602df

Please sign in to comment.