PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
  • Special cases
  • Required permissions
  • AppID required
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.
Versions 24 and later
iPhone/iPad This function is now available for iPhone/iPad applications.
New in version 24
iPhone/iPad This function is now available for iPhone/iPad applications.
iPhone/iPad This function is now available for iPhone/iPad applications.
Example
Android
// Write a url into an 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
Sensor activation status:
nfcEnabledThe NFC sensor is enabled.
iPhone/iPad Scan in progress.
nfcDisabledThe NFC sensor is disabled.
nfcUnavailableThe device is not equipped with a NFC sensor or this one is not available.
Remarks

Special cases

  • Versions 24 and later
    iPhone/iPad The NFC functions are only available in read-only mode.
    New in version 24
    iPhone/iPad The NFC functions are only available in read-only mode.
    iPhone/iPad The NFC functions are only available in read-only mode.
  • Android 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.
  • Android NFCStatus is available for the devices running Android version 2.3.3 or later (api level 10).
    A fatal error occurs if the function is used with an earlier system version.
    To know the Android version on which the application is running, use SysAndroidVersion.
  • Versions 24 and later
    iPhone/iPad NFCStatus is only available on iPhones from iPhone 8 onwards.
    New in version 24
    iPhone/iPad NFCStatus is only available on iPhones from iPhone 8 onwards.
    iPhone/iPad NFCStatus is only available on iPhones from iPhone 8 onwards.
Android

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.
Versions 24 and later
iPhone/iPad

AppID required

Calling this function modifies the AppIDs of the application in the Apple developer account. It is necessary to activate the "NFC Tag Reading" App ID..
New in version 24
iPhone/iPad

AppID required

Calling this function modifies the AppIDs of the application in the Apple developer account. It is necessary to activate the "NFC Tag Reading" App ID..
iPhone/iPad

AppID required

Calling this function modifies the AppIDs of the application in the Apple developer account. It is necessary to activate the "NFC Tag Reading" App ID..
Component : wd240android.jar
Minimum version required
  • Version 18
Comments
Click [Add] to post a comment