在 Genexus 中,如何知道 Smart Device 是为 Android 还是 IOS 编译?
例子:
一个程序:
If platform = ‘IOS’
&Variavel = 1
Else if platform = ‘ANDROID’
&VARIAVEL = 2
endif
在 Genexus 中,如何知道 Smart Device 是为 Android 还是 IOS 编译?
例子:
一个程序:
If platform = ‘IOS’
&Variavel = 1
Else if platform = ‘ANDROID’
&VARIAVEL = 2
endif
在编译时无法知道,但您可以在运行时检查。
您可以DeviceType
在ClientInformation
&deviceType = ClientInformation.DeviceType
if &deviceType = SmartDeviceType.iOS
&variavel = 1
else // if &deviceType = SmartDeviceType.Android
&variavel = 2
endif
在官方文档中查看更多信息:ClientInformation 外部对象