View Single Post
Old 11-07-2021, 03:38 PM   #40
Renate
Onyx-maniac
Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.
 
Posts: 3,979
Karma: 18026955
Join Date: Feb 2012
Device: Nook NST, Glow2, 3, 4, '21, Kobo Aura2, Poke3, Poke5, Go6
Ok, here's a tip (that I just discovered for myself) for you app developers.

When a Bluetooth clicker appears Android says to itself, "OMG, something just appeared that can do a page down" and it restarts the foreground application so that it can take advantage of this startling info. In AndroidManifest.xml you can put:
Code:
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|uiMode|navigation">
This tells Android to keep its hat on and that you can roll with the punches without your app having to restart. Most of the clauses you will recognize but the uiMode and navigation were new to me. If you want, you can address the changes in onConfigurationChanged in your Activity.

All of this only comes into question if you connect your Bluetooth device after your app is already started.
Renate is offline   Reply With Quote