I have application with in app billing. I’m using the AndroidBillingLibrary to manage the purchase.
I would like to be able to have access to all the buyable option when i run the app in debug mode.
Currently when i need to test an option i replace something like this :
bool option = BillingController.isPurchased(this,OPTION_NAME);
by
bool option = true;//BillingController.isPurchased(this,OPTION_NAME);
Clearly not a good solution !
Is it safe todo something like this ? :
public class MyApp extends Application {
public static final bool DEBUG = true;
}
if(MyApp.DEBUG)
option = true;
else
option = BillingController.isPurchased(this,OPTION_NAME);
Is there any better solution ?
Thanks
Get debug value using application info service.