Exception java.lang.RuntimeException: Unable to create service io.treehouses.remote.network.BluetoothChatService: java.lang.SecurityException: io.treehouses.remote: One of RECEIVER_EXPORTED or RECEIVER_NOT_EXPORTED should be specified when a receiver isn't being registered exclusively for system broadcasts
at android.app.ActivityThread.handleCreateService (ActivityThread.java:4664)
at android.app.ActivityThread.-$$Nest$mhandleCreateService
at android.app.ActivityThread$H.handleMessage (ActivityThread.java:2264)
at android.os.Handler.dispatchMessage (Handler.java:106)
at android.os.Looper.loopOnce (Looper.java:205)
at android.os.Looper.loop (Looper.java:294)
at android.app.ActivityThread.main (ActivityThread.java:8177)
at java.lang.reflect.Method.invoke
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:552)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:971)
Caused by java.lang.SecurityException: io.treehouses.remote: One of RECEIVER_EXPORTED or RECEIVER_NOT_EXPORTED should be specified when a receiver isn't being registered exclusively for system broadcasts
at android.os.Parcel.createExceptionOrNull (Parcel.java:3057)
at android.os.Parcel.createException (Parcel.java:3041)
at android.os.Parcel.readException (Parcel.java:3024)
at android.os.Parcel.readException (Parcel.java:2966)
at android.app.IActivityManager$Stub$Proxy.registerReceiverWithFeature (IActivityManager.java:5684)
at android.app.ContextImpl.registerReceiverInternal (ContextImpl.java:1852)
at android.app.ContextImpl.registerReceiver (ContextImpl.java:1792)
at android.app.ContextImpl.registerReceiver (ContextImpl.java:1780)
at android.content.ContextWrapper.registerReceiver (ContextWrapper.java:755)
at io.treehouses.remote.network.BluetoothChatService.onCreate (BluetoothChatService.kt:108)
at android.app.ActivityThread.handleCreateService (ActivityThread.java:4651)
Caused by android.os.RemoteException: Remote stack trace:
at com.android.server.am.ActivityManagerService.registerReceiverWithFeature (ActivityManagerService.java:13908)
at android.app.IActivityManager$Stub.onTransact (IActivityManager.java:2570)
at com.android.server.am.ActivityManagerService.onTransact (ActivityManagerService.java:2720)
at android.os.Binder.execTransactInternal (Binder.java:1339)
at android.os.Binder.execTransact (Binder.java:1275)