應用內結算我使用下面的代碼:在安卓
public class MyBillingService extends Service implements ServiceConnection
{
String TAG = "MyBillingService";
@Override
public void onCreate()
{
super.onCreate();
Log.i(TAG, "onCreate");
try {
boolean bindResult = getBaseContext().bindService(
new Intent(IMarketBillingService.class.getName()), this, Context.BIND_AUTO_CREATE);
if (bindResult) {
Log.i(TAG, "Service bind successful.");
} else {
Log.e(TAG, "Could not bind to the MarketBillingService.");
}
} catch (SecurityException e) {
Log.e(TAG, "Security exception: " + e);
}
}
}
我還添加了IMarketBillingService.aidl
但仍表現出像:
無法綁定到 MarketBillingService
你能指出我的錯誤嗎?
感謝終於得到解決方案:) – Vijay 2011-05-05 13:47:49