Skip to content
This repository has been archived by the owner on Jan 18, 2024. It is now read-only.

Problem with screen orientation change #23

Open
5 tasks done
Marky25 opened this issue Nov 19, 2018 · 1 comment
Open
5 tasks done

Problem with screen orientation change #23

Marky25 opened this issue Nov 19, 2018 · 1 comment

Comments

@Marky25
Copy link

Marky25 commented Nov 19, 2018

Prerequisites

  • Put an X between the brackets on this line if you have done all of the following:
    • My beacons have Estimote Location packet enabled (Check it in the Estimote Cloud, or via app)
    • My Android device/devices supports BLE and has Android OS version >= 5.0.0
    • My Android device/devices have bluetooth enabled
    • My app has Location Permissions granted

Basic information

Estimote SDK version: com.estimote:indoorsdk:2.5.4

Android devices affected: Huawei P9

Android OS version affected: Android 7.0

Beacon hardware version: F3.3

Description

[Description of the issue]

I was using previous versions of your indoorsdk (2.4.0) and didn't noticed this behavior before. I am initializing indoorLocationManager in onCreate of my application activity just like it is in your sample app. When I change screen orientation to landscape, everithing looks OK. But when I put phone back to portrait screen orientation, application will crash.

  1. Run application with indoorsdk initialized in onCreate
  2. Switch phone to landscape
  3. Switch phone back to portrait

Expected behavior: It would be great, if change of screen orientation will not result in app crash.

Actual behavior: Currently, using indoorsdk 2.5.3 and changing screen orientation will result in app crash.

(Optional) Additional information

java.lang.IllegalArgumentException: Service not registered: com.estimote.scanning_plugin.packet_provider.service.PacketProviderWrapperServiceHelper$createServiceConnection$1@5e39d14
W/System.err:     at android.app.LoadedApk.forgetServiceDispatcher(LoadedApk.java:1407)
W/System.err:     at android.app.ContextImpl.unbindService(ContextImpl.java:1657)
W/System.err:     at android.content.ContextWrapper.unbindService(ContextWrapper.java:648)
W/System.err:     at com.estimote.scanning_plugin.packet_provider.service.PacketProviderWrapperServiceHelper$packetProviderLoader$1$1.cancel(PacketProviderWrapperServiceHelper.kt:28)
W/System.err:     at io.reactivex.internal.disposables.CancellableDisposable.dispose(CancellableDisposable.java:49)
W/System.err:     at io.reactivex.internal.disposables.DisposableHelper.dispose(DisposableHelper.java:125)
W/System.err:     at io.reactivex.internal.operators.observable.ObservableCreate$CreateEmitter.dispose(ObservableCreate.java:122)
W/System.err:     at io.reactivex.internal.disposables.DisposableHelper.dispose(DisposableHelper.java:125)
W/System.err:     at io.reactivex.internal.operators.observable.ObservableReplay$ReplayObserver.dispose(ObservableReplay.java:276)
W/System.err:     at io.reactivex.disposables.CompositeDisposable.dispose(CompositeDisposable.java:217)
W/System.err:     at io.reactivex.disposables.CompositeDisposable.dispose(CompositeDisposable.java:80)
W/System.err:     at io.reactivex.internal.operators.observable.ObservableRefCount$DisposeTask.run(ObservableRefCount.java:219)
W/System.err:     at io.reactivex.disposables.RunnableDisposable.onDisposed(RunnableDisposable.java:30)
W/System.err:     at io.reactivex.disposables.RunnableDisposable.onDisposed(RunnableDisposable.java:20)
W/System.err:     at io.reactivex.disposables.ReferenceDisposable.dispose(ReferenceDisposable.java:43)
W/System.err:     at io.reactivex.internal.operators.observable.ObservableRefCount$ConnectionObserver.dispose(ObservableRefCount.java:151)
W/System.err:     at io.reactivex.internal.operators.observable.ObservableFlatMap$MergeObserver.disposeAll(ObservableFlatMap.java:503)
W/System.err:     at io.reactivex.internal.operators.observable.ObservableFlatMap$MergeObserver.dispose(ObservableFlatMap.java:307)
W/System.err:     at io.reactivex.internal.disposables.DisposableHelper.dispose(DisposableHelper.java:125)
W/System.err:     at io.reactivex.internal.observers.LambdaObserver.dispose(LambdaObserver.java:100)
W/System.err:     at com.estimote.scanning_plugin.api.use_cases.RxScanHandler.stop(RxScanHandler.kt:10)
        at com.estimote.indoorsdk_module.algorithm.c.a(Unknown Source)
W/System.err:     at com.estimote.indoorsdk_module.algorithm.c.stopPositioning(Unknown Source)
        at sk.test.activities.MainActivity.onDestroy(MainActivity.kt:157)
W/System.err:     at android.app.Activity.performDestroy(Activity.java:7141)
W/System.err:     at android.app.Instrumentation.callActivityOnDestroy(Instrumentation.java:1158)
W/System.err:     at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:4385)
W/System.err:     at android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:4417)
W/System.err:     at android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:4696)
W/System.err:     at android.app.ActivityThread.-wrap20(ActivityThread.java)
W/System.err:     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1573)
W/System.err:     at android.os.Handler.dispatchMessage(Handler.java:105)
W/System.err:     at android.os.Looper.loop(Looper.java:156)
W/System.err:     at android.app.ActivityThread.main(ActivityThread.java:6523)
W/System.err:     at java.lang.reflect.Method.invoke(Native Method)
W/System.err:     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:942)
W/System.err:     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:832)
E/AndroidRuntime: FATAL EXCEPTION: main
    Process: sk.test, PID: 23771
    java.lang.IllegalArgumentException: Service not registered: com.estimote.scanning_plugin.packet_provider.service.PacketProviderWrapperServiceHelper$createServiceConnection$1@5e39d14
        at android.app.LoadedApk.forgetServiceDispatcher(LoadedApk.java:1407)
        at android.app.ContextImpl.unbindService(ContextImpl.java:1657)
        at android.content.ContextWrapper.unbindService(ContextWrapper.java:648)
        at com.estimote.scanning_plugin.packet_provider.service.PacketProviderWrapperServiceHelper$packetProviderLoader$1$1.cancel(PacketProviderWrapperServiceHelper.kt:28)
        at io.reactivex.internal.disposables.CancellableDisposable.dispose(CancellableDisposable.java:49)
        at io.reactivex.internal.disposables.DisposableHelper.dispose(DisposableHelper.java:125)
        at io.reactivex.internal.operators.observable.ObservableCreate$CreateEmitter.dispose(ObservableCreate.java:122)
        at io.reactivex.internal.disposables.DisposableHelper.dispose(DisposableHelper.java:125)
        at io.reactivex.internal.operators.observable.ObservableReplay$ReplayObserver.dispose(ObservableReplay.java:276)
        at io.reactivex.disposables.CompositeDisposable.dispose(CompositeDisposable.java:217)
        at io.reactivex.disposables.CompositeDisposable.dispose(CompositeDisposable.java:80)
        at io.reactivex.internal.operators.observable.ObservableRefCount$DisposeTask.run(ObservableRefCount.java:219)
        at io.reactivex.disposables.RunnableDisposable.onDisposed(RunnableDisposable.java:30)
        at io.reactivex.disposables.RunnableDisposable.onDisposed(RunnableDisposable.java:20)
        at io.reactivex.disposables.ReferenceDisposable.dispose(ReferenceDisposable.java:43)
        at io.reactivex.internal.operators.observable.ObservableRefCount$ConnectionObserver.dispose(ObservableRefCount.java:151)
        at io.reactivex.internal.operators.observable.ObservableFlatMap$MergeObserver.disposeAll(ObservableFlatMap.java:503)
        at io.reactivex.internal.operators.observable.ObservableFlatMap$MergeObserver.dispose(ObservableFlatMap.java:307)
        at io.reactivex.internal.disposables.DisposableHelper.dispose(DisposableHelper.java:125)
        at io.reactivex.internal.observers.LambdaObserver.dispose(LambdaObserver.java:100)
        at com.estimote.scanning_plugin.api.use_cases.RxScanHandler.stop(RxScanHandler.kt:10)
        at com.estimote.indoorsdk_module.algorithm.c.a(Unknown Source)
        at com.estimote.indoorsdk_module.algorithm.c.stopPositioning(Unknown Source)
        at sk.test.activities.MainActivity.onDestroy(MainActivity.kt:157)
        at android.app.Activity.performDestroy(Activity.java:7141)
        at android.app.Instrumentation.callActivityOnDestroy(Instrumentation.java:1158)
        at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:4385)
        at android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:4417)
        at android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:4696)
        at android.app.ActivityThread.-wrap20(ActivityThread.java)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1573)
        at android.os.Handler.dispatchMessage(Handler.java:105)
        at android.os.Looper.loop(Looper.java:156)
        at android.app.ActivityThread.main(ActivityThread.java:6523)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:942)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:832)
@Marky25
Copy link
Author

Marky25 commented Dec 4, 2018

Any suggestions on this one ?

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

1 participant