Bildirim.setLatestEventInfo (bu, TAG, ileti, contentIntent) yönteminde bulunamadı yöntemini alıyorum. build.grade'yi değiştirmek zorunda mıyım?notification.setLatestEventInfo bulunamadı
private void displayNotificationMessage(String message) {
Notification notification = new Notification(R.drawable.emo_im_winking,
message, System.currentTimeMillis());
notification.flags = Notification.FLAG_NO_CLEAR;
PendingIntent contentIntent =
PendingIntent.getActivity(this, 0, new Intent(this, MainActivity.class), 0);
notification.setLatestEventInfo(this, TAG, message, contentIntent);
notificationMgr.notify(0, notification);
}
Bu benim şimdiki build.grade geçerli:
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
defaultConfig {
applicationId "com.androidbook.services.simplelocalservice"
minSdkVersion 19
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.android.support:design:23.1.1'
}
19. api kullanmam gerekiyordu. Bu yüzden "setLatestEventInfo" kullanmalıyım. Gradle.build'i 19 olarak değiştirdiğimde neden hala hata yöntemini aldığımı bilmiyorum. – user1272936