02 August, 2014

How to disable or enable NFC related Activity

public abstract void setComponentEnabledSetting (ComponentName componentName, int newState, int flags)

Added in API level 1
Set the enabled setting for a package component (activity, receiver, service, provider). This setting will override any enabled state which may have been set by the component in its manifest.
Parameters
componentNameThe component to enable
newStateThe new enabled state for the component. The legal values for this state are: COMPONENT_ENABLED_STATE_ENABLED,COMPONENT_ENABLED_STATE_DISABLED and COMPONENT_ENABLED_STATE_DEFAULT The last one removes the setting, thereby restoring the component's state to whatever was set in it's manifest (or enabled, by default).
flagsOptional behavior flags: DONT_KILL_APP or 0.

How to use: 
PackageManager pacman = context.getPackageManager();
pacman.setComponentEnabledSetting(new ComponentName(context, NFCActivity.class),
PackageManager.COMPONENT_ENABLED_STATE_DISABLED, PackageManager.DONT_KILL_APP);