AndroidHarness refactoring request

Hi,
I proposed a very small refactoring fix in the AndroidHarness class to allow custom onPause behavior:
https://code.google.com/p/jmonkeyengine/issues/detail?id=593

I hope this is the correct forum for such a request. Could you please refactor it like this? That would be great and help us a lot :slight_smile:

@simon.heinen

I updated AndroidHarness to move the app pause/resume code to the loseFocus/gainFocus methods. See if that helps what you are trying to do.

<cite>@iwgeric said:</cite> @simon.heinen

I updated AndroidHarness to move the app pause/resume code to the loseFocus/gainFocus methods. See if that helps what you are trying to do.

Yes it works now, Thanks alot :slight_smile: maybe its a good idea to change the activity to a fragment activity as well? all of the new features of the android ui eg are now based on fragments, and only if the AndroidHarness become a Fragment activity those can be used in combination with the glsurfaceview

Fragment activities were created in Android 3.0 (Honeycomb) I believe. Because of this and the fact that the minimum Android level target is currently 2.2 (FROYO), we wonโ€™t be able to switch to Fragment activities right now. After the jME 3.0 release, we plan to re-evaluate the minimum target Android level supported by jME3. I think we are comfortable upgrading to Android 2.3 (GINGERBREAD) since it is currently >94% of the Android market, but jumping the minimum level to Android 3.0 (Honeycomb) will cause a loss of >38% of the Android market.

Food for thought as we move forward. Maybe the percentages will change by the time we start working on jME 3.1.

http://developer.android.com/about/dashboards/index.html

I know there is a way to provide a mechanism to use Fragment activities using the Android Compatibility Package, but weโ€™ll have to see how easily it can be integrated into jMEโ€™s Android support without requiring a lot of work on the users side.

http://android-developers.blogspot.com/2011/03/fragments-for-all.html

1 Like