0
我正在嘗試在BlackBerry jde 5.0.0.14版本上構建支付應用程序。當我調試代碼時,PaymentEngine對象始終爲空。爲什麼會發生?我的代碼有錯嗎?PaymentEngine對象始終爲空
private PaymentEngine engine = PaymentEngine.getInstance();
public PurchaseDemoScreen()
{
setTitle("Payment Service SDK Demo");
if (engine != null)
{
engine.setConnectionMode(PaymentEngine.CONNECTION_MODE_LOCAL);
//do shopping
}
else
{
//in-app purchase unavilable
}
}