×

Discussion Board

Page 1 of 2 12 LastLast
Results 1 to 15 of 23
  1. #1
    Super Contributor
    Join Date
    Nov 2010
    Posts
    1,228

    Cool How to put a .html script in my symbian application for showing ADS etc in the app.

    How to put a .html script in my symbian application for showing ADS etc in the app.

    Ok, I have to find a way to combine the script inside the html into my symbian ,c++ code



    I have the following in the saved page which is a .html script


    <script>
    var APP_NAME = "TheAppID"; //Mandatory
    var PORTAL = 559; //Mandatory - should be one of the portal's list
    var CATEGORY = "";
    var KEYWORDS = "";
    var IMPRESSION_PIXEL = "";
    var CLICK_PIXEL = "";

    document.write("<script language='javascript' src='http://ad-tag.inner-active.mobi/simpleM2M/RequestTagAd?v=Stag-2.1.0&f=4&aid=" + APP_NAME + "&po=" + PORTAL + "&c=" + CATEGORY + "&k=" + KEYWORDS + "'><\/script>");
    </script>

  2. #2
    Super Contributor
    Join Date
    Mar 2003
    Location
    Finland
    Posts
    9,561

    Re: How to put a .html script in my symbian application for showing ADS etc in the ap

    For a regular Symbian C++ app, you'd need to use the browser control component, if you don't want to parse and render the HTML yourself.

  3. #3
    Super Contributor
    Join Date
    Nov 2010
    Posts
    1,228

    Re: How to put a .html script in my symbian application for showing ADS etc in the ap

    Actually Iam using html script in my code to show ADS etc in my application. please suggest a suitable procedure.

  4. #4
    Super Contributor
    Join Date
    Mar 2003
    Location
    Finland
    Posts
    9,561

    Re: How to put a .html script in my symbian application for showing ADS etc in the ap

    Quote Originally Posted by GTO_India View Post
    please suggest a suitable procedure.
    I already did; for a Symbian C++ app, use the (S60) browser control component.

    If you, instead, use Qt/QML to write your app, it'll probably be easier (and in that case study the Qt/QML documentation, and then ask follow-up questions on Qt forums).

  5. #5
    Super Contributor
    Join Date
    Nov 2010
    Posts
    1,228

    Re: How to put a .html script in my symbian application for showing ADS etc in the ap

    browser control component means


    case ECommand1:


    {
    _LIT(aUrl," ");


    const TInt KWmlBrowserUid = 0x10008D39 ;


    RApaLsSession appArcSession;
    User::LeaveIfError(appArcSession.Connect());
    TThreadId id;
    appArcSession.StartDocument(aUrl, TUid::Uid(KWmlBrowserUid), id);
    appArcSession.Close();
    }

    ? ? ?

  6. #6
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,691

    Re: How to put a .html script in my symbian application for showing ADS etc in the ap


  7. #7
    Super Contributor
    Join Date
    Nov 2010
    Posts
    1,228

    Re: How to put a .html script in my symbian application for showing ADS etc in the ap

    Ok I got but what is this below:

    <html>
    <head>
    <!-- details omitted -->
    </head>

    <body>

    <div id="fragment01">Fragment 01</div>

    <div id="fragment02">Fragment 02</div>

    <div id="fragment03">Fragment 03.</div>

    </body>
    </html>



    Is it compulsory:


    I have a .html page called ADS.html to be inserted in the symbian code


    I have used as below


    void CPlaceads2AppView::ConstructL(const TRect& aRect)
    {
    // Create a window for this application view
    CreateWindowL();

    // Set the windows size
    SetRect(aRect);
    TRect rect( aRect.iTl, TSize( Size().iWidth, 20 ));
    iBrCtlInterface = CreateBrowserControlL( this, rect, TBrCtlDefs::ECapabilityDisplayScrollBar |
    TBrCtlDefs::ECapabilityLoadHttpFw,TBrCtlDefs::ECommandIdBase );
    iBrCtlInterface->LoadUrlL(_L("file://c:/Data/ADS.html#fragment02"));
    // Activate the window, which makes it ready to be drawn
    ActivateL();
    }



    Error reflecting as iBrCtlInterface' undeclared (first use this function) . I included #include <BrCtlInterface.h> in AppView.h


    and browserengine.lib in .mmp


    I have include ADS.html in m Data of my code file://c:/Data/test.html

  8. #8
    Super Contributor
    Join Date
    Nov 2010
    Posts
    1,228

    Re: How to put a .html script in my symbian application for showing ADS etc in the ap

    which one should I follow from the pdf above ?

    Load content from a specified URL

    or


    Call the InitLoadDataL function



    or

    Load content from a file using an RFile handle

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

    Re: How to put a .html script in my symbian application for showing ADS etc in the ap

    The example HTML in the example is just that, an example. You, of course, will use your own HTML and you should load it from where every you need to get it from (typically one makes a HTTP request to some web server to get the HTML that one wishes to display).

  10. #10
    Nokia Developer Moderator
    Join Date
    Oct 2006
    Location
    Finland
    Posts
    4,542

    Re: How to put a .html script in my symbian application for showing ADS etc in the ap

    Quote Originally Posted by GTO_India View Post
    Error reflecting as iBrCtlInterface' undeclared (first use this function) . I included #include <BrCtlInterface.h> in AppView.h


    and browserengine.lib in .mmp


    I have include ADS.html in m Data of my code file://c:/Data/test.html
    Error is for undeclared iBrCtlInterface. You should be declaring it first for it to compile.

  11. #11
    Super Contributor
    Join Date
    Nov 2010
    Posts
    1,228

    Re: How to put a .html script in my symbian application for showing ADS etc in the ap

    I did'nt get you petrib. I have pasted ADS.html page in data folder of my code.

  12. #12
    Super Contributor
    Join Date
    Nov 2010
    Posts
    1,228

    Re: How to put a .html script in my symbian application for showing ADS etc in the ap

    `iBrCtlInterface' undeclared (first use this function)


    where should I declare it. In the link it is not mentioned

    http://www.developer.nokia.com/Commu...er_Control_API

  13. #13
    Nokia Developer Moderator
    Join Date
    Oct 2006
    Location
    Finland
    Posts
    4,542

    Re: How to put a .html script in my symbian application for showing ADS etc in the ap

    Quote Originally Posted by GTO_India View Post
    `iBrCtlInterface' undeclared (first use this function)


    where should I declare it. In the link it is not mentioned

    http://www.developer.nokia.com/Commu...er_Control_API
    Declaring variables is the basics of C/C++, In this case since its preceded by 'i', it means in Symbian(again basics of Symbian), as an instance variable, and it needs to be declared in the header in your case.

  14. #14
    Nokia Developer Champion
    Join Date
    Jun 2008
    Location
    Noida,India
    Posts
    4,026

    Re: How to put a .html script in my symbian application for showing ADS etc in the ap

    Quote Originally Posted by GTO_India View Post
    `iBrCtlInterface' undeclared (first use this function)


    where should I declare it. In the link it is not mentioned

    http://www.developer.nokia.com/Commu...er_Control_API
    Sorry if i being a bit sarcastic, but after around 1.5 years(at least) in symbian, this question is a bit surprising.

  15. #15
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,691

    Re: How to put a .html script in my symbian application for showing ADS etc in the ap

    Search for non-programming programmer with Google, it is an existing phenomena, GTO_India is just one of them.

Similar Threads

  1. My Symbian^3 1.0 Sdk showing Nokia 3250 not symbian^3 device
    By dimpyik13 in forum General Development Questions
    Replies: 4
    Last Post: 2011-12-04, 12:20
  2. Replies: 5
    Last Post: 2007-01-31, 09:12
  3. Need a PHP/HTML script which integrates with SDK and send sms
    By ramanladhani in forum Tools and SDK Feedback (Closed)
    Replies: 2
    Last Post: 2007-01-14, 10:56
  4. How to Embed HTML page Within Symbian Application
    By abolfoooud in forum Symbian
    Replies: 2
    Last Post: 2005-10-23, 02:26

Posting Permissions

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