24.03.2011 21:02, Gustavo Costa пишет:
If it's possible, Can you send me a sample code that you are using? I'm trying during 3 days and I couldn't complete the codification.
This is from the sample code in Google Market Billing package, available in the Android SDK and AVD manager. Filename: BillingService.java.
Note that it uses "Consts.MARKET_BILLING_SERVICE_ACTION" as the action string for binding.
It works (binding wise) for me.
/** * Binds to the MarketBillingService and returns true if the bind * succeeded. * @return true if the bind succeeded; false otherwise */ private boolean bindToMarketBillingService() { try { if (Consts.DEBUG) { Log.i(TAG, "binding to Market billing service"); } boolean bindResult = bindService( new Intent(Consts.MARKET_BILLING_SERVICE_ACTION), this, // ServiceConnection. Context.BIND_AUTO_CREATE); if (bindResult) { return true; } else { Log.e(TAG, "Could not bind to service."); } } catch (SecurityException e) { Log.e(TAG, "Security exception: " + e); } return false; }
-- Kostya Vasilyev -- http://kmansoft.wordpress.com -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en