CardEmulation.IsDefaultServiceForCategory(ComponentName, String) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Allows an application to query whether a service is currently the default service to handle a card emulation category.
[Android.Runtime.Register("isDefaultServiceForCategory", "(Landroid/content/ComponentName;Ljava/lang/String;)Z", "")]
public bool IsDefaultServiceForCategory (Android.Content.ComponentName? service, string? category);
[<Android.Runtime.Register("isDefaultServiceForCategory", "(Landroid/content/ComponentName;Ljava/lang/String;)Z", "")>]
member this.IsDefaultServiceForCategory : Android.Content.ComponentName * string -> bool
Parameters
- service
- ComponentName
The ComponentName of the service
- category
- String
The category
Returns
whether service is currently the default service for the category.
<p class="note">Requires the <code data-dev-comment-type="c">android.Manifest.permission#NFC</code> permission.
- Attributes
Remarks
Allows an application to query whether a service is currently the default service to handle a card emulation category.
Note that if #getSelectionModeForCategory(String)
returns #SELECTION_MODE_ALWAYS_ASK
or #SELECTION_MODE_ASK_IF_CONFLICT
, this method will always return false. That is because in these selection modes a default can't be set at the category level. For categories where the selection mode is #SELECTION_MODE_ALWAYS_ASK
or #SELECTION_MODE_ASK_IF_CONFLICT
, use #isDefaultServiceForAid(ComponentName, String)
to determine whether a service is the default for a specific AID.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.