MatchingEngine Utility Functions

Functions

static boolean com.mobiledgex.matchingengine.MatchingEngine.isMatchingEngineLocationAllowed ()
 
synchronized static void com.mobiledgex.matchingengine.MatchingEngine.setMatchingEngineLocationAllowed (boolean allowMatchingEngineLocation)
 
boolean com.mobiledgex.matchingengine.MatchingEngine.isUseWifiOnly ()
 
synchronized void com.mobiledgex.matchingengine.MatchingEngine.setUseWifiOnly (boolean enabled)
 
boolean com.mobiledgex.matchingengine.MatchingEngine.isNetworkSwitchingEnabled ()
 
void com.mobiledgex.matchingengine.MatchingEngine.setNetworkSwitchingEnabled (boolean networkSwitchingEnabled)
 
boolean com.mobiledgex.matchingengine.MatchingEngine.isAllowSwitchIfNoSubscriberInfo ()
 
synchronized void com.mobiledgex.matchingengine.MatchingEngine.setAllowSwitchIfNoSubscriberInfo (boolean allowSwitchIfNoSubscriberInfo)
 
List< SubscriptionInfo > com.mobiledgex.matchingengine.MatchingEngine.getActiveSubscriptionInfoList ()
 
boolean com.mobiledgex.matchingengine.MatchingEngine.isRoamingDataEanbled (Context context)
 
HashMap< String, String > com.mobiledgex.matchingengine.MatchingEngine.getDeviceInfo ()
 
String com.mobiledgex.matchingengine.MatchingEngine.getCarrierName (Context context)
 
String com.mobiledgex.matchingengine.MatchingEngine.generateDmeHostAddress () throws DmeDnsException
 
NetworkManager com.mobiledgex.matchingengine.MatchingEngine.getNetworkManager ()
 
String com.mobiledgex.matchingengine.MatchingEngine.getPackageName (Context context)
 
void com.mobiledgex.matchingengine.MatchingEngine.ensureSessionCookie (String sessionCookie)
 

Detailed Description

Function Documentation

◆ generateDmeHostAddress()

String com.mobiledgex.matchingengine.MatchingEngine.generateDmeHostAddress ( ) throws DmeDnsException

GenerateDmeHostAddress This will generate the dme host name based on GetMccMnc() -> "mcc-mnc.dme.mobiledgex.net". If GetMccMnc fails or returns null, this will return a fallback dme host: "wifi.dme.mobiledgex.net"(this is the EU + GDDT DME). This function is used by any DME APIs calls where no host and port overloads are provided.

◆ getActiveSubscriptionInfoList()

List< SubscriptionInfo > com.mobiledgex.matchingengine.MatchingEngine.getActiveSubscriptionInfoList ( )

Utility function to get the active subscription network provider list for this device as known to the MatchingEngine. If it is empty, the application should use the public cloud instead, as the Distributed Matching Engine may be unavailable (firewalled) from the current network. Calling MatchingEngine APIs in that state will result in a NetworkRequestNoSubscriptionInfoException.

Returns
List<SubscriptionInfo>

◆ getCarrierName()

String com.mobiledgex.matchingengine.MatchingEngine.getCarrierName ( Context  context)

Returns the carrier's mcc+mnc which is mapped to a carrier in the backend (ie. 26201 -> GDDT). MCC stands for Mobile Country Code and MNC stands for Mobile Network Code. If UseWifiOnly or cellular is off + wifi is up, this will return """". Empty string carrierName is the alias for any, which will search all carriers for application instances.

Parameters
context(android.content.Context)
Returns
String

◆ getDeviceInfo()

HashMap< String, String > com.mobiledgex.matchingengine.MatchingEngine.getDeviceInfo ( )

General Device Details

Returns
HashMap<String, String>

◆ isMatchingEngineLocationAllowed()

static boolean com.mobiledgex.matchingengine.MatchingEngine.isMatchingEngineLocationAllowed ( )
static

Checks if MatchingEngineLocation is allowed

Returns
boolean

◆ isRoamingDataEanbled()

boolean com.mobiledgex.matchingengine.MatchingEngine.isRoamingDataEanbled ( Context  context)

Check if Roaming Data is enabled on the System.

Parameters
context(android.content.Context)
Returns
boolean

◆ isUseWifiOnly()

boolean com.mobiledgex.matchingengine.MatchingEngine.isUseWifiOnly ( )

Checks if WifiOnly is set

Returns
boolean

◆ setMatchingEngineLocationAllowed()

synchronized static void com.mobiledgex.matchingengine.MatchingEngine.setMatchingEngineLocationAllowed ( boolean  allowMatchingEngineLocation)
static

Location permissions are required to find nearest cloudlet. Developer must set MatchignEngineLocationAllowed to true in order to use MatchingEngine APIs

Parameters
allowMatchingEngineLocation(boolean)

Example

MatchingEngine.setMatchingEngineLocationAllowed(matchingEngineLocationAllowed);
MatchingEngine(Context context)
Definition: MatchingEngine.java:170

◆ setUseWifiOnly()

synchronized void com.mobiledgex.matchingengine.MatchingEngine.setUseWifiOnly ( boolean  enabled)

Sets WifiOnly. If true, MatchingEngine APIs will communicate with the nearest DME based on NS1 ip lookup. If false, MatchingEngine APIs will communicate with the DME based on the device's carrier information. Default is false. Only set to true for testing purposes. Production code should use false.

Parameters
enabled(boolean)