--- android/TrainInfo/src/dk/thoerup/traininfo/WelcomeScreen.java 2014/03/05 12:11:16 2123 +++ android/TrainInfo/src/dk/thoerup/traininfo/WelcomeScreen.java 2014/03/05 21:02:04 2124 @@ -21,8 +21,6 @@ import android.widget.Button; import android.widget.Toast; -import com.example.android.trivialdrivesample.util.IabHelper; -import com.example.android.trivialdrivesample.util.IabResult; import com.nullwire.trace.ExceptionHandler; import dk.thoerup.androidutils.CheckUpdates; @@ -44,7 +42,6 @@ ListFavorites } - IabHelper mHelper; Handler handler = new Handler(); @@ -129,37 +126,8 @@ } - try { - initBilling(); - } catch (Exception e) { - //Do nothing - just don't crash if billing failed to initialize - } - - } - private void initBilling() { - String base64EncodedPublicKey = "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAln3XRJzM8Eo/SSMBLzSOj9pLedftZrWONRLO9KC/BU1Bv0EK3PQhza1S6apS69fa300ZitKSB91WDkf88eW4VJq8txmq8W1J2x/WJCFRQnFaPP0pDgERo9EdEULH2ybsOape/7+ypqNaDWxuqBh4fQfAd+Qpgdz8E7y5ZNbIKqJnRn2gyEfpzytiNQKNATI+XxJfyrS7urg/u/hXYw1R7VBNoAO7KU3b4D205WtXBn2u+Zexjd5disVGmZ5jd0BiuVOyPIWK5e9tA/VnKl/6XDfB9utCtXcAWFVUoVE6+8HWwo9ugFauuwYmbl6pTZydPKjyh9WxVR5MS2TPue/wEwIDAQAB"; - - // compute your public key and store it in base64EncodedPublicKey - mHelper = new IabHelper(this, base64EncodedPublicKey); - mHelper.enableDebugLogging(true); - - mHelper.startSetup(new IabHelper.OnIabSetupFinishedListener() { - public void onIabSetupFinished(IabResult result) { - - Log.d("TrainInfo", "onIabSetupFinished"); - - if (!result.isSuccess()) { - // Oh noes, there was a problem. - Log.d("TrainInfo", "Problem setting up In-app Billing: " + result); - } - // Hooray, IAB is fully set up! - } - }); - - } - @Override @@ -168,16 +136,7 @@ if (stationLoader != null) { stationLoader.cancel(true); stationLoader = null; - } - if (mHelper != null) { - try { - mHelper.dispose(); - } catch (Exception e) { - //Do Nothing - } - mHelper = null; - } - + } ProviderFactory.purgeOldEntries(); //exiting application, do some cleanup }