SharedPreference - How to toast only once when Activity recieves the data
<p>how can i toast only once when my <code>Activity 2</code> receive's data / value from my <code>Activity 1</code> ? , I am trying to unlock a <code>button</code>  when he receive the same <code>value</code>  from the other activity. 
Below is my code</p>

<pre><code>SharedPreferences sharedPreferences = getSharedPreferences("UnlockPreTestFour", Context.MODE_PRIVATE);
             final int scorePre = sharedPreferences.getInt("ScoreFour", 0);
               if(scorePre !=0){
            Toast.makeText(grade_four.this, "Button Unlock!", Toast.LENGTH_SHORT).show();
                      }
</code></pre>

<p>in my code after the <code>Activity 2</code> receives the same value from <code>Activity 1</code>, 
it always <code>toast</code> because it already has a <code>value</code> , can someone help me, thanks</p>