Save the value to SharedPreference when first-time dialog is showing.