Skip to content
This repository has been archived by the owner on Jun 20, 2023. It is now read-only.

Remove ExposureNotificationIntentService #40

Merged
merged 1 commit into from
May 30, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions Corona-Warn-App/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,6 @@
android:exported="false"
android:screenOrientation="fullSensor"
tools:replace="screenOrientation" />

<service
android:name=".notification.ExposureNotificationIntentService"
android:enabled="true"
android:exported="false"
android:permission="android.permission.BIND_JOB_SERVICE" />

</application>

</manifest>

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
package de.rki.coronawarnapp.ui.main

import android.content.Intent
import android.os.Bundle
import android.util.Log
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.PopupMenu
import android.widget.Toast
import androidx.core.app.NotificationCompat
import androidx.core.app.NotificationManagerCompat
import androidx.fragment.app.activityViewModels
import de.rki.coronawarnapp.R
import de.rki.coronawarnapp.databinding.FragmentMainBinding
import de.rki.coronawarnapp.notification.ExposureNotificationIntentService
import de.rki.coronawarnapp.notification.NotificationHelper
import de.rki.coronawarnapp.timer.TimerHelper
import de.rki.coronawarnapp.ui.BaseFragment
Expand Down Expand Up @@ -152,8 +151,11 @@ class MainFragment : BaseFragment() {
.toString()
)
NotificationHelper.createNotificationChannel()
val intent = Intent(context, ExposureNotificationIntentService::class.java)
activity?.startService(intent)
NotificationHelper.sendNotification(
getString(R.string.notification_headline),
getString(R.string.notification_body),
NotificationCompat.PRIORITY_HIGH
)
true
}
else -> super.onOptionsItemSelected(it)
Expand Down