How do I restart an Android Activity
? I tried the following, but the Activity
simply quits.
public static void restartActivity(Act
In conjunction with strange SurfaceView lifecycle behaviour with the Camera. I have found that recreate() does not behave well with the lifecycle of SurfaceViews. surfaceDestroyed isn't ever called during the recreation cycle. It is called after onResume (strange), at which point my SurfaceView is destroyed.
The original way of recreating an activity works fine.
Intent intent = getIntent();
finish();
startActivity(intent);
I can't figure out exactly why this is, but it is just an observation that can hopefully guide others in the future because it fixed my problems i was having with SurfaceViews