I am using a Samsung Galaxy tab10.1 with android 3.2.
The memory status before the app gets killed is around 314MB/724.
I have no task killer installed on the device.
(The device has default samsung settings, and it's used for development only.)
The problem is that when the fragment with the mapview is replaced, the whole activity is killed.
It's supposed to show an other fragment in the same activity.
When the fragment is needed again it should recreate it's resources.
To make sure where the problem arises I tried the following:
I made a function with the following code...
LinearLayout parent = (LinearLayout)mapview.getParent();
parent.removeView(mapview);
System.gc();
When this function is called, the app gets killed without going to onPause(), onStop() or onDestroy().
(the mapview is initialized and showing, it only contains an ArcgisLocalTiledLayer and a Graphicslayer)
the last thing logcat shows is: 05-16 08:38:46.330: E/libEGL(3132): call to OpenGL ES API with no current context (logged once per thread)
The only explanation I have for this behaviour, is that the mapview destroys the proces on wich the main activity runs when it is disposed.
Because of this, I can't use the activity or fragment lifecycle how it's supposed to be used.
Is there a way to stop this behaviour?
Or is this something that needs to change in the api?
Thanks
Kind regards,
Gwen