PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Special cases
  • Required permissions
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Returns the activation status of the NFC sensor found on the device.
Example
// Writes a url into a NFC tag
IF NFCStatus = nfcEnabled THEN
tag is nfcTag
url is nfcData
url..Type = nfcURI
url..Content = "www.pcsoft.com"
Add(tag, url)
NFCWriteTag(tag)
IF ErrorOccurred THEN
Error("Failure writing onto the NFC tag.", ErrorInfo())
END
END
Syntax
<Result> = NFCStatus()
<Result>: Integer constant
Activation status of the sensor:
nfcEnabledThe NFC sensor is enabled.
nfcDisabledThe NFC sensor is disabled.
nfcUnavailableThe device is not equipped with a NFC sensor or this one is not available.
Remarks

Special cases

  • The activation status of the NFC sensor cannot be modified by programming.
    If the NFC sensor is not enabled, the user has the ability to enable it via the window for configuring the wireless communications by using the following code in a procedure in native Java code:
    getCurrentActivity().startActivity(new android.content.Intent(
    android.provider.Settings.ACTION_WIRELESS_SETTINGS));
  • NFCStatus cannot be used in the simulator or in the emulator: the function will return the nfcUnavailable constant.
  • NFCStatus is available for the devices running Android version 2.3.3 or later (api level 10).
    A fatal error will occur if the function is used with an earlier system version.
    To find out the version of Android system on which the application is run, use SysAndroidVersion.

Required permissions

The call to this function modifies the permissions required by the application.
Required permission: NFC: Allows the applications to perform input/output operations via the NFC technology.
Components
Android wd230android.jar
Minimum required version
  • Version 18
Comments
Click [Add] to post a comment