The MOCA SDK has the capability to download data only when the "Wi-Fi Only" data transmission is activated. In order to do so, here are the calls for both Android and iOS:
Android SDK MOCA API
Java
/** * Returns true if the "Wifi Only" data transmission setting is activated */ static boolean isWifiOnlyEnabled() /** * If true, limits data transmission to Wifi only */ static void setWifiOnlyEnabled(boolean enabled)
iOS SDK MOCA API
Objective-C
/** * Get status of the WiFi only transfer constraint. * * @return YES if the SDK is allowed to transmit data only when Wifi is available. * NO otherwise. */ + (BOOL)wifiOnlyEnabled; /** * Enables/disables the "WiFi only" transfer constraint. * @param enabled - if YES the SDK is allowed to transmit data only when Wifi is available. * NO otherwise. */ + (void)setWifiOnlyEnabled:(BOOL)enabled;
Reference:
Comments
0 comments
Article is closed for comments.