안녕하세요 초보개발자입니다.
죽지 않는 서비스를 구현해서 beacon 검색하는 앱을 만들고 있습니다.
mainActivity onResume에서 startService 후 bindService 를 해줍니다.
그리고 onPause 에서 unbindService를 해주는데요
홈버튼 눌러서 나가거나 다른 액티비티가 뜨면서 onPause가 불리면 이상이 없는데..
뒤로가기해서 앱을 종료 할 때 unbind 부분에서 서비스가 등록되지 않았다는 exception이 발생됩니다.

Process: com.neonex.lbs, PID: 8897
java.lang.RuntimeException: Unable to destroy activity {com.neonex.lbs/com.neonex.lbs.MainActivity}: java.lang.IllegalArgumentException: Service not registered: com.neonex.lbs.MainActivity$1@ae735c3
at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:3874)
at android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:3892)
at android.app.ActivityThread.access$1500(ActivityThread.java:157)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1410)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5525)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:730)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:620)
Caused by: java.lang.IllegalArgumentException: Service not registered: com.neonex.lbs.MainActivity$1@ae735c3
at android.app.LoadedApk.forgetServiceDispatcher(LoadedApk.java:1088)
at android.app.ContextImpl.unbindService(ContextImpl.java:1339)
at android.content.ContextWrapper.unbindService(ContextWrapper.java:616)
at com.neonex.lbs.MainActivity.onDestroy(MainActivity.java:340)
at android.app.Activity.performDestroy(Activity.java:6442)
at ....................
익셉션 내용입니다.
구글링을 해봐도 잘 안나오네요..
도움좀 주시면 감사하겠습니다!