Package org.robolectric.shadows
Class ShadowCardEmulation
java.lang.Object
org.robolectric.shadows.ShadowCardEmulation
@Implements(android.nfc.cardemulation.CardEmulation.class)
public class ShadowCardEmulation
extends Object
Shadow implementation of
CardEmulation.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ComponentNameUtility function that returns the latestComponentNamecaptured when callingsetPreferredService(Activity, ComponentName).booleanisDefaultServiceForCategory(ComponentName service, String category) static voidreset()static voidsetCategoryPaymentAllowsForegroundPreference(boolean value) Modifies the behavior ofcategoryAllowsForegroundPreference(String)to return the givenvaluefor theCardEmulation.CATEGORY_PAYMENT.static voidsetDefaultServiceForCategory(ComponentName service, String category) Modifies the behavior ofisDefaultServiceForCategory(ComponentName, String)to returntruefor the given inputs.booleansetPreferredService(Activity activity, ComponentName service) booleanunsetPreferredService(Activity activity)
-
Constructor Details
-
ShadowCardEmulation
public ShadowCardEmulation()
-
-
Method Details
-
isDefaultServiceForCategory
-
setPreferredService
-
unsetPreferredService
-
setDefaultServiceForCategory
Modifies the behavior ofisDefaultServiceForCategory(ComponentName, String)to returntruefor the given inputs. -
getPreferredService
Utility function that returns the latestComponentNamecaptured when callingsetPreferredService(Activity, ComponentName). -
setCategoryPaymentAllowsForegroundPreference
public static void setCategoryPaymentAllowsForegroundPreference(boolean value) Modifies the behavior ofcategoryAllowsForegroundPreference(String)to return the givenvaluefor theCardEmulation.CATEGORY_PAYMENT. -
reset
-