Instead of Notification, which doesn't appear to work on older android
releases.
Signed-off-by: Keith Packard <keithp@keithp.com>
dependencies {
implementation 'androidx.appcompat:appcompat:1.0.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
+ implementation 'androidx.core:core:1.2.0'
implementation 'com.google.android.gms:play-services-maps:17.0.0'
implementation fileTree(dir: 'libs', include: ['*.jar'])
}
-
import android.content.Context;
import android.os.*;
import android.widget.Toast;
+import androidx.core.app.NotificationCompat;
import org.altusmetrum.altoslib_13.*;
: "";
// Create notification to be displayed while the service runs
- Notification notification = new Notification.Builder(this, channelId)
+ Notification notification = new NotificationCompat.Builder(this, channelId)
.setContentTitle(getText(R.string.telemetry_service_label))
.setContentText(getText(R.string.telemetry_service_started))
.setContentIntent(contentIntent)