×

Discussion Board

Page 1 of 2 12 LastLast
Results 1 to 15 of 17
  1. #1
    Registered User
    Join Date
    Feb 2008
    Posts
    20

    Question Problem using Browser Control

    Hi,

    I´m trying to load a website inside my application. I´m using this:

    Code:
    iCommandBase = TBrCtlDefs::ECommandIdBase;
    iBrCtlInterface = CreateBrowserControlL( this, 
                rect, 
                TBrCtlDefs::ECapabilityDisplayScrollBar | TBrCtlDefs::ECapabilityLoadHttpFw |
                TBrCtlDefs::ECapabilityGraphicalHistory | TBrCtlDefs::ECapabilityGraphicalPage,
                iCommandBase, 
                NULL, 
                NULL,
                NULL, 
                NULL,
                NULL);
     
        _LIT(KUrl, "http://www.google.com");
    
        iBrCtlInterface->LoadUrlL(KUrl);
    When the method LoadUrlK is called, the application crashes. Is this code enough to load a website inside the application? Am I missing something? I tried to see the BrCtlSampleApp, and copy/paste the code above.

    Thanks,

    Pitteri

  2. #2
    Nokia Developer Champion
    Join Date
    Oct 2007
    Location
    જુનાગઢ - India
    Posts
    3,034

    Re: Problem using Browser Control

    Quote Originally Posted by pitteri View Post
    Hi,

    I´m trying to load a website inside my application. I´m using this:

    Code:
    iCommandBase = TBrCtlDefs::ECommandIdBase;
    iBrCtlInterface = CreateBrowserControlL( this, 
                rect, 
                TBrCtlDefs::ECapabilityDisplayScrollBar | TBrCtlDefs::ECapabilityLoadHttpFw |
                TBrCtlDefs::ECapabilityGraphicalHistory | TBrCtlDefs::ECapabilityGraphicalPage,
                iCommandBase, 
                NULL, 
                NULL,
                NULL, 
                NULL,
                NULL);
     
        _LIT(KUrl, "http://www.google.com");
    
        iBrCtlInterface->LoadUrlL(KUrl);
    When the method LoadUrlK is called, the application crashes. Is this code enough to load a website inside the application? Am I missing something? I tried to see the BrCtlSampleApp, and copy/paste the code above.

    Thanks,

    Pitteri
    What is panic code??? It might be possible that CreateBrowserControlL() will not returned CBrCtlInterface*.

  3. #3
    Registered User
    Join Date
    Feb 2008
    Posts
    20

    Re: Problem using Browser Control

    I can´t see the panic code. When i debug, i get this: Panic KERN-EXEC 3. Any suggestions?

    thanks

  4. #4
    Nokia Developer Champion
    Join Date
    Oct 2007
    Location
    જુનાગઢ - India
    Posts
    3,034

    Re: Problem using Browser Control

    Probably your iBrCtlInterface is NULL. Just check whether it is NULL or not before calling its method.
    if(iBrCtlInterface)
    {
    iBrCtlInterface->LoadUrlL(KUrl);
    }

  5. #5
    Registered User
    Join Date
    Feb 2008
    Posts
    20

    Re: Problem using Browser Control

    Hi,

    I tried that, but i get the same error. other message from the debug is:

    *PlatSec* WARNING - Capability check would have failed - A Message (function number=0x00000002) from Thread TestApp[e39eeb8a]0001::TestApp, sent to Server CookieServer, was checked by Thread CookieServer.exe[101f8530]0001::!CookieServer and was found to be missing the capabilities: ReadDeviceData . Additional diagnostic message: Checked by CPolicyServer::RunL

  6. #6
    Nokia Developer Champion
    Join Date
    Oct 2007
    Location
    જુનાગઢ - India
    Posts
    3,034

    Re: Problem using Browser Control

    Have you added required Capabilities?? if not then open your .mmp file and add following capability.

    Capability ReadUserData

  7. #7
    Registered User
    Join Date
    Feb 2008
    Posts
    20

    Re: Problem using Browser Control

    I added now, but still getting the same error. When i call themethod loadurll, the debug shows:

    Code:
        42.560	HTTPPLUGIN:[41d83d58] created
        42.635	CHttpFilterCameseDrmHeader::NewL
        42.635	CHttpFilterCameseDrmHeader::MHFLoad
        42.635	CHttpFilterCameseDrmHeader::MHFLoad
        42.640	CHttpFilterCameseDrmHeader::MHFLoad
        42.640	CHttpFilterCameseDrmHeader::MHFLoad
        42.640	CHttpFilterCameseMcInfo::NewL
        42.640	CHttpFilterCameseMcInfo::ConstructL
        42.645	CHttpFilterCameseMcInfo::InitializeMCInfoMemberDataL
        42.645	CHttpFilterCameseMcInfo::InitializeMCInfoMemberDataL :: SwVersion (123Þü)
        42.685	TSY: CMmPhoneTsy::ReqModeL - IPC:75, Mode:0
        42.685	TSY: CMmPhoneTsy::Request Completed - Handle:114 Error:0
        42.690	TSY: CMmPhoneTsy::ReqModeL - IPC:20037, Mode:0
        42.690	TSY: CMmPhoneTsy::ExtFunc, IPC:20037, Handle:115
        42.690	TSY: CMmPhoneTsy::DoExtFuncL - IPC:20037 Handle:115
        42.690	TSY: CMmPhoneTsy::DoExtFuncL.
      			 IPC:20037
     			 Handle:115
        42.690	TSY: CMmPhoneTsy::Request Completed - Handle:115 Error:0
        42.690	TSY: CMmPhoneTsy::ReqModeL - IPC:20037, Mode:0
        42.690	TSY: CMmPhoneTsy::ExtFunc, IPC:20037, Handle:116
        42.690	TSY: CMmPhoneTsy::DoExtFuncL - IPC:20037 Handle:116
        42.690	TSY: CMmPhoneTsy::DoExtFuncL.
      			 IPC:20037
     			 Handle:116
        42.695	TSY: CMmPhoneTsy::Request Completed - Handle:116 Error:0
        42.705	TSY: CMmPhoneTsy::ReqModeL - IPC:75, Mode:0
        42.705	TSY: CMmPhoneTsy::Request Completed - Handle:117 Error:0
        42.705	CUserAgent::CUserAgent
        42.705	ENTRY CUserAgent::ConstructL()
        42.710	EXIT CUserAgent::ConstructL()
        42.710	ENTRY CUserAgent::UserAgent()
        42.710	ENTRY CUserAgent::ReadUserAgentStringL()
        42.710	Reading default UA string from cenrep.
        42.715	ENTRY CUserAgent::GetOSVersion
        42.715	ReadTextFile-2-aError=-1
        42.715	SysVersionInfo::GetVersionInfo-4-iType=0,ret=-5
        42.715	EXIT CUserAgent::GetOSVersion
        42.715	ReadTextFile-2-aError=-1
        42.715	SysVersionInfo::GetVersionInfo-4-iType=1,ret=-5
        42.720	Reading SymbianVersion from osext extended api or cenrep.
        42.720	Reading HardwareVersion from osext extended api or cenrep.
        42.720	Reading MIDPCLDCVersion from osext extended api or cenrep.
        42.720	Successfully created a new UA string.
        42.725	EXIT CUserAgent::ReadUserAgentDataL()
        42.725	EXIT CUserAgent::UserAgent()
        42.725	ENTRY CUserAgent::MMSUserAgent()
        42.725	ENTRY CUserAgent::ReadMMSUserAgentStringL()
        42.730	Default MMS UA string is to be read from cenrep
        42.730	Successfully read default MMS UA string from cenrep, can use this as MMS UA string
        42.730	EXIT CUserAgent::ReadMMSUserAgentStringL()
        42.730	EXIT CUserAgent::MMSUserAgent()
        42.730	CUserAgent::~CUserAgent
        42.780	Thread CookieServer.exe::Main created @ 0x5caf038 - Win32 Thread ID 0xc44
        42.810	Thread CookieServer.exe::Main created @ 0x5caf6c8 - Win32 Thread ID 0x790
        42.815	CPhoneAppUI::HandleCallBackL
        42.820	CPhoneAppUI::DoHandleCallBackL
        42.820	PhoneUIStates: CPhoneStateMachineGSM::State() <
        42.820	CPhoneStateMachineGSM::State() = 2 
        42.820	PhoneUIStates: CPhoneStateMachineGSM::State() >
        42.820	PhoneUIControl: CPhoneState::HandleEnvironmentChangeL( ) <
        42.820	CPhoneState::HandleEnvironmentChangeL - Changes:  4 
        42.820	PhoneUIControl: CPhoneState::HandleEnvironmentChangeL( ) >
        42.825	CDRMClock::TimeChanged
        42.825	SYSLANG # SysLangUtil::GetInstalledLanguages(CArrayFixFlat<int> *&, RFs *) (caller thread: TestApp
        42.825	SYSLANG # SysLangUtil::CheckFS(RFs *, int &, int &)
        42.825	SYSLANG # SysLangUtil::CheckFS(RFs *, int &, int &) finished
        42.825	SYSLANG # SysLangUtil::GetInstalledLanguages(CArrayFixFlat<int> *&, RFs *) finished with 0
        42.845	CDRMClock::TimeChanged ok
        42.860	Thread ApontadorTransito::ApontadorTransito Panic KERN-EXEC 3
        42.865	Thread ApontadorTransito::43930d04e63fc63c Panic KERN-EXEC 3
        42.870	CPhoneAppUI::HandleCallBackL
        42.870	CPhoneAppUI::DoHandleCallBackL
        42.870	PhoneUIStates: CPhoneStateMachineGSM::State() <
        42.870	CPhoneStateMachineGSM::State() = 2 
        42.870	PhoneUIStates: CPhoneStateMachineGSM::State() >
        42.870	PhoneUIControl: CPhoneState::HandleEnvironmentChangeL( ) <
        42.870	CPhoneState::HandleEnvironmentChangeL - Changes:  4 
        42.870	PhoneUIControl: CPhoneState::HandleEnvironmentChangeL( ) >
        42.875	CTactileClickPlugin::OtherEvent - Begin
        42.875	CTactileClickPlugin::OtherEvent - End
        42.875	CTactileClickPlugin::OtherEvent - Begin
        42.875	CTactileClickPlugin::OtherEvent - End
        42.875	CTactileClickPlugin::OtherEvent - Begin
        42.875	CTactileClickPlugin::OtherEvent - End
        42.875	CTactileClickPlugin::OtherEvent - Begin
        42.875	CTactileClickPlugin::OtherEvent - End
        42.875	CTactileClickPlugin::OtherEvent - Begin
        42.875	CTactileClickPlugin::OtherEvent - End
        42.875	CTactileClickPlugin::OtherEvent - Begin
        42.875	CTactileClickPlugin::OtherEvent - End
        42.875	CTactileClickPlugin::OtherEvent - Begin
        42.875	CTactileClickPlugin::OtherEvent - End
        42.880	CTactileClickPlugin::OtherEvent - Begin
        42.880	CTactileClickPlugin::OtherEvent - End
        42.880	CTactileClickPlugin::OtherEvent - Begin
        42.880	CTactileClickPlugin::OtherEvent - End
        42.880	CTactileClickPlugin::OtherEvent - Begin
        42.880	CTactileClickPlugin::OtherEvent - End
        42.880	CTactileClickPlugin::OtherEvent - Begin
        42.880	CTactileClickPlugin::OtherEvent - End
        42.880	CTactileClickPlugin::OtherEvent - Begin
        42.880	CTactileClickPlugin::OtherEvent - End
        42.880	CTactileClickPlugin::OtherEvent - Begin
        42.880	CTactileClickPlugin::OtherEvent - End
        42.885	CTactileClickPlugin::OtherEvent - Begin
        42.885	CTactileClickPlugin::OtherEvent - End
        42.885	CTactileClickPlugin::OtherEvent - Begin
        42.885	CTactileClickPlugin::OtherEvent - End
        42.885	CTactileClickPlugin::OtherEvent - Begin
        42.885	CTactileClickPlugin::OtherEvent - End
        42.885	CTactileClickPlugin::OtherEvent - Begin
        42.885	CTactileClickPlugin::OtherEvent - End
        42.885	CTactileClickPlugin::OtherEvent - Begin
        42.885	CTactileClickPlugin::OtherEvent - End
        42.885	CTactileClickPlugin::OtherEvent - Begin
        42.885	CTactileClickPlugin::OtherEvent - End
        42.885	CTactileClickPlugin::OtherEvent - Begin
        42.890	CTactileClickPlugin::OtherEvent - End
        42.890	CTactileClickPlugin::OtherEvent - Begin
        42.890	CTactileClickPlugin::OtherEvent - End
        42.890	CTactileClickPlugin::OtherEvent - Begin
        42.890	CTactileClickPlugin::OtherEvent - End
        42.905	PhoneUIControl: CPhoneAppUI::HandleWsEventL<
        42.905	CPhoneAppUI::HandleWsEvent( key(-858993460), type(14) )
        42.905	CPhoneViewController::HandleResourceChangeL() GroupId 8
        42.905	PhoneUIStates: CPhoneStateMachineGSM::State() <
        42.905	CPhoneStateMachineGSM::State() = 2 
        42.910	PhoneUIStates: CPhoneStateMachineGSM::State() >
        42.910	PhoneUIControl: CPhoneState::HandlePhoneFocusLostEventL( ) <
        42.910	PhoneUIControl: CPhoneState::IsDTMFDialerVisibleL( ) <
        42.910	PHONEUI ----> VIEW <6157> message from Control. CallId: 846281492.
        42.910	PhoneUIControl: CPhoneState::IsDTMFDialerVisibleL( ) >
        42.910	PhoneUIControl: CPhoneState::HandlePhoneFocusLostEventL( ) >
        42.910	PhoneUIControl: CPhoneAppUI::HandleWsEventL>
        42.910	PhoneUIControl: CPhoneAppUI::HandleWsEventL<
        42.910	CPhoneAppUI::HandleWsEvent( key(-858993460), type(21) )
        42.915	CPhoneViewController::HandleResourceChangeL() GroupId 8
        42.915	PhoneUIStates: CPhoneStateMachineGSM::State() <
        42.915	CPhoneStateMachineGSM::State() = 2 
        42.915	PhoneUIStates: CPhoneStateMachineGSM::State() >
        42.915	PhoneUIControl: CPhoneState::HandlePhoneFocusLostEventL( ) <
        42.915	PhoneUIControl: CPhoneState::IsDTMFDialerVisibleL( ) <
        42.915	PHONEUI ----> VIEW <6157> message from Control. CallId: 846281492.
        42.915	PhoneUIControl: CPhoneState::IsDTMFDialerVisibleL( ) >
        42.915	PhoneUIControl: CPhoneState::HandlePhoneFocusLostEventL( ) >
        42.915	PhoneUIControl: CPhoneAppUI::HandleWsEventL>

  8. #8
    Nokia Developer Champion
    Join Date
    Oct 2006
    Location
    Bangalore, India
    Posts
    1,572

    Re: Problem using Browser Control

    it is "ReadDeviceData"

    see the error you got earlier... do let us know after adding this capability too !
    Amit Kankani
    Nokia Developer Champion

  9. #9
    Nokia Developer Champion
    Join Date
    Oct 2007
    Location
    જુનાગઢ - India
    Posts
    3,034

    Re: Problem using Browser Control

    Right amit, its ReadDeviceData. its mine mistake, i readed it fast.

    @pitteri:
    Also check .mmp file of example from which you took this code, and add all capability listed in it.

  10. #10
    Registered User
    Join Date
    Feb 2008
    Posts
    20

    Re: Problem using Browser Control

    I added the sample capabilities and all the libraries too, the same error ocurred. In my first post, is that code enough to have the browser? Should I implement more methods? I´m still getting Panic KERN-EXEC 3.

    Today I´ll get the sample code and try to study it.

    thanks anyway.

  11. #11
    Registered User
    Join Date
    Feb 2008
    Posts
    20

    Re: Problem using Browser Control

    I´m still getting an error. I´m glad if someone help me in the msn messenger.

    thanks

  12. #12
    Nokia Developer Champion
    Join Date
    Oct 2006
    Location
    Bangalore, India
    Posts
    1,572

    Re: Problem using Browser Control

    check this link and the related article inside it :

    http://wiki.forum.nokia.com/index.ph...er_Control_API
    Amit Kankani
    Nokia Developer Champion

  13. #13
    Registered User
    Join Date
    Feb 2008
    Posts
    20

    Re: Problem using Browser Control

    I forgot to create the observers. Now, it´s working.

    But I have one more question. I load a website inside my application, and it´s ok. When I switch to other view, and if I came back to the browser, it is gone. I mean, i want to keep the browser loaded if I switch views. Is it possible? When I call the method LoadUrlL(); for the second time, my application crashes.


    thanks

  14. #14
    Nokia Developer Champion
    Join Date
    Oct 2006
    Location
    Bangalore, India
    Posts
    1,572

    Re: Problem using Browser Control

    Well to keep the page throughout, you will need to do some trick...

    One of the tricks I have used to do similar things in past is, "not to delete the container" which contains this control... But remember, only, delete is avoided, not Push and Pop from Control Stack of the application.
    Also on next Activation of the view, We need to check if (iContainer), and if it doesn't already exist then only create one.

    This way you can solve your first problem.



    For the second problem of crash on second call to LoadUrl(), you will need to tell us the exact reason for the crash: see panic codes and let us know: also enable Just In Time Debugging, to see where exactly it panics...

    How TO??? : http://wiki.forum.nokia.com/index.ph...ded_panic_code
    Amit Kankani
    Nokia Developer Champion

  15. #15
    Registered User
    Join Date
    Feb 2008
    Posts
    20

    Re: Problem using Browser Control

    amitkankani,

    The first one I got. I don´t delete the container, and also check if it´s null to create a new when the class loads for the first time. the second one appears to be ok too. Now, I can call the loadUrlL() and the app continues running.

    Thanks,

    pitteri

Page 1 of 2 12 LastLast

Similar Threads

  1. Replies: 1
    Last Post: 2009-09-16, 02:31
  2. CCoe Control problem
    By sumit.rathi in forum Symbian C++
    Replies: 3
    Last Post: 2009-01-27, 12:25
  3. Replies: 0
    Last Post: 2007-12-24, 12:54
  4. Browser Control Redraw Problem
    By matianfu in forum Symbian C++
    Replies: 0
    Last Post: 2007-10-13, 07:42
  5. Browser Problem - inactive
    By vlvanchin in forum Mobile Web Site Development
    Replies: 3
    Last Post: 2007-01-10, 06:40

Posting Permissions

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