launching wap browser with URL
I'm trying to launch the WAP Browser (wmlBrowser.app on the device, browser.app on the emulator) at a local file; and I'm having problems. In fact I'm having problems launching it with a URL at the moment...
The code I've found (from here somewhere) is:
void CMyDocument::LaunchURL(CMyString& aLink)
{
#ifdef __WINS__
_LIT(KToDoFileName, "z:\\System\\Apps\\Browser\\Browser.app");
#else
_LIT(KToDoFileName, "z:\\System\\Apps\\WmlBrowser\\WmlBrowser.app");
#endif
CApaCommandLine* cmdLine=CApaCommandLine::NewLC();
cmdLine->SetCommandL(EApaCommandOpen);
cmdLine->SetLibraryNameL(KToDoFileName);
TPtr url((unsigned short *)aLink.Cstr(), aLink.Size());
HBufC * arg = HBufC::NewLC(url.Length()+3);
*arg = _L("4 ");
arg->Des().Append(url);
cmdLine->SetDocumentNameL(*arg);
EikDll::StartAppL(*cmdLine);
CleanupStack::PopAndDestroy(2); // cmdLine, arg
}
This launches the WAP browser, and seems to try to launch the URL passed in - but (even before trying to connect) says that the URL is invalid. Does anyone know what format is valid? I've tried a few variations but the error always pops up saying "check url" :(
And beyond that... does anyone know how (if?) I can point it at a .wml deck on the c: drive?
And finally... does anyone know what the other launch codes are? '4' in the above code seems to be the magic number for launching a URL... so what about 0, 1,2 and 3???
Cheers
Russell
Getting browser to work on emulator
What does one need to do to get the programatic browser opening to work on the Series 60 emulator? Do I have to install or configure some WAP proxy thing?
I already have the sockets example working using the virtual serial port, etc. I am running the emulator on Windows XP Pro.