Namespace: api

Oracle® Fusion Middleware JSDoc Reference for Oracle Mobile Application Framework
2.3.0.0.0

E68517-01

QuickNav

adf.mf.api

Classes

AdfObject

Namespaces

AdfAssert
AdfCollections
amx
configService
localnotification
resourceFile

Methods

<static> addBatchDataChangeListener()

PUBLIC FUNCTION used to add a new bulk data change listener (callback) e.g. adf.mf.api.addBatchDataChangeListener(printBatchDataChangeEvent); where the callback would looks something like this: printBatchDataChangeEvent = function(variables, providers) { if(variables != undefined) { document.write("Batch DCE --
variables = " + adf.mf.util.stringify(variables)+ "
"); } if(providers!= undefined) { document.write(" providers =" + adf.mf.util.stringify(providers) + "
"); } }; If the same listener is registered several times, duplicates are discarded. NOTE: if the providers detail will only contain itemized changes provided the 'itemized' property exists and is true. Otherwise the entire collection model should be updated since no detailed information is known. For more details see @Understanding_DataChangeListeners

<static> addDataChangeListeners()

PUBLIC FUNCTION used to add a new data change listener (callback) for a given el expression (variable) e.g. adf.mf.api.addDataChangeListeners("#{bindings.apple}", appleChangedCallback); adf.mf.api.addDataChangeListeners("#{bindgins.apple + bindings.orange}", appleOrOrangeChangedCallback); adf.mf.api.addDataChangeListeners("#{!bindings.foo}", bindingsFooChangedCallback); where the callback would looks something like this: bindingsFooChangedCallback = function(id) { document.write("DataChangeNotification 1 notification for ID: " + id); } If the same expression/listener combination is registered several times, duplicates are discarded. For more details see @Understanding_DataChangeListeners

<static> addErrorHandler()

PUBLIC FUNCTION used to add a new error handler (callback) e.g. adf.mf.api.addErrorHandler(myErrorHandler); where the callback would looks something like this: myErrorHandler = function(adfexception) { document.write("Error Handler 1 notification for: " + adfexception); } If the same handler is registered several times, duplicates are discarded. For more details see @Understanding_ErrorHandlers

<static> addLoadingContributor(contributorFunction)

Adds a function to the list of functions that will be run to determine whether the page is still loading.
Parameters:
Name Type Description
contributorFunction function() : boolean a function that returns true if something is finished or false if still processing

<static> addMonitorObservation(monitorId, description, duration, successCB, failureCB)

PUBLIC FUNCTION used to add a performance monitor observation. Can be called with or without the description parameter.
Parameters:
Name Type Description
monitorId monitor ID
description description for the given monitor (optional)
duration observation duration. This is the quantity value that is observed.
successCB success callback
failureCB failure callback e.g. adf.mf.api.addMonitorObservation("MyCategory.methodFoo", 123, successCB, failureCB); e.g. adf.mf.api.addMonitorObservation("MyCategory.methodFoo", "Measures time spent in method Foo", 123, successCB, failureCB);

<static> checkForNewConfiguration()

Checks and obtains new configuration if available.
The associated AdfmfContainerUtilites method that is invoked is checkForNewConfiguration, which is defined as: public static void checkForNewConfiguration() throws AdfException
so the associated JavaScript function will be defined as
adf.mf.api.checkForNewConfiguration = function(success, failed)
The success and failed callbacks were added so the return value and exception could be passed back to the JavaScript calling code.
success callback must be in the form of function(request, response) where the request contains the original request and the response contains the associated AdfmfContainerUtilities method's return value.
i.e.
void
failed callback must be in the form of function(request, response) where the request contains the original request and the response contains the error (AdfException).
Example
   adf.mf.api.checkForNewConfiguration(
          function(req, res) { alert("checkForNewConfiguration complete"); },
          function(req, res) { alert("checkForNewConfiguration failed with " + adf.mf.util.stringify(res); }
   );

<static> clearAndSetContext(name, success, failed)

PUBLIC FUNCTION used to clear and then set context for the specified name
Parameters:
Name Type Description
name name of the context
success call on success
failed call on failed this is the same as calling adf.mf.internal.api.setContext(name, true, success, failed); e.g. adf.mf.api.setContext("myContextName", successCallback, failedCallback);
Deprecated:
  • use adf.mf.api.setCurrentContext instead.

    <static> finishAnyLoading() → {Promise}

    Gets a promise object that resolves when adf.mf.api.isLoading() returns false. This ensures that framework is not busy processing something.
    Returns:
    a promise object (use its "then" method for fulfillment)
    Type
    Promise

    <static> getApplicationInformation()

    Gets ApplicatiaonInformation object containing the information about the application. This can be used to get the application name for a custom springboard. Additional information such as vendor, version and application id are provided as well.
    The associated AdfmfContainerUtilites method that is invoked is getApplicationInformation, which is defined as: public static ApplicatiaonInformation getApplicationInformation() throws AdfException
    so the associated JavaScript function will be defined as
    adf.mf.api.getApplicationInformation = function(success, failed)
    The success and failed callbacks were added so the return value and exception could be passed back to the JavaScript calling code.
    success callback must be in the form of function(request, response) where the request contains the original request and the response contains the associated AdfmfContainerUtilities method's return value.
    i.e.
    A ApplicatiaonInformation object containing application level metadata. This includes application name, vendor, version and application id.
    failed callback must be in the form of function(request, response) where the request contains the original request and the response contains the error (AdfException).
    Example
       adf.mf.api.getApplicationInformation(
              function(req, res) { alert("getApplicationInformation complete"); },
              function(req, res) { alert("getApplicationInformation failed with " + adf.mf.util.stringify(res); }
       );
    

    <static> getContextId()

    PUBLIC FUNCTION used to get the current context ID. e.g. adf.mf.api.getContextId(successCallback, failedCallback);
    Deprecated:
    • Yes

    <static> getContextInstanceId()

    PUBLIC FINCTION used to get the current context's instance ID

    <static> getContextPageDef()

    PUBLIC FUNCTION used to get the current context's pagedef. e.g. adf.mf.api.getContextId(success, failed);

    <static> getFeatureById(featureId)

    Returns the feature information for the passed in feature id.
    The associated AdfmfContainerUtilites method that is invoked is getFeatureById, which is defined as: public static FeatureInformation getFeatureById(String featureId) throws AdfException
    so the associated JavaScript function will be defined as
    adf.mf.api.getFeatureById = function(featureId, success, failed)
    The success and failed callbacks were added so the return value and exception could be passed back to the JavaScript calling code.
    Parameters:
    Name Type Description
    featureId ID of the feature to retrieve success callback must be in the form of function(request, response) where the request contains the original request and the response contains the associated AdfmfContainerUtilities method's return value.
    i.e.
    Feature
    failed callback must be in the form of function(request, response) where the request contains the original request and the response contains the error.
    Throws:
    AdfException
    Example
       adf.mf.api.getFeatureById("feature.id",
              function(req, res) { alert("getFeatureById complete"); },
              function(req, res) { alert("getFeatureById failed with " + adf.mf.util.stringify(res); }
       );
    

    <static> getFeatureByName(featureName)

    Returns the feature information for the passed in feature name.
    The associated AdfmfContainerUtilites method that is invoked is getFeatureByName, which is defined as: public static FeatureInformation getFeatureByName(String featureName) throws AdfException
    so the associated JavaScript function will be defined as
    adf.mf.api.getFeatureByName = function(featureName, success, failed)
    The success and failed callbacks were added so the return value and exception could be passed back to the JavaScript calling code.
    Parameters:
    Name Type Description
    featureName Name of the feature to retrieve success callback must be in the form of function(request, response) where the request contains the original request and the response contains the associated AdfmfContainerUtilities method's return value.
    i.e.
    void
    failed callback must be in the form of function(request, response) where the request contains the original request and the response contains the error.
    Throws:
    AdfException
    Example
       adf.mf.api.getFeatureByName("feature.name",
              function(req, res) { alert("getFeatureByName complete"); },
              function(req, res) { alert("getFeatureByName failed with " + adf.mf.util.stringify(res); }
       );
    

    <static> getFeatures()

    Gets an array of FeatureInformation objects that provide information about the features that are available in this session of the ADF Mobile application and should be displayed on a custom springboard. These features have already been filtered by the evaluation of constraints. These are the features that would normally be displayed on the default springboard.
    The associated AdfmfContainerUtilites method that is invoked is getFeatures, which is defined as: public static FeatureInformation[] getFeatures() throws AdfException
    so the associated JavaScript function will be defined as
    adf.mf.api.getFeatures = function(success, failed)
    The success and failed callbacks were added so the return value and exception could be passed back to the JavaScript calling code.
    success callback must be in the form of function(request, response) where the request contains the original request and the response contains the associated AdfmfContainerUtilities method's return value.
    i.e.
    An array of FeatureInformation objects each representing a feature that is available. This will include the feature id, the feature name, a path to the feature icon and a path to the feature image. Normally a springboard will display the name of the feature and the image for that feature.
    failed callback must be in the form of function(request, response) where the request contains the original request and the response contains the error (AdfException).
    Example
       adf.mf.api.getFeatures(
              function(req, res) { alert("getFeatures complete"); },
              function(req, res) { alert("getFeatures failed with " + adf.mf.util.stringify(res); }
       );
    

    <static> getQueryString() → {string}

    Official mechanism for accessing the query string portion of the page's URL.
    Returns:
    the non-null (though possibly empty string) query string of the page
    Type
    string

    <static> getQueryStringParamValue(queryString, paramName, defaultWhenNullOrBlank) → {string}

    Extract a parameter value from the query string.
    Parameters:
    Name Type Description
    queryString string the non-null query string portion of the page's URL
    paramName string the name of the parameter to access
    defaultWhenNullOrBlank string an optional unescaped value to return if the value is null or blank
    Returns:
    the unescaped (possibly null) corresponding value for the specified parameter
    Type
    string

    <static> getStatusBarStyle(callback)

    PUBLIC FUNCTION used to get the status bar style on iOS e.g. adf.mf.api.getStatusBarStyle(callback) The callback function will be invoked with a single string argument which will be one of "dark" : A dark status bar, intended for use on light backgrounds. "light" : A light status bar, intended for use on dark backgrounds.
    Parameters:
    Name Type Description
    callback function(string) function is called back with the current style as the argument can be null Example: adf.mf.api.getStatusBarStyle(function(style) { console.log("current style: " + style); });

    <static> gotoDefaultFeature()

    Activates the default feature.
    The associated AdfmfContainerUtilites method that is invoked is gotoDefaultFeature, which is defined as: public static void gotoDefaultFeature() throws AdfException
    so the associated JavaScript function will be defined as
    adf.mf.api.gotoDefaultFeature = function(success, failed)
    The success and failed callbacks were added so the return value and exception could be passed back to the JavaScript calling code.
    success callback must be in the form of function(request, response) where the request contains the original request and the response contains the associated AdfmfContainerUtilities method's return value.
    i.e.
    void
    failed callback must be in the form of function(request, response) where the request contains the original request and the response contains the error (AdfException).
    Example
       adf.mf.api.gotoDefaultFeature(
              function(req, res) { alert("gotoDefaultFeature complete"); },
              function(req, res) { alert("gotoDefaultFeature failed with " + adf.mf.util.stringify(res); }
       );
    

    <static> gotoFeature(featureId)

    Activates the feature with the given ID.
    The associated AdfmfContainerUtilites method that is invoked is gotoFeature, which is defined as: public static void gotoFeature(String featureId) throws AdfException
    so the associated JavaScript function will be defined as
    adf.mf.api.gotoFeature = function(featureId, success, failed)
    The success and failed callbacks were added so the return value and exception could be passed back to the JavaScript calling code.
    Parameters:
    Name Type Description
    featureId ID of feature to activate success callback must be in the form of function(request, response) where the request contains the original request and the response contains the associated AdfmfContainerUtilities method's return value.
    i.e.
    void
    failed callback must be in the form of function(request, response) where the request contains the original request and the response contains the error (AdfException).
    Example
    adf.mf.api.gotoFeature("feature0",
      function(req, res) { alert("gotoFeature complete"); },
      function(req, res) { alert("gotoFeature failed with " + adf.mf.util.stringify(res); }
    );
    

    <static> gotoSpringboard()

    Activates the springboard.
    The associated AdfmfContainerUtilites method that is invoked is gotoSpringboard, which is defined as: public static void gotoSpringboard() throws AdfException
    so the associated JavaScript function will be defined as
    adf.mf.api.gotoSpringboard = function(success, failed)
    The success and failed callbacks were added so the return value and exception could be passed back to the JavaScript calling code.
    success callback must be in the form of function(request, response) where the request contains the original request and the response contains the associated AdfmfContainerUtilities method's return value.
    i.e.
    void
    failed callback must be in the form of function(request, response) where the request contains the original request and the response contains the error (AdfException).
    Example
       adf.mf.api.gotoSpringboard(
              function(req, res) { alert("gotoSpringboard complete"); },
              function(req, res) { alert("gotoSpringboard failed with " + adf.mf.util.stringify(res); }
       );
    

    <static> hideNavigationBar()

    Hides navigation bar.
    The associated AdfmfContainerUtilites method that is invoked is hideNavigationBar, which is defined as: public static void hideNavigationBar() throws AdfException
    so the associated JavaScript function will be defined as
    adf.mf.api.hideNavigationBar = function(success, failed)
    The success and failed callbacks were added so the return value and exception could be passed back to the JavaScript calling code.
    success callback must be in the form of function(request, response) where the request contains the original request and the response contains the associated AdfmfContainerUtilities method's return value.
    i.e.
    void
    failed callback must be in the form of function(request, response) where the request contains the original request and the response contains the error.
    Throws:
    AdfException
    Example
       adf.mf.api.hideNavigationBar(
              function(req, res) { alert("hideNavigationBar complete"); },
              function(req, res) { alert("hideNavigationBar failed with " + adf.mf.util.stringify(res); }
       );
    

    <static> hideSpringboard()

    Hides the springboard.
    The associated AdfmfContainerUtilites method that is invoked is hideSpringboard, which is defined as: public static void hideSpringboard() throws AdfException
    so the associated JavaScript function will be defined as
    adf.mf.api.hideSpringboard = function(success, failed)
    The success and failed callbacks were added so the return value and exception could be passed back to the JavaScript calling code.
    success callback must be in the form of function(request, response) where the request contains the original request and the response contains the associated AdfmfContainerUtilities method's return value.
    i.e.
    void
    failed callback must be in the form of function(request, response) where the request contains the original request and the response contains the error (AdfException).
    Example
       adf.mf.api.hideSpringboard(
              function(req, res) { alert("hideSpringboard complete"); },
              function(req, res) { alert("hideSpringboard failed with " + adf.mf.util.stringify(res); }
       );
    

    <static> invokeContainerJavaScriptFunction(featureId, methodName, args)

    Invokes a Javascript method with the given arguments on the specified feature. Returns the result of the method execution.
    The associated AdfmfContainerUtilites method that is invoked is invokeContainerJavaScriptFunction, which is defined as: public static Object invokeContainerJavaScriptFunction(String featureId, String methodName, Object[] args) throws AdfException
    so the associated JavaScript function will be defined as
    adf.mf.api.showNavigationBar = function(success, failed)
    The success and failed callbacks were added so the return value and exception could be passed back to the JavaScript calling code.
    Parameters:
    Name Type Description
    featureId ID of feature on which to invoke the method
    methodName method name
    args array of arguments to be passed to method success callback must be in the form of function(request, response) where the request contains the original request and the response contains the associated AdfmfContainerUtilities method's return value.
    i.e.
    Object
    failed callback must be in the form of function(request, response) where the request contains the original request and the response contains the error.
    Throws:
    AdfException
    Example
    • included a simple appFunction.js file to feature1 (by adding it to feature1 content's include in JDeveloper).
    • added calls to adf.mf.api.invokeContainerJavaScriptFunction to your code

    appFunctions.js
        (function() 
        {
           if (!window.application) window.application = {};
    
           application.testFunction = function()
           {
              var args = arguments;
    
              alert("APP ALERT " + args.length + " ");
              return "application.testFunction - passed";
           };
        })();
    

       adf.mf.api.invokeContainerJavaScriptFunction("feature1",
              function(req, res) { alert("invokeContainerJavaScriptFunction complete"); },
              function(req, res) { alert("invokeContainerJavaScriptFunction failed with " + adf.mf.util.stringify(res); }
       or
       adf.mf.api.invokeContainerJavaScriptFunction("feature1", [ "P1" ], 
              function(req, res) { alert("invokeContainerJavaScriptFunction complete"); },
              function(req, res) { alert("invokeContainerJavaScriptFunction failed with " + adf.mf.util.stringify(res); }
       );
       or
       adf.mf.api.invokeContainerJavaScriptFunction("feature1", [ "P1", "P2" ], 
              function(req, res) { alert("invokeContainerJavaScriptFunction complete"); },
              function(req, res) { alert("invokeContainerJavaScriptFunction failed with " + adf.mf.util.stringify(res); }
       );
    

    Now when the user presses the button they will see three alerts (from the appFunctions.js):
            APP ALERT 0
            APP ALERT 1
            APP ALERT 2
    

    <static> invokeContainerMethod(className, methodName, args)

    Invokes a native method on the specified class with the given arguments. Returns the result of method execution.
    Parameters:
    Name Type Description
    className class name
    methodName method name
    args array of arguments to be passed to method success callback must be in the form of function(request, response) where the request contains the original request and the response contains the associated AdfmfContainerUtilities method's return value.
    i.e.
    Object
    failed callback must be in the form of function(request, response) where the request contains the original request and the response contains the error.
    Throws:
    AdfException

    <static> invokeMethod(classname, methodname, params, success, failed)

    PUBLIC FUNCTION used to invoke method in any class in classpath. e.g. adf.mf.api.invokeMethod(classname, methodname, param1, param2, ... , paramN ,successCallback, failedCallback);
    Parameters:
    Name Type Description
    classname string name of the class
    methodname string name of the method
    params Array.<string> parameters
    success Array.<function(Object,Object):void> invoked when the method is successful invoked (signature: success(request, response))
    failed Array.<function(Object,Object):void> invoked when an error is encountered (signature: failed(request, response)) Examples: adf.mf.api.invokeMethod("TestBean", "setStringProp", "foo", success, failed); adf.mf.api.invokeMethod("TestBean", "getStringProp", success, failed); adf.mf.api.invokeMethod("TestBean", "testSimpleIntMethod", "101", success, failed); // Integer parameter adf.mf.api.invokeMethod("TestBean", "testComplexMethod", {"foo":"newfoo","baz":"newbaz",".type":"TestBeanComplexSubType"}, success, failed); // Comples parameter adf.mf.api.invokeMethod("TestBean", "getComplexColl", success, failed); // No parameter adf.mf.api.invokeMethod("TestBean", "testMethodStringStringString", "Hello ", "World", success, failed); // 2 string parameter

    <static> invokeSecurityMethod()

    PUBLIC FUNCTION used to invoke Security Methods

    <static> isLoading() → {boolean}

    Utility to tell whether the framework is busy processing something.
    Returns:
    whether the framework is busy processing something
    Type
    boolean

    <static> processDataChangeEvent()

    PUBLIC FUNCTION used to process the data change event associated with response messages. DataChangeEvents can be sent as their own request message or as part of _any_ response message. This event is sent to inform the javascript side that some data was side-effected in the CVM layer and should be propagated into the javascript cache as well as notify the user interface of the change. This event has the following JSON represention: DataChangeEvent { variableChanges: { elExpression:value ... } providerChanges: { providerId: { :{ current_row_key: { properties filtered by node } ... } ... } ... } } Given that, we need to do the following for each data change event: Variable Changes: set the value in the local cache notify anyone interested in that variable, that it has changed. Provider Changes: on Create: set the value in the local cache on Update: set the value in the local cache notify anyone interested in that variable, that it has changed. on Create: remove the value from the local cache For more details see @Understanding_DataChangeListeners

    <static> registerSystemActionOverride(type, func, data)

    Registers a handler to be invoked when a system action occurs. The function handler can optionally register data to be sent in to the function during invocation. The function handler should return true to indicate the action was handled and default processing should not occur, or false to indicate that the action was not handled and default processing should occur. Note: an error message will be shown and processing will be stopped if the entry for type already exists as a systemActionBehavior (a tag was defined on the same page) OR if a javascript systemActionOverride has already been registered Not all system actions exist on all versions of all platforms. For example, "back" system actions exist on Android but not iOS. Because of this, developers should not solely rely on system actions for navigation.
    Parameters:
    Name Type Description
    type string the action to register
    func <function(object):boolean> the method to be called when the system action occurs
    data object optional data to be sent in when invoking func

    <static> removeBatchDataChangeListener()

    PUBLIC FUNCTION used to remove a bulk data change listener For more details see @Understanding_DataChangeListeners

    <static> removeContextInstance()

    PUBLIC FUNCTION used to reset context. Call this before setting new context. This is exactly the same as calling adf.mf.api.setContext with an empty context name. e.g. adf.mf.api.removeContextInstance(successCallback, failedCallback);

    <static> removeDataChangeListeners()

    PUBLIC FUNCTION used to remove all data change listeners associated with the variable For more details see @Understanding_DataChangeListeners

    <static> removeErrorHandler()

    PUBLIC FUNCTION used to remove an error handler For more details see @Understanding_ErrorHandlers

    <static> resetContext()

    PUBLIC FUNCTION used to reset context. Call this before setting new context. This is exactly the same as calling adf.mf.api.setContext with an empty context name. e.g. adf.mf.api.resetContext(successCallback, failedCallback);
    Deprecated:
    • use adf.mf.api.setCurrentContext instead.

      <static> resetFeature(featureId)

      Resets the feature with the given ID.
      The associated AdfmfContainerUtilites method that is invoked is resetFeature, which is defined as: public static void resetFeature(String featureId) throws AdfException
      so the associated JavaScript function will be defined as
      adf.mf.api.resetFeature = function(featureId, success, failed)
      The success and failed callbacks were added so the return value and exception could be passed back to the JavaScript calling code.
      Parameters:
      Name Type Description
      featureId ID of feature to reset success callback must be in the form of function(request, response) where the request contains the original request and the response contains the associated AdfmfContainerUtilities method's return value.
      i.e.
      void
      failed callback must be in the form of function(request, response) where the request contains the original request and the response contains the error.
      Throws:
      AdfException
      Example
         adf.mf.api.resetFeature("feature0",
                function(req, res) { alert("resetFeature complete"); },
                function(req, res) { alert("resetFeature failed with " + adf.mf.util.stringify(res); }
         );
      

      <static> sendEmail(options)

      The framework enables you to display the device's e-mail interface, and optionally pre-populate certain fields:
      Parameters:
      Name Type Description
      options is a JSON object with the following optional properties:
      • to: recipients (comma-separated)
      • cc: CC recipients (comma-separated)
      • subject: message subject
      • body: message body
      • bcc: BCC recipients (comma-separated)
      • attachments: list of filenames to attach to the e-mail (comma-separated)
      • mimeTypes:
        • iOS: List of MIME types to use for the attachments (comma-separated). Specify null to let the framework automatically determine the MIME types. It is also possible to only specify the MIME types for selected attachments; see examples below.
        • Android: MIME type in Android isn't true MIME type but just a way for Android to filter applications to be shown in the application chooser dialog. But empty MIME type doesn't work and throws exception. So if no MIME type is passed in, we use "plain/text" by default. Also, if there are multiple attachment types, user doesn't need to provide multiple MIME types, but can provide just most suitable MIME type (as per Android documentation). That being said, if the user has an application which is being deployed to both iOS and Android, they can pass in the comma-separated list of mime types and Android will still work fine.

      After this interface is displayed, the user can choose to either send the e-mail or discard it. Note that it is not possible to automatically send the e-mail due to device/carrier restrictions; only the end user can actually send the e-mail. The device must also have at least one e-mail account configured to send e-mail; otherwise, an error will be displayed indicating that no e-mail accounts could be found.
      Examples: Populate an e-mail to 'john.doe@foo.com', copy 'jane.doe@bar.com', with the subject 'Test message', and the body 'This is a test message'
         adf.mf.api.sendEmail({to: "john.doe@foo.com",
                               cc: "jane.doe@bar.com",
                               subject: "Test message",
                               body: "This is a test message"},
                              success, failed);
      

      Taking the same example, but now adding a BCC to 'mary.may@another.com' and 'lary.day@another.com' and attaching two files.
      NOTE: By not specifying a value for the mimeTypes parameter, you are telling the framework to automatically determine the MIME type for each of the attachments
         adf.mf.api.sendEmail({to: "john.doe@foo.com",
                               cc: "jane.doe@bar.com",
                               bcc: "mary.may@another.com,lary.day@another.com"
                               subject: "Test message",
                               attachments: "path/to/file1.txt,path/to/file2.png"},
                              success, failed);
      
      success callback must be in the form of function(request, response) where the request contains the original request and the response contains the associated AdfmfContainerUtilities method's return value.
      i.e.
      void
      failed callback must be in the form of function(request, response) where the request contains the original request and the response contains the error.
      Throws:
      AdfException

      <static> sendSMS(options)

      The framework enables you to display the device's text messaging (SMS) interface, and optionally pre-populate certain fields:
      Parameters:
      Name Type Description
      options is a JSON object with the following optional properties:
      • to: recipients (comma-separated)
      • body: message body

      After this interface is displayed, the user can choose to either send the SMS or discard it. Note that it is not possible to automatically send the SMS due to device/carrier restrictions; only the end user can actually send the SMS.
      Examples: Populate an SMS message to '1234567890' with the body 'This is a test message'
          adf.mf.api.sendSMS({to: "1234567890",
                              body: "This is a test message"},
                             success, failed);
      
      success callback must be in the form of function(request, response) where the request contains the original request and the response contains the associated AdfmfContainerUtilities method's return value.
      i.e.
      void
      failed callback must be in the form of function(request, response) where the request contains the original request and the response contains the error.
      Throws:
      AdfException

      <static> setContext(name, success, failed)

      PUBLIC FUNCTION used to set context for the specified name
      Parameters:
      Name Type Description
      name name of the context
      success call on success
      failed call on failed this is the same as calling adf.mf.internal.api.setContext(name, false, success, failed); e.g. adf.mf.api.setContext("myContextName", successCallback, failedCallback);
      Deprecated:
      • use adf.mf.api.setCurrentContext instead.

        <static> setContextInstance()

        PUBLIC FUNCTION used to set context for the specified name e.g. adf.mf.api.setContext("MyPage", "MyPage-1", true, true, successCallback, failedCallback); pageDef - name of the page definition instanceId - unique id for the instance resetState - reset the bindings associated with this instance reSync - re-send the initial bindings structure to the container
        Deprecated:
        • use adf.mf.api.setCurrentContext instead.

          <static> setCurrentContext()

          PUBLIC FUNCTION used to set the current context. e.g. adf.mf.api.setCurrentContext("MyPage", true, true, true, successCallback, failedCallback); pageDef - name of the page definition resetState - reset the bindings associated with this instance reSync - re-send the initial bindings structure to the container newViewScope - should a new viewScope also be initialized, releasing the previous one?

          <static> setStatusBarStyle(style, callback)

          PUBLIC FUNCTION used to set the status bar style on iOS e.g. adf.mf.api.setStatusBarStyle(style, callback) The style may be one of the following values "dark" : A dark status bar, intended for use on light backgrounds. "light" : A light status bar, intended for use on dark backgrounds.
          Parameters:
          Name Type Description
          style string the style to set. either "dark" or "light"
          callback function(string) function is called back with the current style as the argument can be null Example: adf.mf.api.setStatusBarStyle("dark", function(style) { console.log("new style: " + style); });

          <static> showNavigationBar()

          Shows navigation bar.
          The associated AdfmfContainerUtilites method that is invoked is showNavigationBar, which is defined as: public static void showNavigationBar() throws AdfException
          so the associated JavaScript function will be defined as
          adf.mf.api.showNavigationBar = function(success, failed)
          The success and failed callbacks were added so the return value and exception could be passed back to the JavaScript calling code.
          success callback must be in the form of function(request, response) where the request contains the original request and the response contains the associated AdfmfContainerUtilities method's return value.
          i.e.
          void
          failed callback must be in the form of function(request, response) where the request contains the original request and the response contains the error.
          Throws:
          AdfException
          Example
             adf.mf.api.showNavigationBar(
                    function(req, res) { alert("showNavigationBar complete"); },
                    function(req, res) { alert("showNavigationBar failed with " + adf.mf.util.stringify(res); }
             );
          

          <static> showPreferences()

          Shows the preferences screen.
          The associated AdfmfContainerUtilites method that is invoked is showPreferences, which is defined as: public static void showPreferences() throws AdfException
          so the associated JavaScript function will be defined as
          adf.mf.api.showPreferences = function(success, failed)
          The success and failed callbacks were added so the return value and exception could be passed back to the JavaScript calling code.
          success callback must be in the form of function(request, response) where the request contains the original request and the response contains the associated AdfmfContainerUtilities method's return value.
          i.e.
          void
          failed callback must be in the form of function(request, response) where the request contains the original request and the response contains the error.
          Throws:
          AdfException
          Example
             adf.mf.api.showPreferences(
                    function(req, res) { alert("showPreferences complete"); },
                    function(req, res) { alert("showPreferences failed with " + adf.mf.util.stringify(res); }
             );
          

          <static> showSpringboard()

          Shows the springboard.
          The associated AdfmfContainerUtilites method that is invoked is showSpringboard, which is defined as: public static void showSpringboard() throws AdfException
          so the associated JavaScript function will be defined as
          adf.mf.api.showSpringboard = function(success, failed)
          The success and failed callbacks were added so the return value and exception could be passed back to the JavaScript calling code.
          success callback must be in the form of function(request, response) where the request contains the original request and the response contains the associated AdfmfContainerUtilities method's return value.
          i.e.
          void
          failed callback must be in the form of function(request, response) where the request contains the original request and the response contains the error (AdfException).
          Example
             adf.mf.api.showSpringboard(
                    function(req, res) { alert("showSpringboard complete"); },
                    function(req, res) { alert("showSpringboard failed with " + adf.mf.util.stringify(res); }
             );
          

          <static> unregisterSystemActionOverride(type)

          Removes a handler from being invoked when a system action occurs.
          Parameters:
          Name Type Description
          type string the action to register