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

Commit

Permalink
Removed ExposureNotificationIntentService, the functionality is handl…
Browse files Browse the repository at this point in the history
…ed by NotificationHelper (#40)
  • Loading branch information
htooisap authored May 30, 2020
1 parent a5a6d24 commit c96ede0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 62 deletions.
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

0 comments on commit c96ede0

Please sign in to comment.