63
6: Code sample
}
/**
* @see
net.rim.device.api.browser.RenderingApplication#getAvailableWidth(net.rim.device.api.brows
er.BrowserContent)
*/
public int getAvailableWidth(BrowserContent browserField) {
// field has full screen
return Graphics.getScreenWidth();
}
/**
* @see
net.rim.device.api.browser.RenderingApplication#getHistoryPosition(net.rim.device.api.brow
ser.BrowserContent)
*/
public int getHistoryPosition(BrowserContent browserField) {
// no history support
return 0;
}
/**
* @see
net.rim.device.api.browser.RenderingApplication#getHTTPCookie(java.lang.String)
*/
public String getHTTPCookie(String url) {
// no cookie support
return null;
}
/**
* @see
net.rim.device.api.browser.RenderingApplication#getResource(net.rim.device.api.browser.Req
uestedResource,
* net.rim.device.api.browser.BrowserContent)
*/
public HttpConnection getResource( RequestedResource resource, BrowserContent referrer)
{
if (resource == null) {
return null;
}
// check if this is cache-only request
if (resource.isCacheOnly()) {
// no cache support
return null;
}
String url = resource.getUrl();
if (url == null) {
return null;
}
// if referrer is null we must return the connection
if (referrer == null) {
Summary of Contents for JAVA DEVELOPMENT ENVIRONMENT - - DEVICE APPLICATIONS INTEGRATION - DEVELOPMENT GUIDE
Page 4: ......
Page 7: ......
Page 10: ...10 BlackBerry Device Applications Integration Guide...
Page 12: ...12 BlackBerry Device Applications Integration Guide...
Page 50: ...50 BlackBerry Device Applications Integration Guide...
Page 56: ...56 BlackBerry Device Applications Integration Guide...
Page 65: ......
Page 66: ...2008 Research In Motion Limited Published in Canada...