From 1f69f5fb4ad5bfcbf850e22c45a580d363d61dcd Mon Sep 17 00:00:00 2001 From: serensis Date: Fri, 28 Aug 2020 23:36:59 +0900 Subject: [PATCH 1/2] =?UTF-8?q?=EB=A6=AC=EB=93=9C=EB=AF=B8=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 6a396c0..7a3add7 100644 --- a/README.md +++ b/README.md @@ -58,10 +58,25 @@ ## Week 2 ### 채팅 프로젝트 만들기 - ![image](https://user-images.githubusercontent.com/22374750/90979282-0b3f4000-e58f-11ea-91f3-57298ba9601f.png) +### 이미지 인식 +#### 사용된 Android 기능 및 기술 +- CameraX: https://developer.android.com/training/camerax + -- 카메라 priview와 캡쳐 기능 사용 +- Navigation: https://developer.android.com/guide/navigation + -- 카메라의 프리뷰와 캡쳐 결과 화면, 퍼미션 화면간 이동에 사용 +- TensorFlow Lite: https://developer.android.com/ml + -- 사용된 tf lite 용 모델 및 예제 + 1. 새 이미지 인식 (TF 허브) :https://tfhub.dev/google/aiy/vision/classifier/birds_V1/1 + 2. 이미지 인식 (TF 허브) :https://tfhub.dev/tensorflow/lite-model/efficientnet/lite4/fp32/1 + 3. 스케치 인식 : https://github.com/jtheiner/SketchRecognition/ +- ML binding: https://developer.android.com/studio/preview/features?hl=fr#tensor-flow-lite-models + -- tflite 모델 바인딩에 사용 + + ## Week 3 ### 스테이지 & 뱃지함 리스트 추가 ![image](https://user-images.githubusercontent.com/22374750/91059945-4f9d0f80-e665-11ea-902f-347f73792a88.png) + From 3f92aa1054ad99aa4c98557f261a70008766b2ce Mon Sep 17 00:00:00 2001 From: serensis Date: Sat, 29 Aug 2020 02:51:53 +0900 Subject: [PATCH 2/2] =?UTF-8?q?=EB=85=B8=ED=8B=B0=EB=A1=9C=20=ED=99=94?= =?UTF-8?q?=EB=A9=B4=EC=97=90=20=EB=93=A4=EC=96=B4=20=EC=98=AC=EB=95=8C?= =?UTF-8?q?=EB=A7=88=EB=8B=A4=20=EC=B5=9C=EA=B7=BC=ED=99=94=EB=A9=B4=20?= =?UTF-8?q?=EB=AA=A9=EB=A1=9D=EC=97=90=20=EB=82=A8=EC=A7=80=EC=95=8A?= =?UTF-8?q?=EA=B2=8C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hbs/burnout/utils/NotificationHelper.kt | 20 ++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/app/src/main/java/com/hbs/burnout/utils/NotificationHelper.kt b/app/src/main/java/com/hbs/burnout/utils/NotificationHelper.kt index 0710e13..46a5a7a 100644 --- a/app/src/main/java/com/hbs/burnout/utils/NotificationHelper.kt +++ b/app/src/main/java/com/hbs/burnout/utils/NotificationHelper.kt @@ -6,7 +6,6 @@ import android.content.Intent import android.content.pm.ShortcutInfo import android.content.pm.ShortcutManager import android.graphics.drawable.Icon -import android.util.Log import com.hbs.burnout.R import com.hbs.burnout.ui.chat.ChattingActivity import java.util.* @@ -39,8 +38,9 @@ class NotificationHelper { val notificationManager: NotificationManager? = context.getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager? val target = Intent(context, ChattingActivity::class.java).apply { putExtra(ActivityNavigation.STAGE_ROUND, stageNumber) + flags = Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS //or Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_SINGLE_TOP } - val bubbleIntent = PendingIntent.getActivity(context, 0, target, PendingIntent.FLAG_UPDATE_CURRENT /* flags */) + val bubbleIntent = PendingIntent.getActivity(context, 0, target, PendingIntent.FLAG_ONE_SHOT /* flags */) val icon = Icon.createWithResource(context, R.mipmap.ic_launcher_round) val bubbleData = Notification.BubbleMetadata.Builder(bubbleIntent, icon) @@ -55,18 +55,18 @@ class NotificationHelper { .setBot(true) .setName("Burnout") .setImportant(true) + .setIcon(icon) .build() val notification = Notification.Builder(context, NotificationConfiguration.CHANNEL_ID) .setContentIntent(bubbleIntent) - .setContentTitle("새로운 미션 진행") - .setContentText("버블 알림을 통해서 미션을 확인해보세요") .setSmallIcon(R.mipmap.ic_launcher) .setBubbleMetadata(bubbleData) .addPerson(person) .setCategory(Notification.CATEGORY_MESSAGE) .setShowWhen(true) - .setStyle(Notification.MessagingStyle(person)) + .setStyle(Notification.MessagingStyle(person) .setGroupConversation(false) + .addMessage("버블 알림을 통해서 미션을 확인해보세요", Date().time, person)) .setWhen(Date().time).build() notificationManager?.notify(NotificationConfiguration.NOTIFICATION_ID, notification) @@ -74,7 +74,7 @@ class NotificationHelper { } - fun updateShortcuts(context: Context, stageNumber:Int) { + fun updateShortcuts(context: Context, stageNumber: Int) { if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.O) { val shortcutManager: ShortcutManager = context.getSystemService(ShortcutManager::class.java) val icon = Icon.createWithResource(context, R.mipmap.ic_launcher_round) @@ -82,7 +82,13 @@ class NotificationHelper { .setShortLabel("미션${stageNumber}으로 이동하기") .setLongLabel("미션${stageNumber}으로 이동하기") .setIcon(icon) - .setIntent(Intent(context, ChattingActivity::class.java).setAction(Intent.ACTION_VIEW).putExtra(ActivityNavigation.STAGE_ROUND, stageNumber)) + .setIntent( + Intent(context, ChattingActivity::class.java).setAction(Intent.ACTION_VIEW) + .putExtra( + ActivityNavigation.STAGE_ROUND, + stageNumber + ) + ) .build() shortcutManager.dynamicShortcuts = listOf(shortcut)