पर नहीं दिखा रहा है मैंने हाल ही में एपीआई 26 में अपना ऐप अपडेट किया है, और अधिसूचनाएं कोड को बदलने के बिना काम नहीं कर रही हैं।एंड्रॉइड अधिसूचना एपीआई 26
val notification = NotificationCompat.Builder(this)
.setSmallIcon(R.drawable.ic_notification)
.setContentTitle("Title")
.setContentText("Text")
.build()
(getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager).notify(1, notification)
यह क्यों काम नहीं कर रहा है? क्या एपीआई में कुछ बदलाव आया था जिसके बारे में मुझे पता नहीं है?
आपका 'targetSdkVersion' क्या है? – CommonsWare
@ कॉमन्सवेयर 'targetSdkVersion' 26, 'minSdkVersion' 21,' compileSdkVersion' 26, और 'buildToolsVersion' 26.0.0। मैं इसे एंड्रॉइड ओ डीपी 3 चलाने वाले फोन पर भी चला रहा हूं। – Aaron