×

Discussion Board

Page 1 of 3 123 LastLast
Results 1 to 15 of 45
  1. #1
    Registered User
    Join Date
    Mar 2010
    Posts
    25

    Combining a WRT Homescreen Widget and QT Fullscreen App

    Hi team,

    The latest beta from Betalabs (Nokia Reader) does a great job of combining a WRT homescreen widget with a Qt app. I'm creating a few applications that need to have homescreen widgets on new Symbian, and as there is no way for 3rd party developers to do this solely through Qt I figure that a WRT homescreen widget is the way to go.

    The information I'm looking for (and haven't been able to find) is:

    1. How to communicate between the two seperate apps above and beyond launcher parameter calls. IE the Nokia Reader app can communicate to its widget and tell it how many unread items there are.
    2. How to package the WRT app into the same installer as the Qt application. This includes hiding it's icon so it doesn't look like you have two applications installed.


    Do you know of any documentation I can look at regarding these, or do you have any examples you can show?

    Cheers,
    Nik

  2. #2
    Nokia Developer Moderator
    Join Date
    Sep 2004
    Location
    Tampere, Finland
    Posts
    11,359

    Re: Combining a WRT Homescreen Widget and QT Fullscreen App

    It all looks really complicated, doesn't it. Install the WRT widget silently, make sure to hide its icon, ensure communication between widget and main app ... It would be a lot more easier to use the Home Screen Publisher API from the Nokia N97 SDK and create a home screen widget using it, then populate it with data by calling the C++ API.
    -- Lucian

    If you are not yet a DVLUP member it is time to correct that mistake :) Click here to join: http://www.dvlup.com/lucian/Invite

  3. #3
    Registered User
    Join Date
    Mar 2010
    Posts
    25

    Re: Combining a WRT Homescreen Widget and QT Fullscreen App

    Agreed, I'd much rather go down the API route myself and I've been successful with this on a S^1 device but it's not even populating the 'available widgets' list on S^3. I've seen the Nokia Reader widget crash and reveal itself to be WRT, so I was assuming that this was a viable option for S^3.

    Do you have a pointer on getting the N97 SDK's route working on S^3?

    Cheers

  4. #4
    Registered User
    Join Date
    May 2009
    Location
    Rome
    Posts
    268

    Re: Combining a WRT Homescreen Widget and QT Fullscreen App

    Quote Originally Posted by nik.rolls View Post
    but it's not even populating the 'available widgets' list on S^3.
    the same for me i'm stuck on N8 , can publish the widget but i can't see Image or text in any combination
    Also it show a default icon in the list when i install the Hs , not the application icon
    Well i forget HS also doesn't activate my app as clicked (still figuring out how the calls flow between app and Hs runtime is)
    Keep it simple, stupid
    borg - http://store.ovi.com/content/116105

  5. #5
    Registered User
    Join Date
    Mar 2010
    Posts
    25

    Re: Combining a WRT Homescreen Widget and QT Fullscreen App

    If publishing is working for you then you've got further than I have, as my app doesn't show up on the widget list in S^3. Are you following the N97 API by the book? I will have a play around with the code and try to figure it out.

    I vaguely recall reading somewhere that S^3 introduced new APIs for the icon and description in the widget list, though they don't seem to be documented. I wish there was something on the wiki about all of this ... I will certainly post it once I figure it out.

  6. #6
    Regular Contributor
    Join Date
    Dec 2010
    Posts
    142

    Re: Combining a WRT Homescreen Widget and QT Fullscreen App

    This a line from symbian^3 sdk release notes
    Deprecated APIs:
    ================
    • Home Screen publishing for native widget is not supported.

  7. #7
    Registered User
    Join Date
    Mar 2010
    Posts
    25

    Re: Combining a WRT Homescreen Widget and QT Fullscreen App

    Yet people are still doing it?

  8. #8
    Registered User
    Join Date
    May 2009
    Location
    Rome
    Posts
    268

    Re: Combining a WRT Homescreen Widget and QT Fullscreen App

    Quote Originally Posted by dahiya.vinod View Post
    This a line from symbian^3 sdk release notes
    Deprecated APIs:
    ================
    • Home Screen publishing for native widget is not supported.
    So funny symbian^3 sdk release notes also states

    New C++ APIs:
    =============
    • Home Screen Widget Publisher API (for publishing logo of a widget).

    Can someone explain the difference or , better , where headers and libs (and doc hopefully ) can be found?
    I can 't find it in the S^3 SDK neither in the PDK
    Last edited by lucarocchi; 2011-01-28 at 16:33.
    Keep it simple, stupid
    borg - http://store.ovi.com/content/116105

  9. #9
    Registered User
    Join Date
    May 2009
    Location
    Rome
    Posts
    268

    Re: Combining a WRT Homescreen Widget and QT Fullscreen App

    Are you following the N97 API by the book?
    main widget constructor
    m_hsWidget = new N97HomeScreenWidget(N97HomeScreenWidget::WideImage, Website::name, "0xA000A648",this);
    QPixmap *image=new QPixmap(":/icon/nokiaplay.png");
    m_hsWidget->update();
    //m_hsWidget->setImage((*image));
    m_hsWidget->setImage("e:\\Nokiaplay\\Sunny.JPG");
    N97HomeScreenWidget constructor : note i call createHsWidget here
    N97HomeScreenWidget::N97HomeScreenWidget(WidgetType widgetType, const QString& title, const QString& id, QObject *parent)
    : QObject(parent)
    , d(new Private(this))
    {
    d->m_widgetType = widgetType;
    d->m_title = title;
    d->m_id = id;

    d->m_publisher = new Hs::HsWidgetPublisher(d);

    connect(d, SIGNAL(activated()), SIGNAL(activated()));
    connect(d, SIGNAL(deactivated()), SIGNAL(deactivated()));
    connect(d, SIGNAL(suspended()), SIGNAL(suspended()));
    connect(d, SIGNAL(resumed()), SIGNAL(resumed()));
    connect(d, SIGNAL(itemActivated(N97HomeScreenWidget::Item)), SIGNAL(itemActivated(N97HomeScreenWidget::Item)));


    d->m_publisher->createHsWidget(d->templateName(), d->m_title.toUtf8().constData(), d->m_id.toUtf8().constData());
    }

    Also changed this to remove create

    void N97HomeScreenWidget::update()
    {
    try {
    //Hs::HsWidget& widget=d->m_publisher->createHsWidget(d->templateName(), d->m_title.toUtf8().constData(), d->m_id.toUtf8().constData());
    d->m_publisher->publishHsWidget(d->hsWidget());
    }catch (Hs::HsException& exception){
    int errReason = exception.getReason();
    qDebug()<<"errReason"<<errReason;
    }
    ////d->hsWidget());
    }

    Maybe mixing the lib from N97 sdk is causing troubles on S^3 ... let's doublecheck if the same lib is available in the S^3 sdk !!!
    Last edited by lucarocchi; 2011-01-28 at 11:04.
    Keep it simple, stupid
    borg - http://store.ovi.com/content/116105

  10. #10
    Registered User
    Join Date
    May 2009
    Location
    Rome
    Posts
    268

    Re: Combining a WRT Homescreen Widget and QT Fullscreen App

    Maybe mixing the lib from N97 sdk is causing troubles on S^3 ... let's doublecheck if the same lib is available in the S^3 sdk !!!
    [/QUOTE]
    Itomuta wrote this...
    http://discussion.forum.nokia.com/fo...-Symbian-3-SDK
    default icon is what i see ... so 'im pretty sure we are linking legacy lib
    Last edited by lucarocchi; 2011-01-28 at 11:18.
    Keep it simple, stupid
    borg - http://store.ovi.com/content/116105

  11. #11
    Registered User
    Join Date
    Mar 2010
    Posts
    25

    Re: Combining a WRT Homescreen Widget and QT Fullscreen App

    Looks like we are getting to the bottom of it.

    I completely understand how there is nothing completely final or supported, however I have projects on a timeframe that need to have a homescreen widget (otherwise the conversion from WRT to Qt will be a downgrade, despite the performance and visual improvements). I'm sure there are others as well as us that also need something to use in the meantime, and like us have no problem rewriting code as soon as it is officially supported.

    I'll request access to the FTP library and see where I can get with the S^3 PDK. Again I'll post my results here ... let me know how you go as well lucarocchi, I'm interested to get this working!

  12. #12
    Registered User
    Join Date
    May 2009
    Location
    Rome
    Posts
    268

    Re: Combining a WRT Homescreen Widget and QT Fullscreen App

    Hi Nik
    i got access , just ask and you receive auto response email with access credential
    I found there epoc32\release\armv5\lib\hswidgetpublisher.dso , no luck !
    After recompiling i dont see any changes , and that makes me a little depressed. No problem ,i m aware that as i feel this mood is time to stop for a while
    and let mind neural network sort out all the information and fact about the topic in background

    N97HomeScreenWidget has helped a lot as my knowledge about Symbian architecture is very poor...
    but ,maybe you already know , in the S^3 sdk there is an homescreen Symbian example , namely HSPWidget, so let's look inside Symbian code ...
    See later
    Cheers
    Keep it simple, stupid
    borg - http://store.ovi.com/content/116105

  13. #13
    Registered User
    Join Date
    Mar 2010
    Posts
    25

    Re: Combining a WRT Homescreen Widget and QT Fullscreen App

    Even getting the widget working is a start (I can do without the icon and the description if need be) so progress has been made. I'll try your code later and see if I can get it to work.

  14. #14
    Registered User
    Join Date
    May 2009
    Location
    Rome
    Posts
    268

    Re: Combining a WRT Homescreen Widget and QT Fullscreen App

    Another piece of code ...handleItemEvent to bring task to foreground

    HsWidgetExample.cpp

    void CHsWidgetExample::handleItemEvent( std::string /*aWidgetName*/,
    std::string aTemplateItemName,
    Hs::IHsDataObserver::EItemEvent /*aEvent*/)
    {
    __LOGSTR_TOFILE("Enter CHsWidgetExample::handleItemEvent");

    // this method should not leave
    // TRAP all leaving methods
    if(aTemplateItemName.compare(image)==0)
    {
    TRAP_IGNORE(ChangeWidgetValuesL());
    TRAP_IGNORE(PublishWidgetL());
    }
    else
    {
    TApaTask task( CEikonEnv::Static()->WsSession() );
    task.SetWgId(CEikonEnv::Static()->RootWin().Identifier());
    task.BringToForeground();
    }

    __LOGSTR_TOFILE("Exit CHsWidgetExample::handleItemEvent");
    }
    Keep it simple, stupid
    borg - http://store.ovi.com/content/116105

  15. #15
    Registered User
    Join Date
    May 2009
    Location
    Rome
    Posts
    268

    Re: Combining a WRT Homescreen Widget and QT Fullscreen App

    Hi again Nik , it works like a charm

    1) set title or image here , that is on Activate , really it looks obvious , now !
    void MainWindow::hsActivated(){
    m_hsWidget->setImage("e:\\Nokiaplay\\Sunny.JPG");
    m_hsWidget->update();
    qDebug()<<"hsActivated";
    }
    2) Activate app (or run ) on ItemActivate (widget click)
    void MainWindow::hsItemActivated(N97HomeScreenWidget::Item){
    TApaTask task( CEikonEnv::Static()->WsSession() );
    task.SetWgId(CEikonEnv::Static()->RootWin().Identifier());
    task.BringToForeground();
    }
    here are all lib and header i'm using , peek one by one until it compile and link
    Let me know if any troubles


    #include <aknappui.h>
    #include <e32std.h>
    #include <apgcli.h>
    #include <apacln.h>
    #include <eikproc.h>

    LIBS+=-lesock -lcommdb -linsock -leposlandmarks -lavkon -lcone -leiksrv
    LIBS+=-leuser -lestor -llbs -llmkcommonui -lservicehandler
    LIBS+=-leikcore -lws32 -lapgrfx -lapmime -lapparc #run app
    LIBS+=-lhwrmvibraclient #vibra
    LIBS+=-letel3rdparty #phonecall
    LIBS+=-lhswidgetpublisher -lfbscli #-lcharconv
    Keep it simple, stupid
    borg - http://store.ovi.com/content/116105

Similar Threads

  1. Widget transparancy on Homescreen and in general?
    By phanthomas in forum Symbian
    Replies: 5
    Last Post: 2012-07-14, 18:00
  2. Problems porting WRT widget to Qt
    By mauso in forum Qt
    Replies: 16
    Last Post: 2010-09-13, 11:52
  3. Replies: 1
    Last Post: 2009-12-20, 05:28
  4. add widget or app to N97 homescreen programatically
    By djscorpion83 in forum Symbian Signed Support, Application Packaging and Distribution and Security
    Replies: 3
    Last Post: 2009-09-22, 01:39
  5. Replies: 1
    Last Post: 2009-08-06, 04:45

Posting Permissions

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