From 08397a47af403d64a012a7961e7444254ccaa9a2 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Tue, 19 Jun 2012 14:18:00 +0400 Subject: categorize source files --- src/org/fox/ttrss/BillingService.java | 60 ----------------------------------- 1 file changed, 60 deletions(-) delete mode 100644 src/org/fox/ttrss/BillingService.java (limited to 'src/org/fox/ttrss/BillingService.java') diff --git a/src/org/fox/ttrss/BillingService.java b/src/org/fox/ttrss/BillingService.java deleted file mode 100644 index e003df32..00000000 --- a/src/org/fox/ttrss/BillingService.java +++ /dev/null @@ -1,60 +0,0 @@ -package org.fox.ttrss; - -import android.app.Service; -import android.content.ComponentName; -import android.content.Context; -import android.content.Intent; -import android.content.ServiceConnection; -import android.os.IBinder; -import android.util.Log; - -import com.android.vending.billing.IMarketBillingService; - -public class BillingService extends Service implements ServiceConnection{ - - private static final String TAG = "BillingService"; - - /** The service connection to the remote MarketBillingService. */ - private IMarketBillingService mService; - - @Override - public void onCreate() { - super.onCreate(); - Log.i(TAG, "Service starting with onCreate"); - - try { - boolean bindResult = bindService(new Intent("com.android.vending.billing.MarketBillingService.BIND"), this, Context.BIND_AUTO_CREATE); - if(bindResult){ - Log.i(TAG,"Market Billing Service Successfully Bound"); - } else { - Log.e(TAG,"Market Billing Service could not be bound."); - //TODO stop user continuing - } - } catch (SecurityException e){ - Log.e(TAG,"Market Billing Service could not be bound. SecurityException: "+e); - //TODO stop user continuing - } - } - - public void setContext(Context context) { - attachBaseContext(context); - } - - @Override - public IBinder onBind(Intent intent) { - return null; - } - - @Override - public void onServiceConnected(ComponentName name, IBinder service) { - Log.i(TAG, "Market Billing Service Connected."); - mService = IMarketBillingService.Stub.asInterface(service); - BillingHelper.instantiateHelper(getBaseContext(), mService); - } - - @Override - public void onServiceDisconnected(ComponentName name) { - - } - -} -- cgit v1.2.3-54-g00ecf