Java 类android.nfc.INfcAdapter 实例源码

项目:PowerToggles    文件:CmdNfc.java   
public static boolean run(boolean newValue) {
  try {
    INfcAdapter adapter = INfcAdapter.Stub.asInterface(ServiceManager.getService("nfc"));
    return newValue ? adapter.enable() : adapter.disable(true);
  } catch (Throwable e) {
    return false;
  }
}
项目:PhoneProfiles    文件:CmdNfc.java   
static boolean run(boolean newValue) {
    try {
        INfcAdapter adapter = INfcAdapter.Stub.asInterface(ServiceManager.getService("nfc"));
        return newValue ? adapter.enable() : adapter.disable(true);
    } catch (Throwable e) {
        return false;
    }
}
项目:PhoneProfilesPlus    文件:CmdNfc.java   
static boolean run(boolean newValue) {
    try {
        INfcAdapter adapter = INfcAdapter.Stub.asInterface(ServiceManager.getService("nfc"));
        return newValue ? adapter.enable() : adapter.disable(true);
    } catch (Throwable e) {
        return false;
    }
}