content: package com.doow.rubbish;
  
  import android.app.Application;
  import android.content.Context;
  import android.content.pm.PackageInfo;
  import android.content.pm.PackageManager;
  import android.content.pm.Signature;
  import android.util.Base64;
  import android.util.Log;
  
  import java.security.MessageDigest;
  import java.security.NoSuchAlgorithmException;
  
  
  public class LuckyCApp extends Application {
      public static Context mApp;
  
      @Override
      public void onCreate() {
          super.onCreate();
          mApp = this;
          LU.getLanguageLocal();
  
  //        printKeyHash();
      }
  
      private void printKeyHash() {
          try {
              PackageInfo info = getPackageManager().getPackageInfo(getPackageName(), PackageManager.GET_SIGNATURES);
              for (Signature signature : info.signatures) {
                  MessageDigest md = MessageDigest.getInstance("SHA");
                  md.update(signature.toByteArray());
                  Log.d("KeyHash:         ", "     " + Base64.encodeToString(md.digest(), Base64.DEFAULT));
              }
          } catch (PackageManager.NameNotFoundException e) {
              Log.d("KeyHash:", e.toString());
          } catch (NoSuchAlgorithmException e) {
              Log.d("KeyHash:", e.toString());
          }
      }
  
  }
  