onCreate() versus a database insert
<p>My app has a high score activity. When the game activity ends it passes the game's state to the high score activity using Intent.putExtra()</p>

<p>The onCreate() pulls the game from extra and inserts the row into a database table.</p>

<p>This works fine... until I turned the device to landscape mode. onCreate() inserted the row into the high score table again.  Doh, I knew better than that, lol.</p>

<p>Ok, so what's the 'best practice' way of only allowing the row to be inserted once? I don't want to nuke the game data since I wish to display information about the game.</p>

<p>Ideas:
1. Add a flag to the extras and clear it once the row is inserted.  If the flag is clear, don't insert the row again.
2. Organize the database to throw a key violation failure on a dup insert.
3. copy the game out of extras, remove it from extras, and save/restore it in onPause() and onResume()</p>

<p>How would you handle the situation?</p>
