in your app
Web control
return r;
}
return r;
}
EditField* pEdit =
static_cast<EditField*>(GetControl(L"IDC_EDITFIELD1"));
__pWebControl->LoadUrl(str);
I want to save
user’s choice
item: 1 item: 0
Get a HistoryItem
const HistoryItem* pItem = pNav->GetItemAt(index);
String title = pItem->GetTitle();
String url = pItem->GetUrl();
Osp::Web::Controls::DecisionPolicy
XXX::OnWebDataReceived(const String& mime, HttpHeader &httpHeader)
{
// if you handle data by yourself
return WEB_DECISION_IGNORE;
+ -
WebControl
– http://code.google.com/intl/en/apis/maps/docu
mentation/v3/
Map methods
map.setCenter(/* coordinate */)
map.setZoom(/* zoom level */)
map.getZoom()
</script>
</script>
String* pStr;
pStr = __pWebControl->EvaluateJavascriptN(L"map.getZoom();");
if (null == pStr)
{
return -1;
}
int zoomLevel;
Integer::Parse(*pStr, zoomLevel);
delete pStr;
return zoomLevel;
}
navigator.geolocation.getCurrentPosition
( /* success callback */, /* error callback */ );
function sucessCallback(position) {
initialLocation = new google.maps.LatLng(position.coords.latitude,
position.coords.longitude);
map.setCenter(initialLocation);
}
function errorCallback() {
initialLocation = //default location;
map.setCenter(initialLocation);
}
AppControl (Browser)
– Launch the web browser
– Your application and the browser work
simultaneously
APPCONTROL_CALENDAR APPCONTROL_MEDIA
Copyright© 2010 Samsung Electronics, Co., Ltd. All rights reserved. 37
Using AppControl (Browser)
Build a URL string
Build URL strings as an ArrayList
Find the AppControl for the browser
Launch the AppControl
– Start(const IList*,
const IAppControlEventListener* )
Clean up
AppControl* pAc =
AppManager::FindAppControlN(APPCONTROL_BROWSER,"");
AppControl* pAc =
AppManager::FindAppControlN(APPCONTROL_BROWSER,"");
if (pAc)
{
pAc->Start(pDataList, null);
delete pAc;
}
AppControl* pAc =
AppManager::FindAppControlN(APPCONTROL_BROWSER,"");
if (pAc)
{
pAc->Start(pDataList, null);
delete pAc;
}
pDataList->RemoveAll(true);
delete pDataList;
Samples:
– WebViewer
HTML5
– Canvas: 2D vector drawing
– Audio / Video : Embedded player for audio and video
CSS3