0

I have created the action bar and tabs like in my previous post,

Fragment webview java script function is not working

Menu in Action bar Android.

I have loaded the webview in the ActionBar. In the webview I have place a button for capturing the image and the device's camera is opened and take the picture then I have returned the values to the loaded html file. I have checked the values in the html file from the native method, that is fine. But the action bar is recreated always. Instead of the open the camera and return the values to the webview, If I am trying to send the any string to the html file it's not reloaded. If I am start any activity inside the action bar tab scenario only the onCreate() method called twice, so the html page is reloaded. I have specified the "android:configChanges="orientation|keyboardHidden|screenSize" for the all the activities. How to fix this issue?

Community
  • 1
  • 1
Karthick
  • 1,241
  • 5
  • 20
  • 43

1 Answers1

0

If we give all the configChanges attributes in AndroidManifest.xml file, the activity which is started is not recreated always. But in the target device, we have to check "Settings-->Developer Options-->Apps-->Don't keep activities" this checkbox must not checked. If we enable this checkbox, the started activity is destroyed as soon as the user leaves the activity. This option should not be checked, then only the started activity is not recreated always.

Note : I have checked this in Google Nexus S 4.1.2 Android device.

Karthick
  • 1,241
  • 5
  • 20
  • 43