我有在应用程序计费应用程序。我正在使用AndroidBillingLibrary来管理购买。
我希望当我在调试模式下运行应用程序时,能够访问所有可购买的选项。
目前,当我需要测试一个选项时,我会替换如下内容:
bool option = BillingController.isPurchased(this,OPTION_NAME);通过
bool option = true;//BillingController.isPurchased(this,OPTION_NAME);显然不是一个好的解决方案!
这样做安全吗?
public class MyApp extends Application {
public static final bool DEBUG = true;
}
if(MyApp.DEBUG)
option = true;
else
option = BillingController.isPurchased(this,OPTION_NAME);有没有更好的解决方案?谢谢
发布于 2012-02-21 19:10:42
使用应用程序信息服务获取调试值。
boolean DEBUG = (0 != (getApplicationInfo().flags & ApplicationInfo.FLAG_DEBUGGABLE));https://stackoverflow.com/questions/9376125
复制相似问题