DougSteiert / ResearchApp

GNU General Public License v3.0
1 stars 1 forks source link

Cannot start mock locations after leaving mobility trace visualizer #5

Closed user404d closed 7 years ago

user404d commented 7 years ago

The flow is something like this: -> start mock locations -> view mobility trace -> return to main activity -> notification appears that mock locations service has stopped -> attempt to start mock locations -> application crashes


                  Process: com.djsg38.locationprivacyapp, PID: 5452
                  java.lang.IllegalArgumentException: Service not registered: com.djsg38.locationprivacyapp.MainActivity$6@667802b
                      at android.app.LoadedApk.forgetServiceDispatcher(LoadedApk.java:1044)
                      at android.app.ContextImpl.unbindService(ContextImpl.java:1337)
                      at android.content.ContextWrapper.unbindService(ContextWrapper.java:616)
                      at com.djsg38.locationprivacyapp.MainActivity$2.onClick(MainActivity.java:114)
                      at android.view.View.performClick(View.java:5198)
                      at android.view.View$PerformClick.run(View.java:21147)
                      at android.os.Handler.handleCallback(Handler.java:739)
                      at android.os.Handler.dispatchMessage(Handler.java:95)
                      at android.os.Looper.loop(Looper.java:148)
                      at android.app.ActivityThread.main(ActivityThread.java:5417)
                      at java.lang.reflect.Method.invoke(Native Method)
                      at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
                      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)```
DougSteiert commented 7 years ago

MainActivity leaks ServiceConnection****

Happens when you run the service then try do any other button.

user404d commented 7 years ago

Only seems to happen when pressing the back arrow in the toolbar at the top of the window. If you press the back button then there aren't any issues and the service continues to run as expected.