4
我有在應用程序結算中的應用程序。我正在使用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);
有沒有更好的解決方案? 謝謝
如何獲得調試狀態是不是真正的問題,而是如何正確地使用這些信息 – grunk 2012-02-21 12:54:15
出於好奇,你在哪裏會把這使得它在整個應用程序訪問? – 2013-10-15 19:18:18