×

Discussion Board

Results 1 to 7 of 7

Thread: WRT application

  1. #1
    Registered User
    Join Date
    Oct 2011
    Posts
    20

    WRT application

    Hello everyone

    I am on the quest of creating a simple WRT app, to display a digital clock on symbian belle. I have managed to create and display the widget on the homescreen of the device, and now i am trying to launch the digital clock app using widget.openApplication function. I have created a litlle application to which i have set the desired size (I don't need/want full screen), but despite my efforts for last two days i wasn't able to get rid of the status bar and soft keys (bottom) menu.

    If anyone could help, i would kindly ask how to:
    1) remove status bar and softkeys menu
    2) would a wrt widget run with a self signed application ?

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

    Re: WRT application

    A dedicated section to WRT in DiBo is here. You will get more and quick reply from there, so ask your question there.

  3. #3
    Nokia Developer Expert
    Join Date
    Jun 2008
    Location
    Tampere
    Posts
    833

    Re: WRT application

    Hi geco0ol and welcome to forum!

    Could you clarify what are you trying to do with the widget.openApplication and is the digital clock app a WRT widget as well?

    Br,
    Ilkka

  4. #4
    Registered User
    Join Date
    Oct 2011
    Posts
    20

    Re: WRT application

    Thank you guys for the replies.
    @ savaj. the reason for which the question is posted also here is for 1). For 2) i will post it also in the wrt related discussion board.

    Quote Originally Posted by isalento View Post
    Hi geco0ol and welcome to forum!
    Could you clarify what are you trying to do with the widget.openApplication and is the digital clock app a WRT widget as well?
    Br,
    Ilkka
    Yes. Using the widget.openApplication i am trying to launch a qt symbian application, created by me (a simple digital clock). Wheather if it's a widget or not, i can only confirm that i have added manualy TEMPLATE += app in the project file of the application i am trying to launch from within the widget. Yes, i am aware that i could not launch another widget (as the doc says), but i wonder if i can launch it just self signed (without certificates, which i haven't obtained yet). Sortly, what i am trying to achieve, on one hand to practice working with home screen widgets, and second but not last, i want to create a nice and simple digital clock, as i don't really like the digital flip clocks available on the device. I want to display the clock within the litlle widget which i have just managed to create and display it on the device.

  5. #5
    Nokia Developer Expert
    Join Date
    Jun 2008
    Location
    Tampere
    Posts
    833

    Re: WRT application

    Hi,

    Thanks for clarification. I don't remember that there would be limitations for launching self signed apps from WRT widgets.

    Following code can be used to launch an app.
    Code:
    var so;
    
    var criteria = {
       ApplicationID: "s60uid://_youruid_"
    };
    
    //call this on body onload="init();"
    function init(){
       so = device.getServiceObject("Service.AppManager", "IAppManager");
    }
    result = so.IAppManager.LaunchApp(criteria);
    If you want to use the WRT home screen widget only as a launcher that starts your Qt application, you can call launchApp when checking screen size.
    Calling window.close closes the WRT widget, but does not remove it from home screen.
    Code:
    //Miniview treshold in px
    var MINIVIEW_TRESHOLD = 150; 
    
    // Listener for the view mode changes
    window.onresize = checkViewMode;
    
    //check and updates the current view mode
    function checkViewMode(){
        if (window.innerHeight < MINIVIEW_TRESHOLD) {
    		showMiniView();
        }else {
    		result = so.IAppManager.LaunchApp(criteria);
    		window.close();        
        }
    }
    Br,
    Ilkka

  6. #6
    Registered User
    Join Date
    Oct 2011
    Posts
    20

    Re: WRT application

    Hey, thanks for the snippet.
    After i tweaked it a bit, it looks like:
    var criteria = {
    ApplicationID: "s60uid://0xffffffffe27d83ca"
    };

    //call this on body onload="init();"
    function init(){
    var so = device.getServiceObject("Service.AppManager", "IAppManager");
    result = so.IAppManager.LaunchApp(criteria);
    document.getElementById('t').innerHTML = 'err code: ' + result.ErrorCode;
    }

    where my self signed app has the uid 0xffffffffe27d83ca. The error code was: 1002, which appears to translate into:
    Bad argument type
    This error can occur for any of the following reasons:
    StartRange or EndRange is not specified or supported for the given Key.
    EndRange is less than StartRange.
    The sorting Key is not supported.

    which makes me believe that my uid is not swallowed by the OS. Furthermore by trying with the contact's app uid, the app is launched as expected.

  7. #7
    Nokia Developer Expert
    Join Date
    Jun 2008
    Location
    Tampere
    Posts
    833

    Re: WRT application

    Hi,

    Please double check your Qt Application UID, as it is way out of range. Try with something like this 0xA6547276 (just random one from Qt creator) or pick your own from unprotected range.

    -Ilkka

Similar Threads

  1. Replies: 3
    Last Post: 2010-09-16, 12:20
  2. Replies: 2
    Last Post: 2010-07-24, 06:51
  3. Replies: 0
    Last Post: 2006-05-11, 14:50
  4. Replies: 6
    Last Post: 2002-12-16, 12:33

Posting Permissions

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