Testing platform-specific code in simulator

How can I write this code so that it will work on the simulator when I switch to different test devices?

Public.isTablet = function()    local platform = system.getInfo("platformName")     print("platform: ", system.getInfo("platformName"))     print("model: ", system.getInfo("model"))     print("architectureInfo: ", system.getInfo("architectureInfo"))          if (platform == "Android") then        return ( system.getInfo( "androidDisplayWidthInInches" ) \> 5 or system.getInfo( "androidDisplayHeightInInches" ) \> 5 )             elseif (platform == "iPhone OS") then -- includes all iOS devices + XCode Simulator         return (system.getInfo("model") == "iPad")     end          return false end

When I’m running this in Windows in the Corona Simulator, it returns the following:

platform:       Win

model:  Nexus One

architectureInfo:       x64

Not very helpful for what I’m trying to do! So how can I determine that this is supposed to be running on an Android?

Also, I’m on Build 2014.2439 at the moment. Thanks for any help in advance.

Also, I’ve looked at these:

http://forums.coronalabs.com/topic/39312-tablet-detection/

http://coronalabs.com/blog/2012/12/11/device-detection-on-steroids/

However, the following are all nil in the Windows Simulator, therefore, breaking the code completely when I try to test:

system.getInfo(“androidDisplayApproximateDpi”)

system.getInfo( “androidDisplayWidthInInches” )

system.getInfo( “androidDisplayHeightInInches” )

Thanks,

Dave

I realize that I’m asking about device detection _in the Corona Simulator, _but I guess what I expected was for the provided devices to have the same properties available in the simulator as on the device itself, perhaps scaled where appropriate.

Also, I’m on Build 2014.2439 at the moment. Thanks for any help in advance.

Also, I’ve looked at these:

http://forums.coronalabs.com/topic/39312-tablet-detection/

http://coronalabs.com/blog/2012/12/11/device-detection-on-steroids/

However, the following are all nil in the Windows Simulator, therefore, breaking the code completely when I try to test:

system.getInfo(“androidDisplayApproximateDpi”)

system.getInfo( “androidDisplayWidthInInches” )

system.getInfo( “androidDisplayHeightInInches” )

Thanks,

Dave

I realize that I’m asking about device detection _in the Corona Simulator, _but I guess what I expected was for the provided devices to have the same properties available in the simulator as on the device itself, perhaps scaled where appropriate.