|
Oracle Fusion Middleware Java API Reference for Oracle ADF Mobile 11g Release 2 (11.1.2.4.0) E27204-02 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectoracle.adf.model.datacontrols.device.BaseProxy
oracle.adfmf.framework.api.AdfmfContainerUtilities
public class AdfmfContainerUtilities
Constructor Summary | |
---|---|
AdfmfContainerUtilities()
|
Method Summary | |
---|---|
static void |
checkForNewConfiguration()
Checks and obtains new configuration if available |
static int |
getApplicationIconBadgeNumber()
Get current badge value of on application icon |
static oracle.adfmf.framework.ApplicationInformation |
getApplicationInformation()
Gets ApplicatiaonInformation object containing the information
about the application. |
static oracle.adfmf.framework.FeatureInformation |
getFeatureById(java.lang.String featureId)
Returns the feature information for the passed in feature id. |
static oracle.adfmf.framework.FeatureInformation |
getFeatureByName(java.lang.String featureName)
Returns the feature information for the passed in feature name. |
static oracle.adfmf.framework.FeatureInformation[] |
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. |
static void |
gotoDefaultFeature()
Activates the default feature. |
static void |
gotoFeature(java.lang.String featureId)
Activates the feature with the given id. |
static void |
gotoSpringboard()
Activates the springboard. |
static void |
hideNavigationBar()
Hides navigation bar. |
static java.lang.Object |
invokeContainerJavaScriptFunction(java.lang.String featureId,
java.lang.String methodName,
java.lang.Object[] args)
Invokes a Javascript method with the given arguments on the specified feature. |
static java.lang.Object |
invokeContainerMethod(java.lang.String className,
java.lang.String methodName,
java.lang.Object[] args)
Invokes a native method on the specified class with the given arguments. |
static void |
resetFeature(java.lang.String featureId)
Resets the feature with the given id. |
static void |
sendEmail(java.util.HashMap options)
The framework enables you to display the device's e-mail interface, and optionally pre-populate certain fields: |
static void |
sendSMS(java.util.HashMap options)
The framework enables you to display the device's text messaging (SMS) interface, and optionally pre-populate certain fields: |
static void |
setApplicationIconBadgeNumber(int badge)
Set a badge on application icon |
static void |
showNavigationBar()
Shows navigation bar. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AdfmfContainerUtilities()
Method Detail |
---|
public static void checkForNewConfiguration() throws AdfException
AdfException
-
import oracle.adfmf.framework.api.AdfmfContainerUtilties;
...
try {
AdfmfContainerUtilities.checkForNewConfiguration();
}catch(AdfException e) {
// handle the exception
}
public static int getApplicationIconBadgeNumber()
public static oracle.adfmf.framework.ApplicationInformation getApplicationInformation() throws AdfException
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.
ApplicatiaonInformation
object containing
application level metadata. This includes application name, vendor,
version and application id.
AdfException
-
import oracle.adfmf.framework.api.AdfmfContainerUtilties;
...
try {
ApplicationInformation[] ai = AdfmfContainerUtilities.getApplicationInformation();
...
}catch(AdfException e) {
// handle the exception
}
public static oracle.adfmf.framework.FeatureInformation getFeatureById(java.lang.String featureId) throws AdfException
featureId
- The id of the feature to retrieve
AdfException
-
import oracle.adfmf.framework.api.AdfmfContainerUtilties;
...
try {
FeatureInformation fi = AdfmfContainerUtilities.getFeatureById("feature.id");
}catch(AdfException e) {
// handle the exception
}
public static oracle.adfmf.framework.FeatureInformation getFeatureByName(java.lang.String featureName) throws AdfException
featureName
- Name of the feature to retrieve
AdfException
-
import oracle.adfmf.framework.api.AdfmfContainerUtilties;
...
try {
FeatureInformation fi = AdfmfContainerUtilities.getFeatureByName("feature.name");
}catch(AdfException e) {
// handle the exception
}
public static oracle.adfmf.framework.FeatureInformation[] getFeatures() throws AdfException
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.
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.
AdfException
-
import oracle.adfmf.framework.api.AdfmfContainerUtilties;
...
try {
FeatureInformation[] fia = null;
fia = AdfmfContainerUtilities.getFeatures();
for(int f = 0; f < fia.length; ++f) {
FeatureInformation fi = fia[i];
...
}
}catch(AdfException e) {
// handle the exception
}
public static void gotoDefaultFeature()
import oracle.adfmf.framework.api.AdfmfContainerUtilties;
...
try {
AdfmfContainerUtilities.gotoDefaultFeature();
}catch(AdfException e) {
// handle the exception
}
public static void gotoFeature(java.lang.String featureId) throws AdfException
featureId
- The id of the feature to activate
AdfException
-
import oracle.adfmf.framework.api.AdfmfContainerUtilties;
...
try {
AdfmfContainerUtilities.gotoFeature("feature.id");
}catch(AdfException e) {
// handle the exception
}
public static void gotoSpringboard()
import oracle.adfmf.framework.api.AdfmfContainerUtilties;
...
try {
AdfmfContainerUtilities.gotoSpringboard();
}catch(AdfException e) {
// handle the exception
}
public static void hideNavigationBar()
import oracle.adfmf.framework.api.AdfmfContainerUtilties;
...
try {
AdfmfContainerUtilities.hideNavigationBar();
}catch(Exception e) {
// handle the exception
}
public static java.lang.Object invokeContainerJavaScriptFunction(java.lang.String featureId, java.lang.String methodName, java.lang.Object[] args) throws AdfException
featureId
- The id of the feature on which to invoke the methodmethodName
- method nameargs
- array of arguments to be passed to method
AdfException
- (function() { if (!window.application) window.application = {}; application.testFunction = function() { var args = arguments; alert("APP ALERT " + args.length + " "); return "application.testFunction - passed"; }; })();
public void invokeApplicationJavaScriptFuntions(ActionEvent actionEvent) { AdfmfContainerUtilities.invokeContainerJavaScriptFunction("feature1", "application.testFunction", new Object[] {} ); AdfmfContainerUtilities.invokeContainerJavaScriptFunction("feature1", "application.testFunction", new Object[] {"P1"} ); AdfmfContainerUtilities.invokeContainerJavaScriptFunction("feature1", "application.testFunction", new Object[] {"P1", "P2"} ); }
APP ALERT 0 APP ALERT 1 APP ALERT 2
public static java.lang.Object invokeContainerMethod(java.lang.String className, java.lang.String methodName, java.lang.Object[] args)
className
- class name: Always specify fully qualified class name for both iOS and Android.
Example:
If className "MyPackage.MySubpackage.MyClass" is set, class MyClass is invoked on iOS, while
class MyPackage.MySubpackage.MyClass is invoked on Android.
methodName
- method nameargs
- array of arguments to be passed to method
public static void resetFeature(java.lang.String featureId) throws AdfException
featureId
- The id of the feature to reset
AdfException
-
import oracle.adfmf.framework.api.AdfmfContainerUtilties;
...
try {
AdfmfContainerUtilities.resetFeature("feature.id");
}catch(AdfException e) {
// handle the exception
}
public static void sendEmail(java.util.HashMap options)
options
- is a HashMap object with the following optional properties:
HashMap options = new HashMap(); options.put("to", "john.doe@foo.com"); options.put("cc", "jane.doe@bar.com"); options.put("subject", "Test message"); options.put("body", "This is a test message"); adf.mf.api.sendEmail(options);
HashMap options = new HashMap(); options.put("to", "john.doe@foo.com"); options.put("cc", "jane.doe@bar.com"); options.put("bcc", "mary.may@another.com,lary.day@another.com"); options.put("subject", "Test message"); options.put("body", "This is a test message"); options.put("attachments", "path/to/file1.txt,path/to/file2.png"); adf.mf.api.sendEmail(options);success callback needs to 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.
AdfException
public static void sendSMS(java.util.HashMap options)
options
- is a HashMap object with the following optional properties:
HashMap options = new HashMap(); options.put("to", "john.doe@foo.com"); options.put("body", "This is a test message"); AdfmfContainerUtilities.sendSMS(options);success callback needs to 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.
AdfException
public static void setApplicationIconBadgeNumber(int badge)
badge
- the badge valuepublic static void showNavigationBar()
import oracle.adfmf.framework.api.AdfmfContainerUtilties;
...
try {
AdfmfContainerUtilities.showNavigationBar();
}catch(Exception e) {
// handle the exception
}
|
Oracle Fusion Middleware Java API Reference for Oracle ADF Mobile 11g Release 2 (11.1.2.4.0) E27204-02 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |