I've seen in the Android documentation and other sites (including this one) that it's possible to create a channel and use NotificationCompat but I'm not getting it. I'm about to go crazy trying to make this work.
Using android.support.v7.app.NotificationCompat
or android.support.v4.app.NotificationCompat
Android Studio show: "Builder(Context) in Builder cannot be applied to (Context, String)"
notificationBuilder = new NotificationCompat.Builder(this, idNoti);// here
It does not even show me a deprecation message of NotificationCompat if I only use Builder(Context).
My build.gradle file:
android {
compileSdkVersion 26
buildToolsVersion '26.0.1'
defaultConfig {
minSdkVersion 21
targetSdkVersion 26
...
}
...
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:design:26.0.0-alpha1'
...
}
I'm using the latest version of Android Studio (2.3.3) on a Mac. I need to use NotificationCompat.