I know this is possible in iOS native apps using the "Reachability" class:
However, I don't believe this has been ported over to FMGO in any way.
This would be a quite useful function for FMGO, we should post this in the feature requests forum.
I know that if I connect to the server from an iPad using Cellular That the IP address is with any particular range. And when it is connected to Wi-Fi I know exactly what subnet mask would be. Is there a way to set a switch/variable from that?
Sorry, I thought you meant in a broad general sense, IE connected to wifi at starbucks vs. connected to 3G travelling at 65 on a highway.
Possibly Get(SystemIPAddress) to nab your local private device IP:
But I'm not sure that gets you exactly what you need with your specific network setup.
you could *theoretically* get your front facing public IP address by scraping a web viewer that reads that via a script, something like:
Insert from URL ( "http;//www.ipchicken.com") to text field "table::code"
if ( PatternCount ( table::code ; "cell ip address" ) > 0 )
perform cell actions
else if ( PatternCount ( table::code ; "error from ip chicken" ) > 0 )
perform "not connected" actions
perform WiFi actions
Hope this helps
You can get the IP, but you can't get the subnet mask. If you want to dive deeper into such things, you might want to check out 360 Works' ScriptMaster plugin or Moneky Bread Software's plugin. I looked through MBS and you can find out almost anything about the OS it seems but I can't find a command for the subnet mask. You might ask Christian, he's online here a lot or go to his web page www.monkeybreadsoftware.de.
That's it! Thank you very much, I know it probably looks a little bit ad hoc. But since this is for my own company and we're using about five employees. The networks that we use are pretty consistent. If a device is within the Wi-Fi networks its ip is usually in the 10.1.1.xx range. Anything outside of that is going to be outside of my network. Thanks again have a great day
I believe I used Subnet mask improperly. I meant to try and differentiate one IP subnet versus another. By finding out my own IP address of the device I can extrapolate the subnet. Not the subnet mask. Thank you
plugins still don't work on iOS/FMGO though...
Until then, you could use my web scraping method above to scrape your subnet from this website:
a calc like this would work to return subnet:
code = table::code;
p = position ( code ; "Netmask:" ; 1 ; 1 ); //general position of netmask result
p2 = position ( code ; "<code>" ; p ; 1 ); //position of the html wrapper around netmask result
p2adj = p2 + 5; //adjust start position for after the html tag
p3 = position ( code ; "</code>" ; p2 ; 1 )
middle ( code ; p2adj ; ( p3 - p2adj - 1 ) )
If you look at the code from the above page, and replace "Netmask:" in my calculation with any of the other results, you can scrape those results.
web scraping is an extremely useful tool for grabbing non-filemaker data.
Oh my... what was I thinking. You are correct, Mike, FM GO does not support Plugins. Thanks for the reminder.
We can dream. But the trend has been "how do I duplicate plugin functionality without plugins" for filemaker GO.
Fortunately, great strides have been made with web scraping and web services integrations, allowing such interaction to be possible in GO via the web viewer.
Hopefully, new features for GO are on the way to match some of the native iOS things you can do.