Q:

error: getSystemServise unresolved reference - kotlin android studio

hay im new in kotlin and i try to push notification in my app. 
Unfortunately I'm having this error: "getSystemServise unresolved reference"
this is my code:
        val intent = Intent()
        val pendingIntent = PendingIntent.getActivity(this.activity,0,intent,0)
        val notification = Notification. Builder(this.activity)
                .setContentTitle("time is:")
                .setContentText("text")
                .setSmallIcon(R.drawable.notification_icon_background)
                .setContentIntent(pendingIntent)

        val nm:NotificationManager = getSystemService(Context. NOTIFICATION_SERVICE);
        nm.notify(0,notification.build())

thanks for helpers

A:

I assume your code is inside a Fragment and that's why you reference this.activity in it multiple times.  As getSystemService() is a method on the Context class, you need a Context instance to call it on.  You can get one by either using getContext() or alternatively, the getActivity() which you've already been using (since an Activity is also a Context).  
With Kotlin's property access syntax, this would look something like:
// either of these
this.activity.getSystemService(...)
this.context.getSystemService(...)

Or even just:
// either of these
activity.getSystemService(...)
context.getSystemService(...)

