Android Open Source - nfcunlocker N F C Application






From Project

Back to project page nfcunlocker.

License

The source code is released under:

Apache License

If you think the Android project nfcunlocker listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.steelrat.nfcunlocker;
//from w  ww . j a  v a2 s . c om
import android.app.Application;
import android.content.Context;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager.NameNotFoundException;

import org.acra.*;
import org.acra.annotation.*;

@ReportsCrashes(
  formKey = "", // This is required for backward compatibility but not used
  formUri = "http://www.bugsense.com/api/acra?api_key=c5c1eaf9"
)
public class NFCApplication extends Application {
  static Context mContext;
  
  @Override
  public void onCreate() {
    super.onCreate();
    
    mContext = this;
    
    // The following line triggers the initialization of ACRA
        ACRA.init(this);
  }
  
  public static Context getContext() {
    return mContext;
  }
  
  public static String getVersion() {  
    String version = "";
    
    try {
      PackageInfo pInfo;
      pInfo = mContext.getPackageManager().getPackageInfo(mContext.getPackageName(), 0);
      version = pInfo.versionName;
    } catch (NameNotFoundException e) {
      e.printStackTrace();
      ACRA.getErrorReporter().handleException(e);
    } 
    
    return version;
  }
}




Java Source Code List

com.steelrat.nfcunlocker.AddActivity.java
com.steelrat.nfcunlocker.DiscoveredActivity.java
com.steelrat.nfcunlocker.MainActivity.java
com.steelrat.nfcunlocker.NFCApplication.java
com.steelrat.nfcunlocker.helpers.AppDeviceAdminReceiver.java
com.steelrat.nfcunlocker.helpers.TagsStorage.java
com.steelrat.nfcunlocker.settingsactivity.SettingsActivityBase.java
com.steelrat.nfcunlocker.settingsactivity.SettingsActivityOA.java
com.steelrat.nfcunlocker.settingsactivity.SettingsActivity.java
com.steelrat.nfcunlocker.unlockmethods.DevicePolicyUnlockMethod.java
com.steelrat.nfcunlocker.unlockmethods.FlagUnlock.java
com.steelrat.nfcunlocker.unlockmethods.InputUnlock.java
com.steelrat.nfcunlocker.unlockmethods.KeyguardUnlock.java
com.steelrat.nfcunlocker.unlockmethods.UnlockMethodFactory.java
com.steelrat.nfcunlocker.unlockmethods.UnlockMethod.java