Chapter 5. Reference. IBM Android SDK
Tealeaf Android SDK is a software development kit that enables you to capture user interface and application events from your Android-enabled devices. The SDK allows you to collect data on how users interact with your application and use this information to improve your user experience, optimize your app performance, and troubleshoot any issues that may arise.
Advertisement
Advertisement
Chapter 5. Reference
This section contains class reference information about the IBM Tealeaf Android
SDK library.
UICActivity class
The com.tl.uic.app.UICActivity class extends com.tl.uic.app.Activity.
UICActivity helps capture user actions in an Android application and enables screen capture after the Activity is created.
Note:
To enable capture of screens into IBM Tealeaf, you must configure the PCA
Method detail
getTakeSnapshotAfterCreate
public Boolean getTakeSnapshotAfterCreate()
Whether to take the snapshot after create.
Returns whether to take the snapshot after create.
setTakeSnapshotAfterCreate
public void setTakeSnapshotAfterCreate(final
Boolean takeSnapshotAfterCreate)
Whether to take the snapshot after create.
takeSnapshotAfterCreate - Whether to take the snapshot after create.
getTookImage
public Boolean getTookImage()
Whether screen capture was taken.
setTookImage
public void setTookImage(final Boolean tookImage)
Whether screen capture was taken.
tookImage
- Whether screen capture was taken.
getLogicalPageName
public String getLogicalPageName()
Logical page name of the Activity.
Returns the logical page name of the Activity. If none was assigned, it receives a name from the class of Activity, and an underscore (_) with current time in milliseconds is added.
setLogicalPageName
public void setLogicalPageName(final String logicalPageName)
Logical page name of the Activity.
logicalPageName - Logical page name of the Activity.
© Copyright IBM Corp. 1999, 2015
105
getImageBackground
public int getImageBackground()
Background color of the image of the screen capture.
Returns the background color of the image of the screen capture.
setImageBackground
public void setImageBackground(final int imageBackground)
Background color of the image of the screen capture.
imageBackground
- Background color of the image of the screen capture.
getView
public View getView()
View to use for screen capture.
Returns the view to use for screen capture.
setView
public void setView(final View view)
View to use for screen capture.
view - View to use for screen capture.
getNumOnGlobalLayoutListener
public int getNumOnGlobalLayoutListener()
Number of OnGlobalLayoutListener set on views.
Returns the number of milliseconds to delay before snapshot is taken because more time is needed to render properly.
setNumOnGlobalLayoutListener
public void setNumOnGlobalLayoutListener(final
int numOnGlobalLayoutListener)
Number of OnGlobalLayoutListener set on views.
millisecondSnapshotDelay
- Milliseconds to delay before snapshot is taken because more time is needed to render properly.
getMillisecondSnapshotDelay
public long getMillisecondSnapshotDelay()
Milliseconds to delay before snap shot is taken because more time is needed to render properly.
Returns the number of milliseconds to delay before snapshot is taken because more time is needed to render properly.
setMillisecondSnapshotDelay
public void setMillisecondSnapshotDelay(final
long millisecondSnapshotDelay)
Milliseconds to delay before snap shot is taken because more time is needed to render properly.
millisecondSnapshotDelay - Milliseconds to delay before snap shot is taken because more time is needed to render properly.
106
IBM Tealeaf Android SDK: IBM Tealeaf Android SDK Guide
Reference
Table 19. UICActivity class
Package
com.tl.uic.app
com.tl.uic
com.tl.uic.http
com.tl.uic.webkit
Class Description
UICActivity
IBM Tealeaf Android
SDK library that is used to capture user actions.
“TLDefaultHttpClient class” on page 117
Extends
DefaultHttpClient to monitor when a URL was requested.
“TLHttpRequestInterceptor class” on page
Extends
HttpRequestInterceptor to add IBM Tealeaf headers for sessionization.
“TLHttpResponseInterceptor class” on page 119
UICActivity used to help control IBM Tealeaf
Android SDK library.
Application that is used to help control IBM
Tealeaf Android SDK library.
“UICWebView class” on page 120
Extends
HttpResponseInterceptor to acquire details for the
Tealeaf connection object.
WebView used to add session ID to header requests.
“UICWebChromeClient Class” on page 122 Extends
WebChromeClient to monitor when browser finished render after which screen capture is enabled.
“UICWebViewClient Class” on page 123
Extends WebViewClient to monitor when the
URL loaded to add IBM
Tealeaf headers for sessionization.
UICApplication class
The com.tl.uic.app.UICApplication class extends android.app.Application.
UICApplication helps capture user actions in an Android application.
Method detail
getTealeaf
public Tealeaf getTealeaf()
Get current instance of IBM Tealeaf.
Returns the current instance of IBM Tealeaf.
Chapter 5. Reference
107
Reference
Table 20. UICApplication class
Package
com.tl.uic.app
Class
“UICActivity class” on page 105
com.tl.uic
com.tl.uic.http
com.tl.uic.webkit
UICApplication
“TLDefaultHttpClient class” on page
“TLHttpRequestInterceptor class” on page 118
“TLHttpResponseInterceptor class” on page 119
“UICWebView class” on page 120
“UICWebChromeClient Class” on page 122
“UICWebViewClient Class” on page
Description
UICActivity used to help control IBM Tealeaf
Android SDK library.
Application that is used to help control IBM Tealeaf
Android SDK library.
IBM Tealeaf Android SDK library that is used to capture user actions.
Extends DefaultHttpClient to monitor when a URL was requested.
Extends
HttpRequestInterceptor to add IBM Tealeaf headers for sessionization.
Extends
HttpResponseInterceptor to acquire details for the IBM
Tealeaf connection object.
WebView used to add session ID to header requests.
Extends WebChromeClient to monitor when browser finished render after which screen capture is enabled.
Extends WebViewClient to monitor when the URL loaded to add IBM Tealeaf headers for sessionization.
Tealeaf class
The com.tl.uic.TeaLeaf class extends java.lang.Object. The Tealeaf library helps capture user actions in an Android application.
Fields
Table 21. Tealeaf class
Field
static java.lang.String
Summary
TLF_SESSION_HEADER static java.lang.String
TAG
Description
Header key that is used to sessionize on
X-Tealeaf-Session .
UICAndroid used in
LogCat.
108
IBM Tealeaf Android SDK: IBM Tealeaf Android SDK Guide
Fields used in event handlers to get display user actions correctly
Table 22. Tealeaf class
Field
static java.lang.String
Summary
TLF_ON_FOCUS_CHANGE_IN static java.lang.String
static java.lang.String
static java.lang.String
static java.lang.String
static java.lang.String
TLF_ON_FOCUS_CHANGE_OUT
TLF_ON_GROUP_COLLAPSE
TLF_ON_GROUP_EXPAND
TLF_ON_DRAWER_OPENED
TLF_ON_DRAWER_CLOSED
Description
Used in TextView based controls to indicate focus in.
Used in TextView based controls to indicate focus out.
Used in
ExpandableListView based controls to indicate group is collapsed.
Used in
ExpandableListView based controls to indicate group is expanded.
Used in SlidingDrawer based controls to indicate drawer is opened.
Used in SlidingDrawer based controls to indicate drawer is closed.
Fields used to access configuration file values
Table 23. Tealeaf class
Field
static java.lang.String
static java.lang.String
Summary
TLF_LOGGING_LEVEL
DISPLAY_LOGGING static java.lang.String
static java.lang.String
static java.lang.String
static java.lang.String
static java.lang.String
static java.lang.String
static java.lang.String
Description
Default log level.
Whether to display debug statements in
LogCat
Whether kill switch is enabled.
Url for kill switch.
TLF_KILL_SWITCH_ENABLED
TLF_KILL_SWITCH_URL
TLF_KILL_SWITCH_MAX_NUMBER_OF_TRIES Maximum number of tries
TLF_KILL_SWITCH_TIME_INTERVAL Kill switch time interval to retry to access kill switch.
TLF_USE_WHITE_LIST
TLF_WHITE_LIST_PARAM
TLF_USE_RANDOM_SAMPLE
Whether to use white list.
Parameter that white list uses.
Whether to use random sample.
Chapter 5. Reference
109
Table 23. Tealeaf class (continued)
Field
static java.lang.String
Summary
TLF_RANDOM_SAMPLE_PARAM
TLF_HAS_TO_PERSIST_LOCAL_CACHE static java.lang.String
static java.lang.String
static java.lang.String
TLF_CACHED_LEVEL
TLF_CACHED_FILE_MAX_BYTES_SIZE static java.lang.String
static java.lang.String
static java.lang.String
static java.lang.String
static java.lang.String
TLF_POST_MESSAGE_URL
TLF_POST_MESSAGE_LEVEL_WIFI
TLF_POST_MESSAGE_LEVEL_CELLULAR
TLF_MAX_STRINGS_LENGTH
TLF_MANUAL_POST_ENABLED static java.lang.String
static java.lang.String
static java.lang.String
static java.lang.String
static java.lang.String
TLF_DO_POSTS_ON_INTERVALS
TLF_POST_MESSAGE_TIME_INTERVALS
TLF_POST_MESSAGE_MAX_BYTES_SIZE
TLF_HAS_MASKING
TLF_MASK_ID_LIST
Description
Parameter that random sample uses.
Whether it is able to save cache to device.
Cache level to be saved to device.
Maximum cache byte size to be saved to device.
Url of the target page.
Log level if current connection level is WiFi.
Log level if current connection level is cellular.
Maximum string length.
Whether to enable control of posting to target page.
Developer is responsible for posting to target page.
Whether to have framework post at a set interval.
Time interval between posts.
Maximum byte size for posting a message.
Whether to mask values of controls.
Comma-delimited string that can have IDs of controls or regular expression to find
IDs of controls.
110
IBM Tealeaf Android SDK: IBM Tealeaf Android SDK Guide
Table 23. Tealeaf class (continued)
Field
static java.lang.String
static java.lang.String
static java.lang.String
static java.lang.String
static java.lang.String
Summary
TLF_HAS_CUSTOM_MASK
TLF_SENSITIVE_SMALL_CASE_ALPHABET
TLF_SENSITIVE_CAPITAL_CASE_ALPHABET
TLF_SENSITIVE_SYMBOL
TLF_SENSITIVE_NUMBER
Description
Whether to use custom mask values to replace.
If set to false,
Logging
Framework returns an empty string.
Small letter to replace during custom mask.
Capital letter to replace during custom mask.
Symbol to replace during custom mask.
Number to replace during custom mask.
Constructor
Public Tealeaf (Application app)
Tealeaf is a library to help capture user actions in an Android application.
Parameters: v application - Reference to current Android application.
Method detail
getCurrentSessionId
public static java.lang.String getCurrentSessionId()
Get current session ID.
getDeviceId
public static java.lang.String getDeviceId()
Get device ID used with the whitelist on the kill switch server.
getPhoneId This method has been deprecated. Use getDeviceId instead.
public static java.lang.String getPhoneId()
Get phone ID used with the whitelist on the kill switch server.
setDeviceId
public static void setDeviceId(java.lang.String deviceId)
Set device ID that is used with the whitelist on the kill switch server.
setPhoneId - This method has been deprecated. Use setDeviceId instead.
public static void setPhoneId(java.lang.String phoneId)
Set phone ID that is used with the whitelist on the kill switch server.
Chapter 5. Reference
111
isEnabled
public static java.lang.Boolean isEnabled()
To enable library.
Returns whether Tealeaf library was enabled.
getApplication()
public static android.app.Application getApplication()
Reference to current Android Application.
Returns reference to current Android Application.
getMessageVersion()
public static String getMessageVersion()
Get current JSON message version.
Returns current JSON message version.
getLibraryVersion()
public static java.lang.String getLibraryVersion()
Reference to current library version.
Returns reference to current library version.
enable
public static java.ladng.Boolean enable() public static java.lang.Boolean enable(sessionId)
To enable library with a given session ID or a generated one.
v sessionId
- Given session ID to use.
Returns if Tealeaf library was enabled.
disable
public static java.lang.Boolean disable()
To disable library.
Returns if library was disabled.
onPause
public static Boolean onPause(final Activity activity, final String logicalPageName)
If not using UICActivity, add this call on your Activity file onPause method before calling super.
v activity - Activity that calls onPause.
v logicalPageName - Descriptive name of the activity that calls onPause.
Returns True/False whether it was able to pause properly.
onResume
public static Boolean onResume(final Activity activity, final String logicalPageName)
If not using UICActivity, add this call on your Activity file onResume method before calling super.
v activity
- Activity that calls onResume.
v logicalPageName - Descriptive name of the activity that calls onResume.
112
IBM Tealeaf Android SDK: IBM Tealeaf Android SDK Guide
Returns True/False whether it was able to resume properly.
onDestroy
public static Boolean onDestroy(final Activity activity, final String logicalPageName)
If not using UICActivity, add this call on your Activity file onDestroy method before calling super.
v activity - Activity that calls onResume.
v logicalPageName - Descriptive name of the activity that calls onResume.
Returns True/False whether it was able to destroy properly.
OnLowMemory
public static java.lang.Boolean OnLowMemory()
If not using UICApplication, add this call on your Application file
OnLowMemory method before calling super.
Returns:
True /False whether it was able to properly clean up.
terminate
public static java.lang.Boolean terminate()
If not using UICApplicaion, add this call on your Application file on terminate method before calling super.
Returns True/False whether it was able to terminate properly.
flush
public static java.lang.Boolean flush()
To be used to flush data.
Returns:
True
/False whether it was able to flush data back to server.
logEvent
public static java.lang.Boolean logEvent(final View view)public static java.lang.
Boolean logEvent(final View view, final java.lang.String eventType)public static java.lang.Boolean logEvent(final View view, final java.lang.String eventType, final
int logLevel)
Log an event from an event handler.
v view - Control from event handler.
v eventType - Event type of event handler.
v logLevel - Log level for TeaLeaf library.
Returns True/False whether it was able to log event.
logCustomEvent
public static java.lang.Boolean logCustomEvent(final java.lang.String eventName) public static java.lang.Boolean logCustomEvent(final java.lang.String eventName, final int logLevel)public static java.lang.Boolean logCustomEvent(final java.lang.String eventName, final
Chapter 5. Reference
113
java.util.HashMap<java.lang.String, final java.lang.
String> data)public static java.lang.
Boolean
logCustomEvent(final java.lang.String eventName, final java.util.HashMap<java.lang.String, java.lang.
String> data, final int logLevel)
Log a custom event.
v eventName - Event name to be logged.
v data - Key and value pair to be logged.
v logLevel - Log level for TeaLeaf library.
Returns True/False whether it was able to log event.
logException
public static java.lang.Boolean logException(final java.lang.Throwable exception) public static java.lang.Boolean logException(final java.lang.Throwable exception, final HashMap<String, String> data) public static java.lang.Boolean logException(final java.lang.
Throwable exception, final HashMap<String, String> data, final boolean unhandled)
Log an exception.
v exception - Exception to be logged.
v data - The HashMap data to be logged. Values for this parameter are key-value pairs.
v unhandled
- Whether the exception is handled. Values are True or False.
Returns True or Falsewhether exception was logged.
logScreenview
public static Boolean logScreenview(final Activity activity, final String logicalPageName, final ApplicationContextType applicationContextType) public static Boolean logScreenview(final Activity activity, final String logicalPageName, final ApplicationContextType applicationContextType, final String referrer)
Log an application context (screenView).
v activity - Activity with an application context (screenView) change.
v logicalPageName
- Activity's name or descriptive name that was created on device.
v applicationContextType - ApplicationContextType of the application context.
v referrer - Referrer page that logical page uses.
Returns True/False whether exception was logged.
logScreenLayout
public static Boolean logScreenLayout(final Activity activity)
Log the layout of activity immediately without a layout name.
public static Boolean logScreenLayout(final Activity activity,final
String name)
114
IBM Tealeaf Android SDK: IBM Tealeaf Android SDK Guide
Log the layout of activity immediately with a layout name.
public static Boolean logScreenLayout(final Activity activity,final
String name, final int delayMS)
Log the layout of an activity with a time delay on run.
v activity - Activity to be logged.
v name - Name of the layout.
v delayMS - Number, in milliseconds, to delay the call.
Returns: Whether the layout was logged.
public static Boolean logScreenLayout(final Activity activity, final AlertDialog alertDialog, final String title, final String message) public static Boolean logScreenLayout(final Activity activity, final AlertDialog alertDialog, final String name, final String title, final String message)
Log the layout of the alert dialog.
v activity - Activity where AlertDialog is to be logged.
v alertDialog - AlertDialog to be logged.
v name - Screenview name of where alert appears.
v title - Title displayed on the alert dialog.
v message - Message displayed on alert dialog.
Returns: Whether it was able to log the layout.
logScreenLayoutSetOnShowListener
public static Boolean logScreenLayoutSetOnShowListener
(final Activity activity, final AlertDialog alertDialog, final String title, final String message) public static Boolean logScreenLayoutSetOnShowListener
(final Activity activity, final AlertDialog alertDialog, final String name, final String title, final String message)
Log the layout of the alert dialog.
v activity - Activity where AlertDialog is to be logged.
v alertDialog - AlertDialog to be logged.
v name - Screenview name of where the alert appears.
v title - Title displayed on alert dialog.
v message
- Message displayed on alert dialog.
Returns: Whether the layout was logged.
logScreenLayoutSetOnCreate
public static Boolean logScreenLayoutOnCreate(final Activity activity, final String name)
Log the layout of the activity with OnGlobalLayoutListener to know when the view is complete.
v activity - Activity to be logged.
v name - Name of the layout.
Returns: Whether the layout was logged.
Chapter 5. Reference
115
logConnection
public static java.lang.Boolean logConnection(final java.lang.String url, final org.apache.http.HttpResponse
httpResponse, final java.util.Date initTime, final long loadTime, final
long responseTime)
Log a connection.
v url - Url of the connection.
v httpResponse - HttpResponse of the connection.
v initTime - Initial time of the response.
v loadTime - Load time of the response.
v responseTime - Response time.
Returns True/False whether connection was logged.
takeScreenShot
public static java.lang.Boolean takeScreenShot(final View view,final java.lang.
String imageFileName)
Take screen capture of given view.
Note: This method requires to be able to save to device to take screen capture.
v view - View to take screen capture.
v imageFileName - Name of the image.
Returns True/False whether screen capture was taken.
startSession
public static void startSession() public static void startSession(final sessionId)
Indicate to start with a given session ID or a generated one.
v sessionId - session ID to use.
requestManualServerPost
public static java.lang.Boolean requestManualServerPost()
Post current logged data.
Returns True/False whether data was posted.
getApplicationContextOffset
public static long getApplicationContextOffset()
The current application context offset.
Returns long: The current application context offset.
registerFormField
public static Boolean registerFormField(final View formField, final Activity activity) public static Boolean registerFormField(final View formField, final Activity activity, final int logLevel)
Register form field that helps get statistics.
v formField - Form field to register.
116
IBM Tealeaf Android SDK: IBM Tealeaf Android SDK Guide
v activity - Activity that has form field.
v logLevel - Log level for library.
Returns True/False whether form field was registered.
isApplicationInBackground
public static Boolean isApplicationInBackground()
Returns whether application was moved to background by not having any activity that is displayed in the foreground.
Returns True/False whether application was moved to background.
Reference
Table 24. Tealeaf class
Package
com.tl.uic.app
com.tl.uic
com.tl.uic.http
com.tl.uic.webkit
Class
“UICActivity class” on page 105
“UICApplication class” on page 107
TeaLeaf
Description
UICActivity used to help control library.
Application that is used to help control library.
library that is used to capture user actions.
Extends
DefaultHttpClient to monitor when a URL was requested
“TLHttpRequestInterceptor class” on page 118
“TLHttpResponseInterceptor class” on page 119
Extends
HttpRequestInterceptor to add headers for sessionization
Extends
HttpResponseInterceptor to acquire details for the connection object
“UICWebView class” on page 120
“UICWebChromeClient Class” on page
WebView used to add session ID to header requests.
Extends
WebChromeClient to monitor when browser has finished render, after which screen capture is enabled
“UICWebViewClient Class” on page 123
Extends WebViewClient to monitor when the URL was loaded to add headers for sessionization
TLDefaultHttpClient class
The com.tl.uic.http.TLDefaultHttpClient class extends org.apache.http.impl.client.DefaultHttpClient
. You use TLDefaultHttpClient to understand when a URL value was retrieved to add the IBM Tealeaf connection object.
Chapter 5. Reference
117
Note:
Instances of TlHttpRequestInterceptor class and TlHttpRequestInterceptor class are added to TLDefaultHttpClient to acquire details for IBM Tealeaf connection object.
Reference
Table 25. TLDefaultHttpClient class
Package
com.tl.uic.app
com.tl.uic
com.tl.uic.http
com.tl.uic.webkit
Class
“UICActivity class” on page 105
“UICApplication class” on page 107
TLDefaultHttpClient
“TLHttpRequestInterceptor class”
“TLHttpResponseInterceptor class” on page 119
“UICWebView class” on page 120
“UICWebChromeClient Class” on page
“UICWebViewClient Class” on page
Description
UICActivity used to help control IBM Tealeaf
Android SDK library.
Application that is used to help control IBM Tealeaf
Android SDK library.
IBM Tealeaf Android SDK library that is used to capture user actions.
Extends DefaultHttpClient to monitor when a URL was requested.
Extends
HttpRequestInterceptor to add IBM Tealeaf headers for sessionization.
Extends
HttpResponseInterceptor to acquire details for the
IBM Tealeafconnection object.
WebView used to add session ID to header requests.
Extends WebChromeClient to monitor when browser finished render after which screen capture is enabled.
Extends WebViewClient to monitor when the URL was loaded to add IBM
Tealeaf headers for sessionization.
TLHttpRequestInterceptor class
The com.tl.uic.http.TLHttpRequestInterceptor class extends org.apache.http.HttpRequestInterceptor
. You use TLHttpRequestInterceptor to add Tealeaf headers for sessionizing.
Methods overridden
v process
118
IBM Tealeaf Android SDK: IBM Tealeaf Android SDK Guide
Reference
Table 26. TLHttpRequestInterceptor class
Package
com.tl.uic.app
com.tl.uic
com.tl.uic.http
com.tl.uic.webkit
Class Description
“UICActivity class” on page 105
“UICApplication class” on page 107
Application that is used to help control IBM
Tealeaf Android SDK library.
UICActivity used to help control IBM Tealeaf
Android SDK library.
IBM Tealeaf Android SDK library that is used to capture user actions.
“TLDefaultHttpClient class” on page
TLHttpRequestInterceptor
Extends DefaultHttpClient to monitor when a URL requested.
Extends
HttpRequestInterceptor to add IBM Tealeaf headers for sessionization.
“TLHttpResponseInterceptor class”
“UICWebView class” on page 120
“UICWebChromeClient Class” on page 122
“UICWebViewClient Class” on page
Extends
HttpResponseInterceptor to acquire details for the
Tealeaf connection object.
WebView used to add session ID to header requests.
Extends
WebChromeClient to monitor when browser was finished render after which screen capture is enabled.
Extends WebViewClient to monitor when the URL loaded in to add IBM
Tealeaf headers for sessionization.
TLHttpResponseInterceptor class
The com.tl.uic.http.TLHttpResponseInterceptor class extends org.apache.http.HttpResponseInterceptor
. You use TLHttpResponseInterceptor to acquire details for the IBM Tealeaf connection object.
Methods overridden
v Process
Chapter 5. Reference
119
Reference
Table 27. TLHttpResponseInterceptor class
Package
com.tl.uic.app
com.tl.uic
com.tl.uic.http
com.tl.uic.webkit
Class Description
“UICActivity class” on page 105
“UICApplication class” on page 107
“TLDefaultHttpClient class” on page
“TLHttpRequestInterceptor class” on page 118
UICActivity used to help control IBM Tealeaf
Android SDK library.
Application that is used to help control IBM Tealeaf
Android SDK library.
IBM Tealeaf Android SDK library that is used to capture user actions.
Extends DefaultHttpClient to monitor when a URL was requested.
Extends
HttpRequestInterceptor to add IBM Tealeaf headers for sessionization.
TLHttpResponseInterceptor
Extends
HttpResponseInterceptor to acquire details for the
IBM Tealeaf connection object.
WebView used to add session ID to header requests.
“UICWebChromeClient Class” on page
Extends WebChromeClient to monitor when browser finished render after which screen capture is enabled.
“UICWebViewClient Class” on page 123 Extends WebViewClient to
monitor when the URL loaded to add IBM Tealeaf headers for sessionization.
UICWebView class
The com.tl.uic.webkit.UICWebView class extends android.webkit.WebView. You use
UICWebView to add a session ID to header requests for purposes of sessionization.
This class also adds a connection object to provide information of WebView.
Method detail
getEndLoad
public Date getEndLoad()
When page finished loading.
Returns Date: When page finished loading.
setEndLoad
public void setEndLoad(final Date endLoad)
120
IBM Tealeaf Android SDK: IBM Tealeaf Android SDK Guide
When page finished loading.
endLoad
- When page finished loading.
getStartLoad
public Date getStartLoad()
When page starts loading.
Returns Date: When page starts loading.
setStartLoad
public void setStartLoad(final Date startLoad)
When page starts loading.
StartLoad - When page starts loading.
getHttpResponse
public HttpResponse getHttpResponse()
HttpResponse from the connection.
Returns HttpResponse: HttpResponse from the connection.
setHttpResponse
public void setHttpResponse
(final HttpResponse httpResponse)
HttpResponse from the connection.
httpResponse - HttpResponse from the connection.
getInitTime
public Date getInitTime()
Initial time from the connection.
Returns Date: Initial time from the connection.
setInitTime
public void setInitTime
(final Date initTime)
Initial time from the connection.
InitTime - Initial time from the connection.
getResponseTime
public long getResponseTime()
Response time from the connection.
long
: Response time from the connection.
setResponseTime
public void setResponseTime
(final long responseTime)
Response time from the connection.
ResponseTime - Response time from the connection.
logConnection
public void logConnection()
Chapter 5. Reference
121
Logs the current connection time of the webview.
Reference
Table 28. UICWebView Class
Package Class Description
com.tl.uic.app
com.tl.uic
com.tl.uic.http
com.tl.uic.webkit
“UICActivity class” on page 105
“UICApplication class” on page 107
IBM Tealeaf Android SDK library that is used to capture user actions.
“TLDefaultHttpClient class” on page 117
Extends DefaultHttpClient to monitor when a URL was requested.
“TLHttpRequestInterceptor class” on page
Extends
HttpRequestInterceptor to add Android SDK headers for sessionization.
“TLHttpResponseInterceptor class” on page 119
UICActivity used to help control IBM Tealeaf
Android SDK library.
Application that is used to help control IBM
Tealeaf Android SDK library.
UICWebView
Extends
HttpResponseInterceptor to acquire details for the
Android SDK connection object.
WebView used to add session ID to header requests.
“UICWebViewClient Class” on page 123
Extends
WebChromeClient to monitor when browser finished render after which screen capture is enabled.
Extends WebViewClient to monitor when the URL loaded to add Android
SDK headers for sessionization.
UICWebChromeClient Class
The com.tl.uic.webkit.UICWebChromeClient class extends android.webkit.WebChromeClient
. You use UICWebChromeClient to monitor when progress of the browser finished in order to capture a screen capture of the device screen.
Methods overridden
v onProgressChanged
122
IBM Tealeaf Android SDK: IBM Tealeaf Android SDK Guide
Reference
Table 29. UICWebChromeClient class
Package
com.tl.uic.app
Class
“UICActivity class” on page 105
com.tl.uic
com.tl.uic.http
com.tl.uic.webkit
“UICApplication class” on page 107
“TLDefaultHttpClient class” on page
“TLHttpRequestInterceptor class” on page 118
“TLHttpResponseInterceptor class” on page 119
“UICWebView class” on page 120
UICWebChromeClient
Description
UICActivity used to help control IBM Tealeaf
Android SDK library.
Application that is used to help control IBM
Tealeaf Android SDK library.
IBM Tealeaf Android SDK library that is used to capture user actions.
Extends
DefaultHttpClient to monitor when a URL was requested.
Extends
HttpRequestInterceptor to add IBM Tealeaf headers for sessionization.
Extends
HttpResponseInterceptor to acquire details for the
IBM Tealeaf connection object.
WebView used to add session ID to header requests.
Extends
WebChromeClient to monitor when browser finished render after which screen capture is enabled.
Extends WebViewClient to monitor when the URL loaded to add IBM
Tealeaf headers for sessionization.
UICWebViewClient Class
The com.tl.uic.webkit.UICWebViewClient class extends android.webkit.WebViewClient
. You use UICWebViewClient to monitor when a URL is loading in order to add IBM Tealeaf headers for sessionizing.
Methods overridden
v shouldOverrideUrlLoading
Chapter 5. Reference
123
Reference
Table 30. UICWebViewClient class
Package Class Description
com.tl.uic.app
com.tl.uic
com.tl.uic.http
“UICActivity class” on page 105
“UICApplication class” on page
“TLDefaultHttpClient class” on page 117
UICActivity used to help control
IBM Tealeaf Android SDK library.
Application that is used to help control IBM Tealeaf Android SDK library.
IBM Tealeaf Android SDK library that is used to capture user actions.
Extends DefaultHttpClient to monitor when a URL was requested.
“TLHttpRequestInterceptor class” on page 118
“TLHttpResponseInterceptor class” on page 119
Extends HttpRequestInterceptor to add IBM Tealeaf headers for sessionization.
Extends HttpResponseInterceptor to acquire details for the IBM
Tealeaf connection object.
com.tl.uic.webkit “UICWebView class” on page 120
WebView used to add session ID to header requests.
“UICWebChromeClient Class” on page 122
Extends WebChromeClient to monitor when browser finished render after which screen capture is enabled.
UICWebViewClient Extends WebViewClient to monitor when the URL loaded in to add
IBM Tealeaf headers for sessionization.
124
IBM Tealeaf Android SDK: IBM Tealeaf Android SDK Guide
Advertisement
Key features
- Capture user interface and application events
- Collect data on how users interact with your application
- Improve user experience
- Optimize app performance
- Troubleshoot issues