×

Discussion Board

Page 1 of 2 12 LastLast
Results 1 to 15 of 19
  1. #1
    Regular Contributor
    Join Date
    Mar 2006
    Posts
    67

    Homescreen API on N97 SDK

    Hi everyone,
    Did anyone try the new Home Screen APIs on the new N97 SDK?

    There is an example HsWidget example that allows for S60 C++ code to be published to the Homescreen of the device using C++ and not HTML/CSS/JavaScript.

    This is really promising and exciting.

    However, I could not get the example to work.
    It did not do anything when I published the widget or "changed values" (options in the example).

    Did anyone have any luck with this?

    Can anyone write some nice tutorials on how to draw custom drawings and text on a widget from C++?

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

    Re: Homescreen API on N97 SDK

    Please note that the user has control over the widget, it can show it or hide it as he/she pleases. The application can register a widget (make it available to the user) but it cannot force it visible/active. The application may unregister the widget and that forces it to be removed from the homescreen as well.

    That being said, once the widget registered you have to switch back to the Homescreen view (aka Active Idle view), click/tap Options -> Edit content -> Add widget -> HSWidgetExample -> Close ... this all is out of memory, I don't have the SDK/device available. You will receive the appropriate widget state change events in your application and you can start updating your widget.
    -- 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
    Regular Contributor
    Join Date
    Mar 2006
    Posts
    67

    Re: Homescreen API on N97 SDK

    Hi,
    Thanks for your reply. It worked! :)

    Now, I have a question. I looked at the API description and it says this:

    The content displayed in the widget solely relies on the content available in widget items, published by this API. It is possible to publish data by means of a predefined widget templates. Published data may be image and/or text. Data may be published, updated, and deleted. The access control list is set automatically and it is responsible for allowing modification only from the application that has originally published the content. The picture below depicts a home screen with five widgets.

    And then gives 5 different pre-defined templates (which can be found here: http://library.forum.nokia.com/index...hing_API5.html)

    (1) Is there a way to custom draw my widget not using these templates?
    (2) Is it possible to make the widget wider or taller?
    (3) Is there a way to create my own template?

    Thanks a lot!

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

    Re: Homescreen API on N97 SDK

    1) Yes, to some extent and if you really want to do it :) You could use a bitmap as a canvas, draw your content on it and then publish it through the "wideimage" tempate. There are some problems in doing this, we are working on fixing some of them, but the main limitation is (and will remain) that you will not be able to observe from which section/pixel from the "wideimage" is a given Select event being triggered. I.e. you can make a wideimage template look like a custom template but you cannot make it act like one.

    2) No, you cannot control a widget's size.

    3) Short answer: no. Long answer: maybe, but not all that is possible should aslo be done :) Would a new template enrich the user experiece?

    If you have an idea for a template that you would like to see added to the API you may suggest it now and it could be added later to the device.
    -- 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

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

    Re: Homescreen API on N97 SDK

    P.S. Feedback regarding the Nokia N97 SDK and its new APIs/features is welcomed at http://discussion.forum.nokia.com/fo...d.php?t=166159
    -- 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

  6. #6
    Regular Contributor
    Join Date
    Mar 2006
    Posts
    67

    Re: Homescreen API on N97 SDK

    Hi again,
    Thank you for your intuitive replies.

    I wanted to also ask what are the options in interacting with the widget?

    And I will be more specific.
    I would like to show let's say several lines drawn on a "bitmap" including a drawn scrollbar (custom drawn).
    But I would like to be able to "scroll down". Meaning, when the widget has focus, if I press "down" on the d-pad and there are more items to show, it will re-paint the bitmap.

    How is this done?

    How do I tell my widget that it is in focus?
    How do I "catch" down/up events?

    And for touch devices - how do I "scroll" if there is no d-pad?

    What about a template with a scrollbar at least? or scollbar + image. When pressing the scrollbar it will update the image accordingly.

    What do you think?

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

    Re: Homescreen API on N97 SDK

    I'm afraid none of this can be done with the Homescreen Publishing API and, at least in my view, one is not supposed to use the widget this way. The homescreen widget should be all about publishing an application's "breaking news"/status update. Upon tapping/selecting the widget the focus is moved to the main application where more advanced user experience can be provided using application's rich UI and extended real estate.
    -- 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

  8. #8
    Registered User
    Join Date
    Dec 2008
    Posts
    1

    Re: Homescreen API on N97 SDK

    Hi Itomuta, am quite new to symbian, I just wanna ask this question, from the walk-through and previews of the Nokia N97 I've always noticed the widgets under-lying application have nice customized interfaces e.g Accu-weather, facebook, etc... Here are my questions:

    1. Does the N97 SDK enable us to create such stunning user interfaces easily with say, bitmaps and svg's or is it just the normal customization every SDK is capable of.

    2. As I said am a newbie to symbian, how does one go about customizing an application's UI. Is it by building custom controls??? Am dying to know all this.

    Thanks.

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

    Re: Homescreen API on N97 SDK

    Hi genderkexy,

    S60 has a publish style guyde and we recommend applications to follow it. Does not prohibit developing a fully customized UI although for a native application cusomizing the Avkon UI framework will not be at all an easy task. You may be able to customize the look and feel of existing controls to some extent but if you really want to break away from Avkon then you would have to implement your own controls.

    With the WRT widgets (not to be confused with Homescreen widgets) the story is entirely diferent and as the widgets you mentioned prove it already it is not only possible but also easy to create rich custom UIs. You do not need any special support from the SDK for such thing, it's all about knowing CSS and being a good graphic designer.
    -- 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

  10. #10
    Regular Contributor
    Join Date
    Mar 2006
    Posts
    67

    Re: Homescreen API on N97 SDK

    Quote Originally Posted by ltomuta View Post
    I'm afraid none of this can be done with the Homescreen Publishing API and, at least in my view, one is not supposed to use the widget this way. The homescreen widget should be all about publishing an application's "breaking news"/status update. Upon tapping/selecting the widget the focus is moved to the main application where more advanced user experience can be provided using application's rich UI and extended real estate.
    I might have a solution.

    The widget knows when it has focus or not (according to what you wrote).
    Then, instead of opening the application when pressing "enter" or tapping the widget, it "brings focus" into the widget, meaning the widget is now communicating with the application.

    Then you catch up/down events on the widget and send that information to the main application.

    The main application creates a new bitmap and shows it on the widget (with the updated screen).

    When you tap the widget again, it loses focus.

    Is this technically possible?

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

    Re: Homescreen API on N97 SDK

    hi m00gl3,

    I'm afraid it won't work. The Homescreen Publishing API only allows you to pass content between your application and the actual AI plug-in that will render it, there is no way for you to get access to the control in which the conten is displayed. Not having access to that control you will not have access to its key/pen event either, only a select event will be sent to you.

    With a tempate that has more that one items you could eventually implement this kind of trick: e.g. in "onerow" template the image could act as a "next" button while your actual content is in the text section. A click on the image brings the next content. A click on the text opens the app to see more details about that topic.
    -- 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

  12. #12
    Regular Contributor
    Join Date
    Mar 2006
    Posts
    67

    Re: Homescreen API on N97 SDK

    Quote Originally Posted by ltomuta View Post
    hi m00gl3,

    I'm afraid it won't work. The Homescreen Publishing API only allows you to pass content between your application and the actual AI plug-in that will render it, there is no way for you to get access to the control in which the conten is displayed. Not having access to that control you will not have access to its key/pen event either, only a select event will be sent to you.

    With a tempate that has more that one items you could eventually implement this kind of trick: e.g. in "onerow" template the image could act as a "next" button while your actual content is in the text section. A click on the image brings the next content. A click on the text opens the app to see more details about that topic.
    Hi Lucian,
    Why not open up the Homescreen API to be able to interact with an application?

    Windows Mobile has allowed this for many years with their "Today Plugin" system.

    This type of interaction will completely expand the abilities of 3rd party developers to create exciting applications that appear on the homescreen, and not a simple "text/text+image" widget which is very limited.

    What do you think?

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

    Re: Homescreen API on N97 SDK

    This particular API has a limited use case in mind and allows you only to publish content in predefined layouts. It was not supposed to do more and it doesn't.

    I shall try to have a look at that "Today Plugin" but I expect that we do have the same capabilities with the Active Idle plug-ins (the homescreen publisher plug-in is a particular implementation of such plug-in), except that the feature is not public.

    As said from the begining, we are still open to receive your feedback (see link in previous post) and, why not, hear your requirements. You should not expect more than bug fixes from this API/device but other devices may offer you the support/features you need.
    -- 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

  14. #14
    Registered User
    Join Date
    May 2009
    Posts
    30

    Re: Homescreen API on N97 SDK

    was going through the interesting discussion in this thread. i have question for ITOMUTA

    "With a tempate that has more that one items you could eventually implement this kind of trick: e.g. in "onerow" template the image could act as a "next" button while your actual content is in the text section. A click on the image brings the next content. A click on the text opens the app to see more details about that topic."

    On one hand you say that in "onerow" template you can get 2 trigger event and on the other hand you say, you can not observe from which section/pixel the event is triggered.

    "Yes, to some extent and if you really want to do it You could use a bitmap as a canvas, draw your content on it and then publish it through the "wideimage" tempate. There are some problems in doing this, we are working on fixing some of them, but the main limitation is (and will remain) that you will not be able to observe from which section/pixel from the "wideimage" is a given Select event being triggered. I.e. you can make a wideimage template look like a custom template but you cannot make it act like one."


    Please explain bit more on that and how is this possible "In "onerow" template the image could act as a "next" button while your actual content is in the text section".

    Regards,

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

    Re: Homescreen API on N97 SDK

    Please see the docs for the Homescreen Publishing API. There are several predefined templates that can be used, each having a certain number of items/elements (images and/or text). A template will generate a select event for each such item if it actually has content displayed in it, otherwise the item is disabled. With the "onerow" template you can get the events from the two predefined items, the image and the text.

    The discussion about not being able to know the exact pixel there the event was triggered is in the particular case of the "wideimage" template if one attempts to use it as a canvas for "simulating" customized tempates. As the template only has one item (image) you will receive only one select event not being able to determine the precise point of tapping (not to mention that the widget could be accessed and selected using the keyboard, which makes the entire pixel level discussion impossible).

    So, with the "wideimage" template you can still have your custom designs, maybe with the layout generated at runtime and rendered as a big image to be displayed in the widget. You cannot howver define active areas on such a layout and get events from them.

    With a "onerow" template your layout is hardcoded but you have two active areas which you use as you wish, including the scenario described above in which one area is used as a command trigger that updates the second area.
    -- 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

Similar Threads

  1. Replies: 15
    Last Post: 2008-11-06, 17:38
  2. Nokia 6131 NFC SDK v. 1.1 has been released!
    By Raluca_ in forum Near Field Communication
    Replies: 8
    Last Post: 2008-05-29, 13:54
  3. Cannot add bluetooth API permission in JBuilder X Mobile When Using S60 3rd SDK
    By jianpang@hotmail.com in forum Mobile Java Tools & SDKs
    Replies: 0
    Last Post: 2007-07-26, 00:30
  4. The SyncML API in Nokia's SDK (S60 FP3)?
    By hupo in forum OMA DM/DS/CP
    Replies: 0
    Last Post: 2006-08-02, 09:34

Posting Permissions

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