Skip to content
This repository has been archived by the owner on Nov 14, 2018. It is now read-only.

For System Services #178

Closed
yongjhih opened this issue Feb 6, 2018 · 2 comments
Closed

For System Services #178

yongjhih opened this issue Feb 6, 2018 · 2 comments

Comments

@yongjhih
Copy link

yongjhih commented Feb 6, 2018

Before:

NotificationManager notificationManager = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);

After:

val notificationManager = context.getNotificationManager()

ref. https://github.com/yongjhih/kotlin-extensions/blob/master/kotlinx-android-system-services/src/main/kotlin/kotlinx/android/system/services/SystemServicesExt.kt

@paour
Copy link

paour commented Feb 6, 2018

It's implemented as Context.getSystemService().

@romainguy
Copy link
Collaborator

As paour mentionned, it's already implemented.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants