apptentive / apptentive-android

Apptentive Android SDK
http://www.apptentive.com
BSD 3-Clause "New" or "Revised" License
65 stars 64 forks source link

On orientation change rating dialog disappears #75

Closed amjedab closed 10 years ago

amjedab commented 10 years ago

Once the app met the significant event conditions it shows the rating dialog but on orientation change in the same view it disappears.

Could you please handle the orientation changes, Or expose a method to show the corresponding dialog.

amjedab commented 10 years ago

This is caused, as the activity corresponding to showing the rating dialog need to define android:configChanges="orientation|keyboardHidden"

And if it doesn't it will throw (As the dialog already shown in the previous orientation) "Duplicate call to Apptentive.showRatingFlowIfConditionsAreMet()"

In our app we are handling the orientation changes through onSavedInstance(), Could you please handle it in your SDK or expose a method using which we can show the rating dialog on orientation.

skykelsey commented 10 years ago

Thanks amjedab,

We are actually rolling out changes to make all of our dialogs Activity based, so that we can handle orientation changes and keep state intact. This will be available in the near future.

Sky