1 /* 2 * Copyright 2024 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 package android.nfc; 17 18 import android.content.ComponentName; 19 import android.nfc.cardemulation.ApduServiceInfo; 20 import android.nfc.NdefMessage; 21 import android.nfc.OemLogItems; 22 import android.nfc.Tag; 23 import android.os.ResultReceiver; 24 25 import java.util.List; 26 27 /** 28 * @hide 29 */ 30 interface INfcOemExtensionCallback { onTagConnected(boolean connected)31 void onTagConnected(boolean connected); onStateUpdated(int state)32 void onStateUpdated(int state); onApplyRouting(in ResultReceiver isSkipped)33 void onApplyRouting(in ResultReceiver isSkipped); onNdefRead(in ResultReceiver isSkipped)34 void onNdefRead(in ResultReceiver isSkipped); onEnable(in ResultReceiver isAllowed)35 void onEnable(in ResultReceiver isAllowed); onDisable(in ResultReceiver isAllowed)36 void onDisable(in ResultReceiver isAllowed); onBootStarted()37 void onBootStarted(); onEnableStarted()38 void onEnableStarted(); onDisableStarted()39 void onDisableStarted(); onBootFinished(int status)40 void onBootFinished(int status); onEnableFinished(int status)41 void onEnableFinished(int status); onDisableFinished(int status)42 void onDisableFinished(int status); onTagDispatch(in ResultReceiver isSkipped)43 void onTagDispatch(in ResultReceiver isSkipped); onRoutingChanged(in ResultReceiver isSkipped)44 void onRoutingChanged(in ResultReceiver isSkipped); onHceEventReceived(int action)45 void onHceEventReceived(int action); onReaderOptionChanged(boolean enabled)46 void onReaderOptionChanged(boolean enabled); onCardEmulationActivated(boolean isActivated)47 void onCardEmulationActivated(boolean isActivated); onRfFieldDetected(boolean isActive)48 void onRfFieldDetected(boolean isActive); onRfDiscoveryStarted(boolean isDiscoveryStarted)49 void onRfDiscoveryStarted(boolean isDiscoveryStarted); onEeListenActivated(boolean isActivated)50 void onEeListenActivated(boolean isActivated); onEeUpdated()51 void onEeUpdated(); onGetOemAppSearchIntent(in List<String> firstPackage, in ResultReceiver intentConsumer)52 void onGetOemAppSearchIntent(in List<String> firstPackage, in ResultReceiver intentConsumer); onNdefMessage(in Tag tag, in NdefMessage message, in ResultReceiver hasOemExecutableContent)53 void onNdefMessage(in Tag tag, in NdefMessage message, in ResultReceiver hasOemExecutableContent); onLaunchHceAppChooserActivity(in String selectedAid, in List<ApduServiceInfo> services, in ComponentName failedComponent, in String category)54 void onLaunchHceAppChooserActivity(in String selectedAid, in List<ApduServiceInfo> services, in ComponentName failedComponent, in String category); onLaunchHceTapAgainActivity(in ApduServiceInfo service, in String category)55 void onLaunchHceTapAgainActivity(in ApduServiceInfo service, in String category); onRoutingTableFull()56 void onRoutingTableFull(); onLogEventNotified(in OemLogItems item)57 void onLogEventNotified(in OemLogItems item); onExtractOemPackages(in NdefMessage message, in ResultReceiver packageReceiver)58 void onExtractOemPackages(in NdefMessage message, in ResultReceiver packageReceiver); 59 } 60