Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android targetSdkVersion 13 doesn't connect to IOIO after display is rotated #146

Open
jmkristian opened this issue Aug 20, 2019 · 2 comments

Comments

@jmkristian
Copy link

For example, if IOIOSimpleApp is built with targetSdkVersion 13, it starts and displays changing input values, but after the display is rotated it displays only 0.0. When built with targetSdkVersion 12, it continues to display input values after the display is rotated.

To reproduce the problem, apply the attached patch and build with Android Studio.
patch.txt

Here's an excerpt from logcat.
logcat.txt

@jmkristian
Copy link
Author

jmkristian commented Aug 20, 2019

To work around the problem, I don't disconnect and reconnect when the display is rotated. That is, I wait until the app terminates before calling IOIOAndroidApplicationHelper.stop. Specifically, I made the IOIOAndroidApplicationHelper a member of a retained fragment, constructed it with wrapper = ContextWrapper(applicationContext) and call stop and destroy from that fragment's onDestroy method. For complete code, see https://github.com/jmkristian/IOIO-Scope version 1.4.

@techboycr
Copy link

Have you consider using IOIOActivity instead of IOIOLooperProvider?

The complexity of you app does not seams to grab any benefit from the architecture that you are using. The other solution, that I use for a project not long ago es to create a service and have it communicate with the mainActivity.

Hope this is useful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants