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
}
}