×

Discussion Board

Results 1 to 12 of 12
  1. #1
    Regular Contributor
    Join Date
    Nov 2004
    Posts
    70

    Launch the browser, fetch a web page & obtain size of the page

    Hi,

    From my application, I can launch the web browser of 6600 phone and perhaps even tells it to fetch a web page. But is it possible to get the size (in bytes) of that web page including all embedded images?

    All I want to do is to have an application that fetches different web pages and display their sizes. The HTTP client example fetches only the main page with one GET and response transaction. It does not try to further fetch the embedded objects.

    Any suggestions are appreciated.

  2. #2
    Regular Contributor
    Join Date
    Aug 2004
    Location
    Hyderabad-India
    Posts
    160

    how to launch and fetch??

    hi,
    can u please tell me how to launch and fetch the web page??


    thanks

  3. #3
    Regular Contributor
    Join Date
    Nov 2004
    Posts
    70

    Using browser API

    Search for "browser API" in the SDK help document that comes with SDK. You can use those API to launch browser and fetch a page.

    For Series 60 2nd Edition SDK for Symbian OS, Supporting Feature Pack 2, it is in

    API Guide >> Browser API

    Early SDK may also has these APIs but I am not 100% positive.

  4. #4
    Registered User
    Join Date
    Jun 2005
    Posts
    43

    Re: Launch the browser, fetch a web page & obtain size of the page

    Hi manmli,
    how did you launch thw web Browser through your application.
    is it given In Series 60 SDk second edition?I searched for the same... but I couldn't get it.
    Please tell me...

  5. #5
    Registered User
    Join Date
    Aug 2004
    Location
    Hyderabad,India
    Posts
    808

    Re: Launch the browser, fetch a web page & obtain size of the page

    Hi amolvcpp,
    Like this
    _LIT( KMyAppName, "c:\\system\\apps\\browser\\browser.app" );
    CApaCommandLine* cmd = CApaCommandLine::NewL();
    cmd->SetLibraryNameL( KMyAppName );
    cmd->SetDocumentNameL( urlpath );
    cmd->SetCommandL( EApaCommandOpen );
    TThreadId threadid = EikDll::StartAppL( *cmd );

    BR,
    Sudhakar

  6. #6
    Regular Contributor
    Join Date
    Aug 2004
    Location
    Hyderabad-India
    Posts
    160

    Re: Launch the browser, fetch a web page & obtain size of the page

    You can also refer to the pdf given in Forum Nokia which explains
    each line of how to launch a browser with a URL from an application.
    Refer to this link:
    http://www.forum.nokia.com/info/sw.n..._v1_0.pdf.html

    --
    VVS.Naresh
    --

  7. #7
    Registered User
    Join Date
    Jun 2005
    Posts
    43

    Re: Launch the browser, fetch a web page & obtain size of the page

    Thanks for your reply,

    I have also done it in following way:which is very similar to what u have specified.
    This I found in forum nokia technical libray.

    void CWebarooContainer::LaunchBrowser()
    {
    //CEikonEnv::Static()->AlertWin(_L("LaunchBrowser() "));
    RApaLsSession apaLsSession;

    //const TUid KOSSBrowserUidValue = {0x1020724D};//defined in header
    const TUid KOSSBrowserUidValue = {0x10008D39};


    //param->Des().Copy(_L("4 http://www.google.com/"));

    TUid id(KOSSBrowserUidValue);

    TApaTaskList taskList(CEikonEnv::Static()->WsSession());

    TApaTask task = taskList.FindApp(id);

    if(task.Exists())
    {
    task.BringToForeground();
    HBufC8* param8 = HBufC8::NewLC(param->Length());
    param8->Des().Append(*param);
    task.SendMessage(TUid::Uid(0), *param8); // UID not used
    CleanupStack::PopAndDestroy(param8);
    }
    else
    {
    //CEikonEnv::Static()->AlertWin(_L("ElseTask "));
    if(!apaLsSession.Handle())
    {
    User::LeaveIfError(apaLsSession.Connect());
    }
    TThreadId thread;
    User::LeaveIfError(apaLsSession.StartDocument(*param, KOSSBrowserUidValue, thread));
    apaLsSession.Close();
    }


    }

    Only thing is that the ID they have mentioned was not working...
    So I changed it to
    const TUid KOSSBrowserUidValue = {0x10008D39};

    Thanks And Regards,
    AMOLVCPP

  8. #8
    Super Contributor
    Join Date
    Mar 2003
    Location
    Finland
    Posts
    9,569

    Re: Launch the browser, fetch a web page & obtain size of the page

    On thing worth noting is, that when you make an HTTP request, you will not get a response that says what the size of that page is or the size of content it links to (which is fetched separately), such as external stylesheets, images, videos, etc.

    So, until you fetch the whole page, and also all the items the page loads, the size will not known. That means your app would have to parse the HTML and see what other content needs to be fetched and get that, too.

  9. #9
    Registered User
    Join Date
    Nov 2006
    Posts
    22

    Re: Launch the browser, fetch a web page & obtain size of the page

    doe's anybody know how to fetch a web page ? and save it to a file?
    Thanks

  10. #10
    Registered User
    Join Date
    Oct 2007
    Posts
    5

    Re: Launch the browser, fetch a web page & obtain size of the page

    I tried amolvcpp's code, the emulator crashed at thsi line:
    TApaTask task = taskList.FindApp(id);

    Does it mean FindApp is not supported by Emulator?

    Btw, how to get UID of a built-in symbian browser?

    Thanks!

  11. #11
    Registered User
    Join Date
    Mar 2008
    Posts
    2

    Re: Launch the browser, fetch a web page & obtain size of the page

    I always get "undefined identifier 'RApaLsSession'" when using this code... Do I need to import some header file? (I'm sorry, I'm new at Symbian development..)

  12. #12
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,750

    Re: Launch the browser, fetch a web page & obtain size of the page

    Yes, Symbian API-s reside in .h and .lib files - as API-s of any other C/C++ environment would do. If you search for RApaLsSession in the SDK Help, you will find the name of the files you need on the top of the help page.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×