Intent.getIntExtra() behaviour changes on a virtual device and on a real device
<p>I have the below code and on my computer via Eclipse virtual device it works fine. But when installed on a real life phone it always reverts to the else statement.
This activity does not always get passed a value and if it is not I want a random record to appear. Thank you for any help or advice and time taken to read.</p>

<pre><code>    searchId = getIntent().getIntExtra("EMPLOYEE_ID", 0);

    if(searchId &gt; 0){
        Query="SELECT * FROM " + DB_TABLE +" ORDER BY RANDOM() LIMIT 1";
        Log.v("STANDARD RANDOM", "Was run");
    }
    else{   
        Query ="SELECT * FROM " + DB_TABLE +" WHERE _id=" + searchId + "";

        Log.v("FROM SEARCH PAGE", "Was run");
    }
</code></pre>
