How to activate functionality only in developer mode
<p>I have application with in app billing. I'm using the <a href="https://github.com/robotmedia/AndroidBillingLibrary" rel="nofollow">AndroidBillingLibrary</a> to manage the purchase.</p>

<p>I would like to be able to have access to all the buyable option when i run the app in debug mode.</p>

<p>Currently when i need to test an option i replace something like this : </p>

<pre><code>bool option = BillingController.isPurchased(this,OPTION_NAME);
</code></pre>

<p>by</p>

<pre><code>bool option = true;//BillingController.isPurchased(this,OPTION_NAME);
</code></pre>

<p>Clearly not a good solution !</p>

<p>Is it safe todo something like this ? :</p>

<pre><code>public class MyApp extends Application {
    public static final bool DEBUG = true;
}

if(MyApp.DEBUG)
    option = true;
else
    option = BillingController.isPurchased(this,OPTION_NAME);
</code></pre>

<p>Is there any better solution ?
Thanks</p>
