API Reference | developer.brewmp.com API Reference | developer.brewmp.com

Developer

API Reference

JAMS_IAPPSESSION_QUERYINTERFACE()

Brew Release
Brew MP 1.0.2
Description
This function is from the IQI interface. It allows callers to obtain another interface handle from this instance. The following interfaces are supported: * AEEIID_IBase * AEEIID_IQI * jams_IID_IAppSessionJsr82 * jams_IID_IProperty Gettable: Property Name Format Value Description -----------------------------------------------
"initial_java_classname" UTF-8 string Returns the Java class name that was used to launch the VM.
"uninstalled_jad_uri" ASCII string Returns the file path URI to the location of the JAD file used to launch the application. The empty string is returned if the application is installed or if there is no JAD file associated with this uninstalled application.
"uninstalled_jar_uri" ASCII string Returns the file path URI to the location of the JAR file used to launch the application. The empty string is returned if the application is installed.
"alert" UTF-8 string Returns the alert string associated with the application session (may be the empty string if no alert data is provided). If the "has_alert" property is FALSE then the empty string is returned. See "has_alert" for more information regarding alerts.
"uri_request" UTF-8 string Returns the URI request associated with this application session. In the event that multiple URI requests are made, the URI requests are queued up until each is retrieved. The property value will change to the next available URI request, or cleared if no more available, when the output string value is non-null. However, it will not change if the caller only request the pnValueReq field. See jams_IAppControl_RegisterDelegate for further details.
"perm_query_name" UTF-8 string Returns the permission name associated with a permission query (e.g. "javax.microedition.io.Connector.ssl"). If there is no permission query pending then the empty string is returned. See jams_IAppControl_RegisterDelegate's for further details.
"perm_query_resource" UTF-8 string Returns the permission resource associated with a permission query. The resource is extra information that should be displayed to the user such as the phone number an SMS is being sent to. If there is no permission query pending then the empty string is returned. See jams_IAppControl_RegisterDelegate for further details.
"perm_query_group_num" uint Returns the index of the permission function group associated with a permission query. See jams_IAppControl_RegisterDelegate for further details.
"app_session_id" uint Returns the application session's unique ID.
"brew_class_id" uint Returns the BREW class ID of the VM context running the application. If the application is no longer running then 0 is returned.
"is_installed" bool Returns TRUE if the application is installed or FALSE if it was launched as an uninstalled app.
"has_alert" bool Returns TRUE if the application session has an alert that has not been handled or cleared. A Java application can generate an alert by issuing any platform request or exit URI, or Java itself can generate an alert (e.g., when the user needs to answer a permission query or other dialog) by issuing a special platform request with a URI beginning with "ams://useralert". The purpose of alerts is to prevent background applications from issuing commands that interrupt the current foreground application.
Note: If the Java application stops before the special platform request alert is handled, then the alert is automatically cleared. However, normal platform requests and exit URIs remain active even after the application has stopped.

Settable: Property Name Format Value Description -----------------------------------------------
There are currently no settable properties.
Property values: Format Description --------------------------
ASCII string C string. UTF-8 string C string encoded in UTF-8. uint C string value represented in hex (e.g. "FF") in the range [0, 2^32). bool C string value that is "false" or "true" (case sensitive).
Params
me
[]:
Pointer to the interface object.
iid
[]:
Interface ID of the interface being requested.
ppo
[]:
Where to return the object pointer.
Interface
Prototype
  •    AEEResult jams_IAppSession_QueryInterface
       (
          jams_IAppSession*	me,
          AEEIID			iid,
          void**			ppo
       );
    
Return
  • One of the following BREW error codes: AEE_SUCCESS Successfully obtained another interface handle. AEE_EFAILED or other Unspecified error.