openhab-android icon indicating copy to clipboard operation
openhab-android copied to clipboard

Rotate device: App reloads overview-page

Open SHU-red opened this issue 3 years ago β€’ 39 comments

Actual behaviour

Example:

  • In local WiFi
  • Open openHAB Android App --> Connected locally
  • Opens openHAB 3 UI
  • Go to custom subpage (e.g. Graph page)
  • Rotate device (e.g. to have a better overview about the shown graphs)
  • App seems to completely reload openHAB 3 UI and jumps back to Overview page
  • I have to navigate the whole way to the custom page i want

Expected behaviour

  • Currently open page stays open and is shown in new screen orientation

Steps to reproduce

  1. Open custom page
  2. Rotate the device

Environment data

Client

  • Android version: 12 beta
  • Device model: Pixel 3a
  • App version : 2.17.3-beta

Logs

App log

Click to expand
-----------------------
Device information
Model: Pixel 3a
Manufacturer: Google
Brand: google
Device: sargo
Product: sargo
OS: 11
Display: 1080x2176, 2.3375 density
Data usage policy: DataUsagePolicy(canDoLargeTransfers=true, loadIconsWithState=true, autoPlayVideos=true, canDoRefreshes=true), data saver: 1, battery saver: false
-----------------------

--------- beginning of events
05-26 09:46:10.364 22698 22698 I wm_on_create_called: [117183046,org.openhab.habdroid.ui.MainActivity,performCreate]
05-26 09:46:10.383 22698 22698 I wm_on_start_called: [117183046,org.openhab.habdroid.ui.MainActivity,handleStartActivity]
05-26 09:46:10.402 22698 22698 I wm_on_resume_called: [117183046,org.openhab.habdroid.ui.MainActivity,RESUME_ACTIVITY]
05-26 09:46:10.427 22698 22698 I wm_on_top_resumed_gained_called: [117183046,org.openhab.habdroid.ui.MainActivity,topStateChangedWhenResumed]
05-26 09:46:26.187 22698 22698 I wm_on_top_resumed_lost_called: [117183046,org.openhab.habdroid.ui.MainActivity,pausing]
05-26 09:46:26.201 22698 22698 I wm_on_paused_called: [117183046,org.openhab.habdroid.ui.MainActivity,performPause]
05-26 09:46:26.206 22698 22698 I wm_on_stop_called: [117183046,org.openhab.habdroid.ui.MainActivity,handleRelaunchActivity]
05-26 09:46:26.325 22698 22698 I wm_on_destroy_called: [117183046,org.openhab.habdroid.ui.MainActivity,performDestroy]
05-26 09:46:26.432 22698 22698 I wm_on_create_called: [117183046,org.openhab.habdroid.ui.MainActivity,performCreate]
05-26 09:46:26.493 22698 22698 I wm_on_start_called: [117183046,org.openhab.habdroid.ui.MainActivity,handleStartActivity]
05-26 09:46:26.524 22698 22698 I wm_on_resume_called: [117183046,org.openhab.habdroid.ui.MainActivity,RESUME_ACTIVITY]
05-26 09:46:26.524 22698 22698 I wm_on_top_resumed_gained_called: [117183046,org.openhab.habdroid.ui.MainActivity,topWhenResuming]
05-26 09:46:30.048 22698 22698 I wm_on_top_resumed_lost_called: [117183046,org.openhab.habdroid.ui.MainActivity,topStateChangedWhenResumed]
05-26 09:46:30.055 22698 22698 I wm_on_paused_called: [117183046,org.openhab.habdroid.ui.MainActivity,performPause]
05-26 09:46:30.138 22698 22698 I wm_on_stop_called: [117183046,org.openhab.habdroid.ui.MainActivity,STOP_ACTIVITY_ITEM]
05-26 09:50:52.910 22698 22698 I wm_on_destroy_called: [117183046,org.openhab.habdroid.ui.MainActivity,performDestroy]
--------- beginning of main
05-26 09:50:53.276 22698 22698 D MainActivity: onCreate()
05-26 09:50:53.318 22698 22698 D ContentController: onRestoreInstanceState()
05-26 09:50:53.318 22698 22698 D PageConnectionHolderFragment: updateActiveConnections: URL list [], connection org.openhab.habdroid.core.connection.DefaultConnection@95ef6ca
05-26 09:50:53.332 22698 22698 D MainActivity: Got intent: Intent { act=org.openhab.habdroid.action.OH3_UI_SELECTED cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=org.openhab.habdroid.beta/org.openhab.habdroid.ui.MainActivity bnds=[859,1336][1028,1529] }
05-26 09:50:53.334 22698 22698 I wm_on_create_called: [117183046,org.openhab.habdroid.ui.MainActivity,performCreate]
05-26 09:50:53.335 22698 22698 D MainActivity: onStart()
05-26 09:50:53.578 22698 22698 D PageConnectionHolderFragment: onStart(), started false
05-26 09:50:53.589 22698 22698 D ServerConfiguration: load: ServerConfiguration(id=2, name=openhabian, localPath=ServerPath(url=http://<openhab-local-address-openhabian>:8080/, userName=<none>, password=<none>), remotePath=ServerPath(url=https://<openhab-remote-address-openhabian>/, userName=<redacted>, password=<redacted>), sslClientCert=null, defaultSitemap=DefaultSitemap(name=uicomponents_page_8ba312a15d, label=New Sitemap), wifiSsid=null)
05-26 09:50:53.591 22698 22698 D ServerConfiguration: load: ServerConfiguration(id=2, name=openhabian, localPath=ServerPath(url=http://<openhab-local-address-openhabian>:8080/, userName=<none>, password=<none>), remotePath=ServerPath(url=https://<openhab-remote-address-openhabian>/, userName=<redacted>, password=<redacted>), sslClientCert=null, defaultSitemap=DefaultSitemap(name=uicomponents_page_8ba312a15d, label=New Sitemap), wifiSsid=null)
05-26 09:50:53.594 22698 22698 D MainActivity: onActiveConnectionChanged()
05-26 09:50:53.629 22698 22698 D ServerConfiguration: load: ServerConfiguration(id=2, name=openhabian, localPath=ServerPath(url=http://<openhab-local-address-openhabian>:8080/, userName=<none>, password=<none>), remotePath=ServerPath(url=https://<openhab-remote-address-openhabian>/, userName=<redacted>, password=<redacted>), sslClientCert=null, defaultSitemap=DefaultSitemap(name=uicomponents_page_8ba312a15d, label=New Sitemap), wifiSsid=null)
05-26 09:50:53.630 22698 22698 D MainActivity: Cannot auto select server: No server with configured wifi
05-26 09:50:53.630 22698 22698 D PageConnectionHolderFragment: updateActiveConnections: URL list [], connection org.openhab.habdroid.core.connection.DefaultConnection@95ef6ca
05-26 09:50:53.631 22698 22698 I wm_on_start_called: [117183046,org.openhab.habdroid.ui.MainActivity,handleStartActivity]
05-26 09:50:53.631 22698 22698 D MainActivity: onPostCreate()
05-26 09:50:53.632 22698 22698 D MainActivity: onResume()
05-26 09:50:53.658 22698 22698 I wm_on_resume_called: [117183046,org.openhab.habdroid.ui.MainActivity,RESUME_ACTIVITY]
05-26 09:50:53.659 22698 22698 I wm_on_top_resumed_gained_called: [117183046,org.openhab.habdroid.ui.MainActivity,topWhenResuming]
05-26 09:50:53.732 22698 22698 I Choreographer: Skipped 65 frames!  The application may be doing too much work on its main thread.
05-26 09:50:53.802 22698 22698 D AbstractWebViewFragment: progressCallback: progress = 10
05-26 09:50:53.803 22698 22698 D AbstractWebViewFragment: progressCallback: progress = 10
05-26 09:50:53.807 22698 22851 D ConnectionFactory: checkAvailableConnection: found types [ConnectionType(type = Wifi, network=111)]
05-26 09:50:53.807 22698 22851 D AbstractConnection: Checking reachability of http://<openhab-local-address-openhabian>:8080/ (via 111)
05-26 09:50:53.811 22698 22698 D AbstractWebViewFragment: progressCallback: progress = 10
05-26 09:50:53.811 22698 22713 I OpenGLRenderer: Davey! duration=1160ms; Flags=1, FrameTimelineVsyncId=1194760, IntendedVsync=58142117760604, Vsync=58143201093894, InputEventId=0, HandleInputStart=58143209781623, AnimationStart=58143209783706, PerformTraversalsStart=58143212094123, DrawStart=58143267114545, FrameDeadline=58142134427270, SyncQueued=58143271186993, SyncStart=58143271583348, IssueDrawCommandsStart=58143271738296, SwapBuffers=58143277080952, FrameCompleted=58143280297359, DequeueBufferDuration=24063, QueueBufferDuration=565313, GpuCompleted=58143280297359, SwapBuffersCompleted=58143278368557, DisplayPresentTime=0,
05-26 09:50:53.811 22698 23430 I okhttp.OkHttpClient: --> GET https://<openhab-remote-address-openhabian>/api/v1/settings/notifications
05-26 09:50:53.811 22698 23430 I okhttp.OkHttpClient: User-Agent: Mozilla/5.0 (Linux; Android 4.0.4; Galaxy Nexus Build/IMM76B) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.133 Mobile Safari/535.19
05-26 09:50:53.811 22698 23430 I okhttp.OkHttpClient: Cache-Control: no-cache
05-26 09:50:53.811 22698 23430 I okhttp.OkHttpClient: --> END GET
05-26 09:50:53.812 22698 22698 D MainActivity: onCreateOptionsMenu()
05-26 09:50:53.814 22698 22698 D MainActivity: onPrepareOptionsMenu()
05-26 09:50:53.816 22698 22851 D AbstractConnection: Socket connected (attempt  0)
05-26 09:50:53.817 22698 22851 D ConnectionFactory: Connecting to local URL via ConnectionType(type = Wifi, network=111)
05-26 09:50:53.960 22698 22698 D AbstractWebViewFragment: progressCallback: progress = 70
05-26 09:50:53.960 22698 22698 D AbstractWebViewFragment: progressCallback: progress = 70
05-26 09:50:54.239 22698 23430 I okhttp.OkHttpClient: <-- 200 OK https://<openhab-remote-address-openhabian>/api/v1/settings/notifications (427ms)
05-26 09:50:54.239 22698 23430 I okhttp.OkHttpClient: Server: nginx/1.18.0 (Ubuntu)
05-26 09:50:54.239 22698 23430 I okhttp.OkHttpClient: Date: Wed, 26 May 2021 07:50:54 GMT
05-26 09:50:54.239 22698 23430 I okhttp.OkHttpClient: Content-Type: application/json; charset=utf-8
05-26 09:50:54.239 22698 23430 I okhttp.OkHttpClient: Content-Length: 35
05-26 09:50:54.239 22698 23430 I okhttp.OkHttpClient: Connection: keep-alive
05-26 09:50:54.239 22698 23430 I okhttp.OkHttpClient: X-Powered-By: Express
05-26 09:50:54.239 22698 23430 I okhttp.OkHttpClient: ETag: W/"23-/xrOAw4kk/UMX+JDa+0r4GFH8rY"
05-26 09:50:54.239 22698 23430 I okhttp.OkHttpClient: Set-Cookie: β–ˆβ–ˆ
05-26 09:50:54.239 22698 23430 I okhttp.OkHttpClient: <-- END HTTP
05-26 09:50:54.241 22698 22698 D MainActivity: onActiveCloudConnectionChanged()
05-26 09:50:54.250 22698 22698 D MainActivity: onPrimaryCloudConnectionChanged()
05-26 09:50:54.344 22698 23013 D FcmRegistrationService: Register device at openHAB-cloud with URL: addAndroidRegistration<redacted> 

SHU-red avatar May 26 '21 07:05 SHU-red

Basic UI is used to render sitemaps. The Android app renders them natively, so there's no Basic UI involved. Do you mean the new UI of openHAB 3?

mueller-ma avatar May 26 '21 08:05 mueller-ma

Basic UI is used to render sitemaps. The Android app renders them natively, so there's no Basic UI involved. Do you mean the new UI of openHAB 3?

Sorry yes thats what i meant πŸ˜…

SHU-red avatar May 26 '21 08:05 SHU-red

Can you visit start page and the subpage in a browser and post both URLs? You can redact everything before the first /.

mueller-ma avatar May 26 '21 10:05 mueller-ma

Yes no problem

  • Did not configure ports or naming
  • Connected via my PC in the local network to my raspberry pi 3+ with openhabian installed
  1. Opening Openhab Web-Interface: http://openhabian:8080/#!/

  2. Graph-Page to check PowerConsumption: http://openhabian:8080/#!/page/cPowerConsumtpion

SHU-red avatar May 26 '21 10:05 SHU-red

In addition: I checked it for other custom-built pages and always the same: As soon as i turn my phone, the screen first gets white, i see the loading-bar at the top and then i re-enter on the overview page

SHU-red avatar May 26 '21 10:05 SHU-red

Can you check the demo mode and open "Positions" there? When I do so and rotate my device, the same page gets loaded again. Maybe there's a change in Android 12.

The tabs on the main page (e,g. "Properties" on https://demo.openhab.org/) won't be restored on device rotation, because the don't change the URL.

mueller-ma avatar May 26 '21 14:05 mueller-ma

No Problem and thanks to your effort.

Also in demo-mode, always the Overview-Page with activated Overview-tab gets loaded. No matter if i come from another Tab or even change to one of the other pages (Temperatures, Floorplans, Charts, etc.)

Sorry if i cause work for you, just because im using Android 12 already ...

SHU-red avatar May 26 '21 14:05 SHU-red

And one more thing that (you sure already know) may help you:

Also when i

  1. Open the app and go to a custom page
  2. Do not rotate the device
  3. Swipe away the app to the background
  4. Open up the app immediately again

As the app opens, i see the custom page opened before for a short moment, but than it also reloads to the overview page

SHU-red avatar May 28 '21 09:05 SHU-red

I added some logging around loading webpages: #2611 Let's have a look at your log when #2611 is merged and part of a beta version.

mueller-ma avatar May 31 '21 15:05 mueller-ma

Thank you very much! Hopefully i will recognize by myself and will post a log asap

SHU-red avatar May 31 '21 18:05 SHU-red

Thanks q all

On αžŸαž»αž€αŸ’αžš 28 αž§αžŸαž—αžΆ 2021, 4:00 PM SHU-red @.***> wrote:

And one more thing that (you sure already know) may help you:

Also when i

  1. Open the app and go to a custom page
  2. Do not rotate the device
  3. Swipe away the app to the background
  4. Open up the app immediately again

As the app opens, i see the custom page opened before for a short moment, but than it also reloads to the overview page

β€” You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/openhab/openhab-android/issues/2606#issuecomment-850267430, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATZQUZVBPYTG34NJZL5TGSDTP5LUBANCNFSM45RMQ7OQ .

Lzsolo1 avatar May 31 '21 18:05 Lzsolo1

You should receive an update to 2.17.5-beta soon.

mueller-ma avatar Jun 01 '21 13:06 mueller-ma

Im not at Home and Had to do it with my Phone Hopefully ist works

-----------------------
Device information
Model: Pixel 3a
Manufacturer: Google
Brand: google
Device: sargo
Product: sargo
OS: 11
Display: 1080x2176, 2.3375 density
Data usage policy: DataUsagePolicy(canDoLargeTransfers=true, loadIconsWithState=true, autoPlayVideos=true, canDoRefreshes=true), data saver: 1, battery saver: false
-----------------------

--------- beginning of crash
05-30 20:02:28.060  5730  5730 E AndroidRuntime: FATAL EXCEPTION: main
05-30 20:02:28.060  5730  5730 E AndroidRuntime: Process: org.openhab.habdroid.beta, PID: 5730
05-30 20:02:28.060  5730  5730 E AndroidRuntime: java.lang.IllegalStateException: Can not perform this action after onSaveInstanceState
05-30 20:02:28.060  5730  5730 E AndroidRuntime: 	at androidx.fragment.app.FragmentManager.checkStateLoss(FragmentManager.java:1703)
05-30 20:02:28.060  5730  5730 E AndroidRuntime: 	at androidx.fragment.app.FragmentManager.enqueueAction(FragmentManager.java:1743)
05-30 20:02:28.060  5730  5730 E AndroidRuntime: 	at androidx.fragment.app.BackStackRecord.commitInternal(BackStackRecord.java:321)
05-30 20:02:28.060  5730  5730 E AndroidRuntime: 	at androidx.fragment.app.BackStackRecord.commit(BackStackRecord.java:286)
05-30 20:02:28.060  5730  5730 E AndroidRuntime: 	at org.openhab.habdroid.ui.activity.ContentControllerOnePane.executeStateUpdate$mobile_fullBetaRelease(ContentControllerOnePane.kt:50)
05-30 20:02:28.060  5730  5730 E AndroidRuntime: 	at org.openhab.habdroid.ui.activity.ContentController.updateFragmentState(ContentController.kt:497)
05-30 20:02:28.060  5730  5730 E AndroidRuntime: 	at org.openhab.habdroid.ui.activity.ContentController.clearServerCommunicationFailure(ContentController.kt:330)
05-30 20:02:28.060  5730  5730 E AndroidRuntime: 	at org.openhab.habdroid.ui.MainActivity.retryServerPropertyQuery(MainActivity.kt:673)
05-30 20:02:28.060  5730  5730 E AndroidRuntime: 	at org.openhab.habdroid.ui.MainActivity$queryServerProperties$successCb$1$1.invoke(MainActivity.kt:691)
05-30 20:02:28.060  5730  5730 E AndroidRuntime: 	at org.openhab.habdroid.ui.MainActivity$queryServerProperties$successCb$1$1.invoke(MainActivity.kt:690)
05-30 20:02:28.060  5730  5730 E AndroidRuntime: 	at org.openhab.habdroid.ui.MainActivity$scheduleRetry$1.invokeSuspend(MainActivity.kt:517)
05-30 20:02:28.060  5730  5730 E AndroidRuntime: 	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
05-30 20:02:28.060  5730  5730 E AndroidRuntime: 	at kotlinx.coroutines.DispatchedTaskKt.resume(DispatchedTask.kt:227)
05-30 20:02:28.060  5730  5730 E AndroidRuntime: 	at kotlinx.coroutines.DispatchedTaskKt.dispatch(DispatchedTask.kt:166)
05-30 20:02:28.060  5730  5730 E AndroidRuntime: 	at kotlinx.coroutines.CancellableContinuationImpl.dispatchResume(CancellableContinuationImpl.kt:362)
05-30 20:02:28.060  5730  5730 E AndroidRuntime: 	at kotlinx.coroutines.CancellableContinuationImpl.resumeImpl(CancellableContinuationImpl.kt:396)
05-30 20:02:28.060  5730  5730 E AndroidRuntime: 	at kotlinx.coroutines.CancellableContinuationImpl.resumeImpl$default(CancellableContinuationImpl.kt:388)
05-30 20:02:28.060  5730  5730 E AndroidRuntime: 	at kotlinx.coroutines.CancellableContinuationImpl.resumeUndispatched(CancellableContinuationImpl.kt:484)
05-30 20:02:28.060  5730  5730 E AndroidRuntime: 	at kotlinx.coroutines.android.HandlerContext$scheduleResumeAfterDelay$$inlined$Runnable$1.run(Runnable.kt:19)
05-30 20:02:28.060  5730  5730 E AndroidRuntime: 	at android.os.Handler.handleCallback(Handler.java:938)
05-30 20:02:28.060  5730  5730 E AndroidRuntime: 	at android.os.Handler.dispatchMessage(Handler.java:99)
05-30 20:02:28.060  5730  5730 E AndroidRuntime: 	at android.os.Looper.loopOnce(Looper.java:201)
05-30 20:02:28.060  5730  5730 E AndroidRuntime: 	at android.os.Looper.loop(Looper.java:288)
05-30 20:02:28.060  5730  5730 E AndroidRuntime: 	at android.app.ActivityThread.main(ActivityThread.java:7727)
05-30 20:02:28.060  5730  5730 E AndroidRuntime: 	at java.lang.reflect.Method.invoke(Native Method)
05-30 20:02:28.060  5730  5730 E AndroidRuntime: 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
05-30 20:02:28.060  5730  5730 E AndroidRuntime: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:975)
--------- beginning of events
06-01 12:50:38.269 16475 16475 I wm_on_restart_called: [200992715,org.openhab.habdroid.ui.MainActivity,performRestartActivity]
06-01 12:50:38.443 16475 16475 I wm_on_start_called: [200992715,org.openhab.habdroid.ui.MainActivity,handleStartActivity]
06-01 12:50:38.453 16475 16475 I wm_on_resume_called: [200992715,org.openhab.habdroid.ui.MainActivity,RESUME_ACTIVITY]
06-01 12:50:38.455 16475 16475 I wm_on_top_resumed_gained_called: [200992715,org.openhab.habdroid.ui.MainActivity,topWhenResuming]
06-01 12:50:39.760 16475 16475 I view_enqueue_input_event: [Motion - Cancel,org.openhab.habdroid.beta/org.openhab.habdroid.ui.MainActivity]
06-01 12:50:40.480 16475 16475 I wm_on_top_resumed_lost_called: [200992715,org.openhab.habdroid.ui.MainActivity,topStateChangedWhenResumed]
06-01 12:50:40.498 16475 16475 I wm_on_paused_called: [200992715,org.openhab.habdroid.ui.MainActivity,performPause]
06-01 12:50:40.596 16475 16475 I wm_on_stop_called: [200992715,org.openhab.habdroid.ui.MainActivity,STOP_ACTIVITY_ITEM]
06-01 18:33:35.412 16475 16475 I wm_on_restart_called: [200992715,org.openhab.habdroid.ui.MainActivity,performRestartActivity]
--------- beginning of main
06-01 18:33:35.433 16475 16475 D MainActivity: onStart()
06-01 18:33:35.449 16475 16475 D PageConnectionHolderFragment: onStart(), started false
06-01 18:33:35.480 16475 16475 D ServerConfiguration: load: ServerConfiguration(id=2, name=openhabian, localPath=ServerPath(url=http://<openhab-local-address-openhabian>:8080/, userName=<none>, password=<none>), remotePath=ServerPath(url=https://<openhab-remote-address-openhabian>/, userName=<redacted>, password=<redacted>), sslClientCert=null, defaultSitemap=DefaultSitemap(name=uicomponents_page_8ba312a15d, label=New Sitemap), wifiSsid=null)
06-01 18:33:35.483 16475 16475 D ServerConfiguration: load: ServerConfiguration(id=2, name=openhabian, localPath=ServerPath(url=http://<openhab-local-address-openhabian>:8080/, userName=<none>, password=<none>), remotePath=ServerPath(url=https://<openhab-remote-address-openhabian>/, userName=<redacted>, password=<redacted>), sslClientCert=null, defaultSitemap=DefaultSitemap(name=uicomponents_page_8ba312a15d, label=New Sitemap), wifiSsid=null)
06-01 18:33:35.492 16475 16475 D MainActivity: onActiveConnectionChanged()
06-01 18:33:35.495 16475 16475 D AbstractBaseActivity: Hide snackbar with tag connectionEstablished
06-01 18:33:35.500 16475 16475 D ContentController: Indicate no network (message Netzwerk nicht verfΓΌgbar)
06-01 18:33:35.500 16475 16475 D PageConnectionHolderFragment: updateActiveConnections: URL list [], connection null
06-01 18:33:35.517 16475 16475 D ServerConfiguration: load: ServerConfiguration(id=2, name=openhabian, localPath=ServerPath(url=http://<openhab-local-address-openhabian>:8080/, userName=<none>, password=<none>), remotePath=ServerPath(url=https://<openhab-remote-address-openhabian>/, userName=<redacted>, password=<redacted>), sslClientCert=null, defaultSitemap=DefaultSitemap(name=uicomponents_page_8ba312a15d, label=New Sitemap), wifiSsid=null)
06-01 18:33:35.519 16475 16475 D ServerConfiguration: load: ServerConfiguration(id=2, name=openhabian, localPath=ServerPath(url=http://<openhab-local-address-openhabian>:8080/, userName=<none>, password=<none>), remotePath=ServerPath(url=https://<openhab-remote-address-openhabian>/, userName=<redacted>, password=<redacted>), sslClientCert=null, defaultSitemap=DefaultSitemap(name=uicomponents_page_8ba312a15d, label=New Sitemap), wifiSsid=null)
06-01 18:33:35.525 16475 16475 D ServerConfiguration: load: ServerConfiguration(id=2, name=openhabian, localPath=ServerPath(url=http://<openhab-local-address-openhabian>:8080/, userName=<none>, password=<none>), remotePath=ServerPath(url=https://<openhab-remote-address-openhabian>/, userName=<redacted>, password=<redacted>), sslClientCert=null, defaultSitemap=DefaultSitemap(name=uicomponents_page_8ba312a15d, label=New Sitemap), wifiSsid=null)
06-01 18:33:35.525 16475 16475 D MainActivity: Cannot auto select server: No server with configured wifi
06-01 18:33:35.525 16475 16475 I wm_on_start_called: [200992715,org.openhab.habdroid.ui.MainActivity,handleStartActivity]
06-01 18:33:35.528 16475 16475 D MainActivity: onNewIntent()
06-01 18:33:35.528 16475 16475 D MainActivity: Got intent: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10600000 cmp=org.openhab.habdroid.beta/org.openhab.habdroid.ui.MainActivity bnds=[845,1365][1048,1685] }
06-01 18:33:35.528 16475 16475 D MainActivity: onResume()
06-01 18:33:35.532 16475 16475 I wm_on_resume_called: [200992715,org.openhab.habdroid.ui.MainActivity,RESUME_ACTIVITY]
06-01 18:33:35.534 16475 16475 I wm_on_top_resumed_gained_called: [200992715,org.openhab.habdroid.ui.MainActivity,topStateChangedWhenResumed]
06-01 18:33:35.536 16475 16475 D MainActivity: onCreateOptionsMenu()
06-01 18:33:35.539 16475 16475 D MainActivity: onPrepareOptionsMenu()
06-01 18:33:35.616 16475 16533 D ConnectionFactory: checkAvailableConnection: found types []
06-01 18:33:35.616 16475 16533 E ConnectionFactory: Network is not available
06-01 18:33:35.622 16475 25830 I okhttp.OkHttpClient: --> GET https://<openhab-remote-address-openhabian>/api/v1/settings/notifications
06-01 18:33:35.622 16475 25830 I okhttp.OkHttpClient: User-Agent: Mozilla/5.0 (Linux; Android 4.0.4; Galaxy Nexus Build/IMM76B) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.133 Mobile Safari/535.19
06-01 18:33:35.622 16475 25830 I okhttp.OkHttpClient: Cache-Control: no-cache
06-01 18:33:35.622 16475 25830 I okhttp.OkHttpClient: --> END GET
06-01 18:33:35.711 16475 16475 D MainActivity: onActiveConnectionChanged()
06-01 18:33:35.715 16475 16475 D ContentController: Indicate no network (message WLAN ist ausgeschaltet)
06-01 18:33:35.715 16475 16475 D PageConnectionHolderFragment: updateActiveConnections: URL list [], connection null
06-01 18:33:35.720 16475 16475 D ServerConfiguration: load: ServerConfiguration(id=2, name=openhabian, localPath=ServerPath(url=http://<openhab-local-address-openhabian>:8080/, userName=<none>, password=<none>), remotePath=ServerPath(url=https://<openhab-remote-address-openhabian>/, userName=<redacted>, password=<redacted>), sslClientCert=null, defaultSitemap=DefaultSitemap(name=uicomponents_page_8ba312a15d, label=New Sitemap), wifiSsid=null)
06-01 18:33:35.723 16475 16475 D ServerConfiguration: load: ServerConfiguration(id=2, name=openhabian, localPath=ServerPath(url=http://<openhab-local-address-openhabian>:8080/, userName=<none>, password=<none>), remotePath=ServerPath(url=https://<openhab-remote-address-openhabian>/, userName=<redacted>, password=<redacted>), sslClientCert=null, defaultSitemap=DefaultSitemap(name=uicomponents_page_8ba312a15d, label=New Sitemap), wifiSsid=null)
06-01 18:33:35.734 16475 16475 D MainActivity: onCreateOptionsMenu()
06-01 18:33:35.736 16475 16475 D MainActivity: onPrepareOptionsMenu()
06-01 18:33:41.094 16475 25830 I okhttp.OkHttpClient: <-- 200 OK https://<openhab-remote-address-openhabian>/api/v1/settings/notifications (5471ms)
06-01 18:33:41.094 16475 25830 I okhttp.OkHttpClient: Server: nginx/1.18.0 (Ubuntu)
06-01 18:33:41.094 16475 25830 I okhttp.OkHttpClient: Date: Tue, 01 Jun 2021 16:33:41 GMT
06-01 18:33:41.094 16475 25830 I okhttp.OkHttpClient: Content-Type: application/json; charset=utf-8
06-01 18:33:41.094 16475 25830 I okhttp.OkHttpClient: Content-Length: 35
06-01 18:33:41.094 16475 25830 I okhttp.OkHttpClient: Connection: keep-alive
06-01 18:33:41.094 16475 25830 I okhttp.OkHttpClient: X-Powered-By: Express
06-01 18:33:41.094 16475 25830 I okhttp.OkHttpClient: ETag: W/"23-/xrOAw4kk/UMX+JDa+0r4GFH8rY"
06-01 18:33:41.094 16475 25830 I okhttp.OkHttpClient: Set-Cookie: β–ˆβ–ˆ
06-01 18:33:41.094 16475 25830 I okhttp.OkHttpClient: <-- END HTTP
06-01 18:33:41.100 16475 16475 D MainActivity: onActiveConnectionChanged()
06-01 18:33:41.104 16475 16475 D ContentController: Indicate no network (message WLAN ist ausgeschaltet)
06-01 18:33:41.104 16475 16475 D PageConnectionHolderFragment: updateActiveConnections: URL list [], connection null
06-01 18:33:41.110 16475 16475 D ServerConfiguration: load: ServerConfiguration(id=2, name=openhabian, localPath=ServerPath(url=http://<openhab-local-address-openhabian>:8080/, userName=<none>, password=<none>), remotePath=ServerPath(url=https://<openhab-remote-address-openhabian>/, userName=<redacted>, password=<redacted>), sslClientCert=null, defaultSitemap=DefaultSitemap(name=uicomponents_page_8ba312a15d, label=New Sitemap), wifiSsid=null)
06-01 18:33:41.115 16475 16475 D ServerConfiguration: load: ServerConfiguration(id=2, name=openhabian, localPath=ServerPath(url=http://<openhab-local-address-openhabian>:8080/, userName=<none>, password=<none>), remotePath=ServerPath(url=https://<openhab-remote-address-openhabian>/, userName=<redacted>, password=<redacted>), sslClientCert=null, defaultSitemap=DefaultSitemap(name=uicomponents_page_8ba312a15d, label=New Sitemap), wifiSsid=null)
06-01 18:33:41.117 16475 16475 D MainActivity: onActiveCloudConnectionChanged()
06-01 18:33:41.122 16475 16475 D MainActivity: onPrimaryCloudConnectionChanged()
06-01 18:33:41.123 16475 16475 D MainActivity: onCreateOptionsMenu()
06-01 18:33:41.125 16475 16475 D MainActivity: onPrepareOptionsMenu()
06-01 18:33:41.145 16475 16544 D FcmRegistrationService: Register device at openHAB-cloud with URL: addAndroidRegistration<redacted>

SHU-red avatar Jun 01 '21 16:06 SHU-red

The log doesn't contain the information I need. Can you disable debug logging in the app, clear the log and reproduce the issue?

mueller-ma avatar Jun 02 '21 06:06 mueller-ma

No Problem

-----------------------
Device information
Model: Pixel 3a
Manufacturer: Google
Brand: google
Device: sargo
Product: sargo
OS: 11
Display: 2220x1036, 2.3375 density
Data usage policy: DataUsagePolicy(canDoLargeTransfers=true, loadIconsWithState=true, autoPlayVideos=true, canDoRefreshes=true), data saver: 1, battery saver: false
-----------------------

--------- beginning of events
06-02 08:44:45.931 25538 25538 I view_enqueue_input_event: [Motion - Cancel,org.openhab.habdroid.beta/org.openhab.habdroid.ui.LogActivity]
06-02 08:44:46.056 25538 25538 I wm_on_top_resumed_lost_called: [107681131,org.openhab.habdroid.ui.LogActivity,topStateChangedWhenResumed]
06-02 08:44:46.057 25538 25538 I wm_on_paused_called: [107681131,org.openhab.habdroid.ui.LogActivity,performPause]
06-02 08:44:46.076 25538 25538 I wm_on_destroy_called: [116690556,org.openhab.habdroid.ui.PreferencesActivity,performDestroy]
--------- beginning of main
06-02 08:44:46.128 25538 25538 D Ringtone: Successfully created local player
06-02 08:44:46.137 25538 25538 D PreferencesActivity: Removing notification prefs for < 25
06-02 08:44:46.145 25538 25538 I wm_on_create_called: [116690556,org.openhab.habdroid.ui.PreferencesActivity,performCreate]
06-02 08:44:46.152 25538 25538 D ServerConfiguration: load: ServerConfiguration(id=2, name=openhabian, localPath=ServerPath(url=http://<openhab-local-address-openhabian>:8080/, userName=<none>, password=<none>), remotePath=ServerPath(url=https://<openhab-remote-address-openhabian>/, userName=<redacted>, password=<redacted>), sslClientCert=null, defaultSitemap=DefaultSitemap(name=uicomponents_page_8ba312a15d, label=New Sitemap), wifiSsid=null)
06-02 08:44:46.154 25538 25538 I wm_on_start_called: [116690556,org.openhab.habdroid.ui.PreferencesActivity,handleStartActivity]
06-02 08:44:46.155 25538 25538 I wm_on_resume_called: [116690556,org.openhab.habdroid.ui.PreferencesActivity,RESUME_ACTIVITY]
06-02 08:44:46.155 25538 25538 I wm_on_top_resumed_gained_called: [116690556,org.openhab.habdroid.ui.PreferencesActivity,topWhenResuming]
06-02 08:44:46.224 25538 25538 W ListPreference: Setting a summary with a String formatting marker is no longer supported. You should use a SummaryProvider instead.
06-02 08:44:46.257 25538 25538 W ListPreference: Setting a summary with a String formatting marker is no longer supported. You should use a SummaryProvider instead.
06-02 08:44:46.660 25538 25538 I wm_on_stop_called: [107681131,org.openhab.habdroid.ui.LogActivity,LIFECYCLER_STOP_ACTIVITY]
06-02 08:44:46.661 25538 25538 I wm_on_destroy_called: [107681131,org.openhab.habdroid.ui.LogActivity,performDestroy]
06-02 08:44:47.099 25538 25538 I view_enqueue_input_event: [Motion - Cancel,org.openhab.habdroid.beta/org.openhab.habdroid.ui.PreferencesActivity]
06-02 08:44:47.207 25538 25538 I wm_on_top_resumed_lost_called: [116690556,org.openhab.habdroid.ui.PreferencesActivity,topStateChangedWhenResumed]
06-02 08:44:47.207 25538 25538 I wm_on_paused_called: [116690556,org.openhab.habdroid.ui.PreferencesActivity,performPause]
06-02 08:44:47.217 25538 25538 I wm_on_destroy_called: [78951644,org.openhab.habdroid.ui.MainActivity,performDestroy]
06-02 08:44:47.229 25538 25538 D MainActivity: onCreate()
06-02 08:44:47.243 25538 25538 D ContentController: onRestoreInstanceState()
06-02 08:44:47.243 25538 25538 D PageConnectionHolderFragment: updateActiveConnections: URL list [], connection org.openhab.habdroid.core.connection.DefaultConnection@8e4ed92
06-02 08:44:47.246 25538 25538 D MainActivity: Got intent: Intent { act=org.openhab.habdroid.action.OH3_UI_SELECTED cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=org.openhab.habdroid.beta/org.openhab.habdroid.ui.MainActivity bnds=[845,1365][1048,1685] }
06-02 08:44:47.248 25538 25538 I wm_on_create_called: [78951644,org.openhab.habdroid.ui.MainActivity,performCreate]
06-02 08:44:47.249 25538 25538 D MainActivity: onStart()
06-02 08:44:47.255 25538 25538 D PageConnectionHolderFragment: onStart(), started false
06-02 08:44:47.257 25538 25538 D ServerConfiguration: load: ServerConfiguration(id=2, name=openhabian, localPath=ServerPath(url=http://<openhab-local-address-openhabian>:8080/, userName=<none>, password=<none>), remotePath=ServerPath(url=https://<openhab-remote-address-openhabian>/, userName=<redacted>, password=<redacted>), sslClientCert=null, defaultSitemap=DefaultSitemap(name=uicomponents_page_8ba312a15d, label=New Sitemap), wifiSsid=null)
06-02 08:44:47.258 25538 25538 D ServerConfiguration: load: ServerConfiguration(id=2, name=openhabian, localPath=ServerPath(url=http://<openhab-local-address-openhabian>:8080/, userName=<none>, password=<none>), remotePath=ServerPath(url=https://<openhab-remote-address-openhabian>/, userName=<redacted>, password=<redacted>), sslClientCert=null, defaultSitemap=DefaultSitemap(name=uicomponents_page_8ba312a15d, label=New Sitemap), wifiSsid=null)
06-02 08:44:47.262 25538 25538 D MainActivity: onActiveConnectionChanged()
06-02 08:44:47.273 25538 25538 D ServerConfiguration: load: ServerConfiguration(id=2, name=openhabian, localPath=ServerPath(url=http://<openhab-local-address-openhabian>:8080/, userName=<none>, password=<none>), remotePath=ServerPath(url=https://<openhab-remote-address-openhabian>/, userName=<redacted>, password=<redacted>), sslClientCert=null, defaultSitemap=DefaultSitemap(name=uicomponents_page_8ba312a15d, label=New Sitemap), wifiSsid=null)
06-02 08:44:47.274 25538 25538 D MainActivity: Cannot auto select server: No server with configured wifi
06-02 08:44:47.274 25538 25538 D PageConnectionHolderFragment: updateActiveConnections: URL list [], connection org.openhab.habdroid.core.connection.DefaultConnection@8e4ed92
06-02 08:44:47.274 25538 25538 I wm_on_start_called: [78951644,org.openhab.habdroid.ui.MainActivity,handleStartActivity]
06-02 08:44:47.274 25538 25538 D MainActivity: onPostCreate()
06-02 08:44:47.277 25538 25538 D MainActivity: onActivityResult() requestCode = 1001, resultCode = -1
06-02 08:44:47.277 25538 25538 I wm_on_activity_result_called: [78951644,org.openhab.habdroid.ui.MainActivity,RESUME_ACTIVITY]
06-02 08:44:47.277 25538 25538 D MainActivity: onResume()
06-02 08:44:47.328 25538 25538 D AbstractWebViewFragment: Load default website
06-02 08:44:47.356 25538 25538 I wm_on_resume_called: [78951644,org.openhab.habdroid.ui.MainActivity,RESUME_ACTIVITY]
06-02 08:44:47.364 25538 25538 I wm_on_top_resumed_gained_called: [78951644,org.openhab.habdroid.ui.MainActivity,topStateChangedWhenResumed]
06-02 08:44:47.414 25538 25538 D AbstractWebViewFragment: progressCallback: progress = 10
06-02 08:44:47.418 25538 25538 D MainActivity: onCreateOptionsMenu()
06-02 08:44:47.419 25538 25538 D MainActivity: onPrepareOptionsMenu()
06-02 08:44:47.559 25538 25538 D AbstractWebViewFragment: progressCallback: progress = 20
06-02 08:44:47.649 25538 25538 D AbstractWebViewFragment: progressCallback: progress = 70
06-02 08:44:47.767 25538 25657 D OHAppInterface: goFullscreen()
06-02 08:44:47.809 25538 25538 D AbstractWebViewFragment: progressCallback: progress = 100
06-02 08:44:47.810 25538 25538 D AbstractWebViewFragment: progressCallback: progress = 100
06-02 08:44:47.847 25538 25538 I wm_on_stop_called: [116690556,org.openhab.habdroid.ui.PreferencesActivity,LIFECYCLER_STOP_ACTIVITY]
06-02 08:44:47.850 25538 25538 I wm_on_destroy_called: [116690556,org.openhab.habdroid.ui.PreferencesActivity,performDestroy]
06-02 08:44:48.371 25538 25657 D OHAppInterface: preferDarkMode(): dark
06-02 08:44:48.395 25538 25538 D AbstractWebViewFragment: progressCallback: progress = 10
06-02 08:44:48.396 25538 25538 D AbstractWebViewFragment: progressCallback: progress = 100
06-02 08:44:51.064 25538 25538 D AbstractWebViewFragment: progressCallback: progress = 10
06-02 08:44:51.065 25538 25538 D AbstractWebViewFragment: progressCallback: progress = 100
06-02 08:44:51.161 25538 25538 E AbstractWebViewFragment: onReceivedError() on URL: https://home.<openhab-remote-address-openhabian>/rest/events/states
06-02 08:44:53.238 25538 25538 I wm_on_top_resumed_lost_called: [78951644,org.openhab.habdroid.ui.MainActivity,pausing]
06-02 08:44:53.239 25538 25538 D MainActivity: onPause()
06-02 08:44:53.243 25538 25538 I wm_on_paused_called: [78951644,org.openhab.habdroid.ui.MainActivity,performPause]
06-02 08:44:53.254 25538 25538 D MainActivity: onStop()
06-02 08:44:53.254 25538 25538 D PageConnectionHolderFragment: onStop()
06-02 08:44:53.254 25538 25538 I wm_on_stop_called: [78951644,org.openhab.habdroid.ui.MainActivity,handleRelaunchActivity]
06-02 08:44:53.254 25538 25538 D MainActivity: onSaveInstanceState()
06-02 08:44:53.254 25538 25538 D ContentController: onSaveInstanceState()
06-02 08:44:53.273 25538 25538 I wm_on_destroy_called: [78951644,org.openhab.habdroid.ui.MainActivity,performDestroy]
06-02 08:44:53.311 25538 25538 D MainActivity: onCreate()
06-02 08:44:53.330 25538 25538 D ContentController: onRestoreInstanceState()
06-02 08:44:53.330 25538 25538 D PageConnectionHolderFragment: updateActiveConnections: URL list [], connection org.openhab.habdroid.core.connection.DefaultConnection@8e4ed92
06-02 08:44:53.330 25538 25538 D MainActivity: Got intent: Intent { act=org.openhab.habdroid.action.OH3_UI_SELECTED cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=org.openhab.habdroid.beta/org.openhab.habdroid.ui.MainActivity bnds=[845,1365][1048,1685] }
06-02 08:44:53.332 25538 25538 I wm_on_create_called: [78951644,org.openhab.habdroid.ui.MainActivity,performCreate]
06-02 08:44:53.332 25538 25538 D MainActivity: onStart()
06-02 08:44:53.345 25538 25538 D AbstractWebViewFragment: Load website from savedInstanceState: https://home.<openhab-remote-address-openhabian>/page/schlafzimmer
06-02 08:44:53.355 25538 25538 D PageConnectionHolderFragment: onStart(), started true
06-02 08:44:53.357 25538 25538 D ServerConfiguration: load: ServerConfiguration(id=2, name=openhabian, localPath=ServerPath(url=http://<openhab-local-address-openhabian>:8080/, userName=<none>, password=<none>), remotePath=ServerPath(url=https://<openhab-remote-address-openhabian>/, userName=<redacted>, password=<redacted>), sslClientCert=null, defaultSitemap=DefaultSitemap(name=uicomponents_page_8ba312a15d, label=New Sitemap), wifiSsid=null)
06-02 08:44:53.359 25538 25538 D ServerConfiguration: load: ServerConfiguration(id=2, name=openhabian, localPath=ServerPath(url=http://<openhab-local-address-openhabian>:8080/, userName=<none>, password=<none>), remotePath=ServerPath(url=https://<openhab-remote-address-openhabian>/, userName=<redacted>, password=<redacted>), sslClientCert=null, defaultSitemap=DefaultSitemap(name=uicomponents_page_8ba312a15d, label=New Sitemap), wifiSsid=null)
06-02 08:44:53.361 25538 25538 D MainActivity: onActiveConnectionChanged()
06-02 08:44:53.369 25538 25538 D ServerConfiguration: load: ServerConfiguration(id=2, name=openhabian, localPath=ServerPath(url=http://<openhab-local-address-openhabian>:8080/, userName=<none>, password=<none>), remotePath=ServerPath(url=https://<openhab-remote-address-openhabian>/, userName=<redacted>, password=<redacted>), sslClientCert=null, defaultSitemap=DefaultSitemap(name=uicomponents_page_8ba312a15d, label=New Sitemap), wifiSsid=null)
06-02 08:44:53.369 25538 25538 D MainActivity: Cannot auto select server: No server with configured wifi
06-02 08:44:53.370 25538 25538 D PageConnectionHolderFragment: updateActiveConnections: URL list [], connection org.openhab.habdroid.core.connection.DefaultConnection@8e4ed92
06-02 08:44:53.370 25538 25538 I wm_on_start_called: [78951644,org.openhab.habdroid.ui.MainActivity,handleStartActivity]
06-02 08:44:53.371 25538 25538 W PhoneWindow: Previously focused view reported id 2131362480 during save, but can't be found during restore.
06-02 08:44:53.371 25538 25538 D MainActivity: onPostCreate()
06-02 08:44:53.372 25538 25538 D MainActivity: onResume()
06-02 08:44:53.380 25538 25538 D AbstractWebViewFragment: Load default website
06-02 08:44:53.390 25538 25538 I wm_on_resume_called: [78951644,org.openhab.habdroid.ui.MainActivity,RESUME_ACTIVITY]
06-02 08:44:53.390 25538 25538 I wm_on_top_resumed_gained_called: [78951644,org.openhab.habdroid.ui.MainActivity,topWhenResuming]
06-02 08:44:53.471 25538 25538 D AbstractWebViewFragment: progressCallback: progress = 10
06-02 08:44:53.473 25538 25538 D MainActivity: onCreateOptionsMenu()
06-02 08:44:53.474 25538 25538 D MainActivity: onPrepareOptionsMenu()
06-02 08:44:53.544 25538 25538 D AbstractWebViewFragment: progressCallback: progress = 20
06-02 08:44:53.641 25538 25538 D AbstractWebViewFragment: progressCallback: progress = 70
06-02 08:44:53.726 25538 25657 D OHAppInterface: goFullscreen()
06-02 08:44:53.743 25538 25538 D AbstractWebViewFragment: progressCallback: progress = 100
06-02 08:44:53.744 25538 25538 D AbstractWebViewFragment: progressCallback: progress = 100
06-02 08:44:54.311 25538 25657 D OHAppInterface: preferDarkMode(): dark
06-02 08:44:54.326 25538 25538 D AbstractWebViewFragment: progressCallback: progress = 10
06-02 08:44:54.344 25538 25538 D AbstractWebViewFragment: progressCallback: progress = 100
06-02 08:44:56.970 25538 25657 D OHAppInterface: exitToApp()
06-02 08:44:56.981 25538 25538 D PageConnectionHolderFragment: updateActiveConnections: URL list [], connection org.openhab.habdroid.core.connection.DefaultConnection@8e4ed92
06-02 08:44:56.997 25538 25538 D MainActivity: onCreateOptionsMenu()
06-02 08:44:56.997 25538 25538 D MainActivity: onPrepareOptionsMenu()
06-02 08:44:57.998 25538 25538 D MainActivity: onOptionsItemSelected()
06-02 08:44:58.737 25538 25538 D ServerProperties: Server returned sitemaps: []
06-02 08:44:58.806 25538 25548 W System  : A resource failed to call release. 
06-02 08:44:58.807 25538 25548 W System  : A resource failed to call release. 
06-02 08:44:58.807 25538 25548 W System  : A resource failed to call release. 
06-02 08:44:58.810 25538 25548 V MediaPlayer: resetDrmState:  mDrmInfo=null mDrmProvisioningThread=null mPrepareDrmInProgress=false mActiveDrmScheme=false
06-02 08:44:58.810 25538 25548 V MediaPlayer: cleanDrmObj: mDrmObj=null mDrmSessionId=null
06-02 08:44:58.979 25538 25538 I wm_on_top_resumed_lost_called: [78951644,org.openhab.habdroid.ui.MainActivity,topStateChangedWhenResumed]
06-02 08:44:58.980 25538 25538 D MainActivity: onPause()
06-02 08:44:58.981 25538 25538 I wm_on_paused_called: [78951644,org.openhab.habdroid.ui.MainActivity,performPause]
06-02 08:44:59.009 25538 25538 I wm_on_create_called: [32600784,org.openhab.habdroid.ui.PreferencesActivity,performCreate]
06-02 08:44:59.031 25538 25538 D Ringtone: Successfully created local player
06-02 08:44:59.038 25538 25538 D PreferencesActivity: Removing notification prefs for < 25
06-02 08:44:59.043 25538 25538 D ServerConfiguration: load: ServerConfiguration(id=2, name=openhabian, localPath=ServerPath(url=http://<openhab-local-address-openhabian>:8080/, userName=<none>, password=<none>), remotePath=ServerPath(url=https://<openhab-remote-address-openhabian>/, userName=<redacted>, password=<redacted>), sslClientCert=null, defaultSitemap=DefaultSitemap(name=uicomponents_page_8ba312a15d, label=New Sitemap), wifiSsid=null)
06-02 08:44:59.044 25538 25538 I wm_on_start_called: [32600784,org.openhab.habdroid.ui.PreferencesActivity,handleStartActivity]
06-02 08:44:59.045 25538 25538 I wm_on_resume_called: [32600784,org.openhab.habdroid.ui.PreferencesActivity,RESUME_ACTIVITY]
06-02 08:44:59.050 25538 25538 I wm_on_top_resumed_gained_called: [32600784,org.openhab.habdroid.ui.PreferencesActivity,topStateChangedWhenResumed]
06-02 08:44:59.519 25538 25575 D OpenGLRenderer: endAllActiveAnimators on 0x723e173530 (NavigationMenuItemView) with handle 0x714e0dc030
06-02 08:44:59.530 25538 25538 D MainActivity: onStop()
06-02 08:44:59.530 25538 25538 D PageConnectionHolderFragment: onStop()
06-02 08:44:59.530 25538 25538 I wm_on_stop_called: [78951644,org.openhab.habdroid.ui.MainActivity,STOP_ACTIVITY_ITEM]
06-02 08:44:59.530 25538 25538 D MainActivity: onSaveInstanceState()
06-02 08:44:59.530 25538 25538 D ContentController: onSaveInstanceState()
06-02 08:44:59.840 25538 25538 W ListPreference: Setting a summary with a String formatting marker is no longer supported. You should use a SummaryProvider instead.
06-02 08:44:59.853 25538 25538 W ListPreference: Setting a summary with a String formatting marker is no longer supported. You should use a SummaryProvider instead.
06-02 08:45:00.854 25538 25538 I wm_on_top_resumed_lost_called: [32600784,org.openhab.habdroid.ui.PreferencesActivity,topStateChangedWhenResumed]
06-02 08:45:00.854 25538 25538 I wm_on_paused_called: [32600784,org.openhab.habdroid.ui.PreferencesActivity,performPause]
06-02 08:45:00.879 25538 25538 I wm_on_create_called: [170468979,org.openhab.habdroid.ui.LogActivity,performCreate]
06-02 08:45:00.879 25538 25538 I wm_on_start_called: [170468979,org.openhab.habdroid.ui.LogActivity,handleStartActivity]
06-02 08:45:00.880 25538 25538 I wm_on_resume_called: [170468979,org.openhab.habdroid.ui.LogActivity,RESUME_ACTIVITY]
06-02 08:45:00.886 25538 25538 I wm_on_top_resumed_gained_called: [170468979,org.openhab.habdroid.ui.LogActivity,topStateChangedWhenResumed]
06-02 08:45:00.911 25538 25538 D LogActivity: onCreateOptionsMenu()

SHU-red avatar Jun 02 '21 06:06 SHU-red

That looks better. I'll investigate this later.

mueller-ma avatar Jun 02 '21 06:06 mueller-ma

That looks better. I'll investigate this later.

Thank you again very much

SHU-red avatar Jun 02 '21 06:06 SHU-red

06-02 08:44:53.345 25538 25538 D AbstractWebViewFragment: Load website from savedInstanceState: https://home.<openhab-remote-address-openhabian>/page/schlafzimmer
[...]
06-02 08:44:53.380 25538 25538 D AbstractWebViewFragment: Load default website

The app loads the previous page, but short after that the webview fragment is created again and therefore loads the default start page. I'm not sure why this happens, but it might be related to Android 12.

mueller-ma avatar Jun 02 '21 13:06 mueller-ma

Thank you very much for your investigation!

So maybe

  • its a change in general to Android 12
  • its a bug due to the fact, that its a beta OS at the moment

If i can support im some way, then just tell me

SHU-red avatar Jun 02 '21 15:06 SHU-red

Update: Just received Android 12 Beta 2

Still the same behaviour

SHU-red avatar Jun 09 '21 19:06 SHU-red

Android 12 beta 3 is here

Still same behaviour

SHU-red avatar Jul 14 '21 19:07 SHU-red

I have been seeing the UI reload on rotate ever, too. On Android 11, currently 2.18.0.

mstormi avatar Jul 23 '21 11:07 mstormi

The reload is not a/the problem ... the problem is jumping to the overview page in the reload process.

maniac103 avatar Jul 23 '21 12:07 maniac103

The reload is not a/the problem ... the problem is jumping to the overview page in the reload process.

That jump back problem I'm having, too. But a reload (all by itself) I'd consider wrong as well as the page didn't change and reloading can take significant time depending on network hence affect UX.

mstormi avatar Jul 27 '21 12:07 mstormi

This patch avoids the reload of the WebView:

diff --git a/mobile/src/main/AndroidManifest.xml b/mobile/src/main/AndroidManifest.xml
index f2a01884..0b327bb5 100644
--- a/mobile/src/main/AndroidManifest.xml
+++ b/mobile/src/main/AndroidManifest.xml
@@ -81,6 +81,7 @@
             android:label="@string/widget_type_image" />
         <activity
             android:name=".ui.MainActivity"
+            android:configChanges="orientation|screenSize"
             android:label="@string/app_name"
             android:launchMode="singleTop">

However this breaks the change from one pane to two panes in the sitemaps. Maybe change AbstractWebViewFragment to an activity?

mueller-ma avatar Aug 01 '21 08:08 mueller-ma

Removing this line (or rather: avoiding the loadUrl call in that case) probably has the same effect, doesn't it?

The configChanges thing is a hack that should only be used in very specific circumstances. See the 'caution' box in the docs.

maniac103 avatar Aug 01 '21 13:08 maniac103

avoiding the loadUrl call in that case

This would lead to an empty WebView as restoreState: "Please note that this method no longer restores the display data for this WebView." https://developer.android.com/reference/android/webkit/WebView#restoreState(android.os.Bundle)

mueller-ma avatar Aug 01 '21 17:08 mueller-ma

I also suffer from jumps to the default overview page by rotation and think I have even seen it while switching network connections (mobile <->WLAN but also changing accesspoints) earlier - but I cannot reproduce it right now, maybe this part is already fixed in the meantime. What is definitly still an issue in those situations is the reload itself, as it takes quite some time.

The best would be in my eyes, if the HTML is even cached on the devices locally totally for all sitemaps until they page is modified in openHAB (or a manual refresh in the app is triggered) and only the data of the shown items is reloaded - which is also done during normal operation.

Edit: Forgot to mention: I am on Android 10, server: openHAB 3.2.0 and android app openHAB 2.19.10-beta from fdroid.

ramack avatar Jan 02 '22 17:01 ramack

I'm facing the same problem the UI is reloaded both on rotate and on restore.

mueller-ma Your patch only fixed reload on rotate, it didn't fix reload on restore (when app is reopened while running in background) maniac103 This didn't change anything, as the fragment was always recreated and savedInstanceState was always null.

I traced the problem to be related to the WebUI fragment being recreated every time. Appling a hack that checks temporaryPage is null in org.openhab.habdroid.ui.activity.ContentController#showWebViewUi did fixed reloads on app restore, it prevents the fragment from ever be recreated. I didn't investigate why this method is called on restore I'll leave it to people familiar with the project, to help this is a stack trace that calls this method on restore:

showWebViewUi:267, ContentController (org.openhab.habdroid.ui.activity)
openWebViewUi:1176, MainActivity (org.openhab.habdroid.ui)
access$openWebViewUi:135, MainActivity (org.openhab.habdroid.ui)
invoke:1078, MainActivity$executeActionIfPossible$2 (org.openhab.habdroid.ui)
invoke:1078, MainActivity$executeActionIfPossible$2 (org.openhab.habdroid.ui)
executeActionForServer:1116, MainActivity (org.openhab.habdroid.ui)
executeActionIfPossible:1078, MainActivity (org.openhab.habdroid.ui)
executeOrStoreAction:1056, MainActivity (org.openhab.habdroid.ui)
processIntent:772, MainActivity (org.openhab.habdroid.ui)
onNewIntent:183, MainActivity (org.openhab.habdroid.ui)
performNewIntent:8306, Activity (android.app)
callActivityOnNewIntent:1429, Instrumentation (android.app)
callActivityOnNewIntent:1442, Instrumentation (android.app)
deliverNewIntents:4241, ActivityThread (android.app)
handleNewIntent:4248, ActivityThread (android.app)
execute:56, NewIntentItem (android.app.servertransaction)
execute:45, ActivityTransactionItem (android.app.servertransaction)
executeCallbacks:135, TransactionExecutor (android.app.servertransaction)
execute:95, TransactionExecutor (android.app.servertransaction)
handleMessage:2438, ActivityThread$H (android.app)
dispatchMessage:106, Handler (android.os)
loopOnce:226, Looper (android.os)
loop:313, Looper (android.os)
main:8663, ActivityThread (android.app)
invoke:-1, Method (java.lang.reflect)
run:567, RuntimeInit$MethodAndArgsCaller (com.android.internal.os)
main:1135, ZygoteInit (com.android.internal.os)

The full patch including mueller-ma changes it fixes all reloads for me:

Index: mobile/src/main/java/org/openhab/habdroid/ui/activity/ContentController.kt
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/mobile/src/main/java/org/openhab/habdroid/ui/activity/ContentController.kt b/mobile/src/main/java/org/openhab/habdroid/ui/activity/ContentController.kt
--- a/mobile/src/main/java/org/openhab/habdroid/ui/activity/ContentController.kt	(revision 6be8232ad56385dee827f6a6feb581ad2404bfec)
+++ b/mobile/src/main/java/org/openhab/habdroid/ui/activity/ContentController.kt	(date 1653768352713)
@@ -264,13 +264,15 @@
     }
 
     fun showWebViewUi(ui: WebViewUi, isStackRoot: Boolean, subpage: String?) {
-        val webViewFragment = ui.fragment.newInstance()
-        webViewFragment.arguments = bundleOf(
-            KEY_IS_STACK_ROOT to isStackRoot,
-            KEY_SUBPAGE to subpage
-        )
-        webViewFragment.setCallback(this)
-        showTemporaryPage(webViewFragment)
+        if (temporaryPage == null) {
+            val webViewFragment = ui.fragment.newInstance()
+            webViewFragment.arguments = bundleOf(
+                KEY_IS_STACK_ROOT to isStackRoot,
+                KEY_SUBPAGE to subpage
+            )
+            webViewFragment.setCallback(this)
+            showTemporaryPage(webViewFragment)
+        }
     }
 
     /**
Index: mobile/src/main/AndroidManifest.xml
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/mobile/src/main/AndroidManifest.xml b/mobile/src/main/AndroidManifest.xml
--- a/mobile/src/main/AndroidManifest.xml	(revision 6be8232ad56385dee827f6a6feb581ad2404bfec)
+++ b/mobile/src/main/AndroidManifest.xml	(date 1653768741323)
@@ -87,6 +87,7 @@
             android:exported="false" />
         <activity
             android:name=".ui.MainActivity"
+            android:configChanges="orientation|screenSize"
             android:label="@string/app_name"
             android:launchMode="singleTop"
             android:exported="true">

Some other unrelated things that I noticed that may potentially cause problems in future with the state saving:

  • AbstractWebViewFragment has no id
  • org.openhab.habdroid.ui.activity.AbstractWebViewFragment#onSaveInstanceState is not calling super.onSaveInstanceState(outState)

pawel-sw avatar May 28 '22 20:05 pawel-sw

maniac103 This didn't change anything, as the fragment was always recreated and savedInstanceState was always null.

'This' being what exactly?

I traced the problem to be related to the WebUI fragment being recreated every time.

The fragment being recreated on activity recreation is expected behavior. Or what exactly does 'every time' mean? The stack trace makes it look like the app was opened by a shortcut to OH3 UI?

The full patch including mueller-ma changes it fixes all reloads for me:

Which unfortunately is a combination of two ugly hacks. Maybe the check for the existence of temporaryPage isn't a bad idea, but when doing that one needs to check whether the temporary page has the same parameters and type as the expected new page. I mentioned the docs for the config changes thing earlier already...

maniac103 avatar May 28 '22 22:05 maniac103