diff --git a/app/src/main/kotlin/jackall/moncalc/service/MainService.kt b/app/src/main/kotlin/jackall/moncalc/service/MainService.kt index f62d6f2..2136e3e 100644 --- a/app/src/main/kotlin/jackall/moncalc/service/MainService.kt +++ b/app/src/main/kotlin/jackall/moncalc/service/MainService.kt @@ -1,5 +1,6 @@ package jackall.moncalc.service +import android.app.PendingIntent import android.app.Service import android.content.Context import android.content.Intent @@ -12,6 +13,7 @@ import android.view.* import jackall.moncalc.Const import jackall.moncalc.R +import jackall.moncalc.activity.MainActivity import jackall.moncalc.adapter.CustomSpinnerAdapter import jackall.moncalc.common.PreferenceKeys import jackall.moncalc.common.PreferenceNames @@ -55,6 +57,7 @@ val notificationBuilder = NotificationCompat.Builder(this, Const.serviceChannelId) .setContentTitle("mainService") // TODO:タイトルをセット .setSmallIcon(R.mipmap.ic_launcher) // TODO:白抜きのアイコンをセット + notificationBuilder.setContentIntent(PendingIntent.getActivity(this, 0, Intent(this, MainActivity::class.java), PendingIntent.FLAG_UPDATE_CURRENT)) startForeground(Const.notificationId, notificationBuilder.build()) setMoveViewConfig()