Android - Stop reload after orientation change

Published on Wednesday, 28 January 2015

I have added Barcode scanning into my app but after I have scanned it returns to my Activity and reloads the page.

I don't want this to happen

[gist a128ce976d9d2f0dee92 /]

manifest.xml

<activity
    android:name=".YourActivityName"
    android:configChanges="orientation|screenSize" >
</activity>

//http://stackoverflow.com/questions/5913130/dont-reload-application-when-orientation-changes

manifest2.xml

<activity
    android:screenOrientation="portrait" >
</activity>

http://stackoverflow.com/questions/5913130/dont-reload-application-when-orientation-changes

Wordpress Original Link