none
More Windows Mobile 6.5 widget questions... RRS feed

  • Question

  • Will widgets be able to:
    a) Interact with the file system
    b) Use camera dialogs (a big ask I know)
    Sunday, June 7, 2009 6:55 AM

Answers

  • A widget, out of the box, only has access to files that are inside the widget package (they live in a pretty thight sandbox), the object model can be extended (or you can also write an activeX control) to give them access to both files or the camera if you want, the only tradeoff is that you will not be able to submit it to the marketplace, however, if that is not something you are interested in doing then you can package your extension/ActiveX and the widget in a cab and deploy them that way (The marketplace cerification will fail for cabs that have widgets in them or widgets that have PE binaries in its package).

    To wite an extension you just need a COM object that implements the IDispatch interface, once that is registered in the system you can have the widget host load it for you by adding the following registry key:

    [HKEY_LOCAL_MACHINE\Software\Microsoft\Shell\Widgets\ObjectModels\<ObjectName>]

        "CLSID"="{GUID}"

    and, from javascript just do

    var myObj = widget.createObject(<ObjectName>);

    • Proposed as answer by Jorge Peraza Sunday, June 7, 2009 7:08 AM
    • Marked as answer by Kevin Daly Sunday, June 7, 2009 7:13 AM
    Sunday, June 7, 2009 7:07 AM

All replies

  • A widget, out of the box, only has access to files that are inside the widget package (they live in a pretty thight sandbox), the object model can be extended (or you can also write an activeX control) to give them access to both files or the camera if you want, the only tradeoff is that you will not be able to submit it to the marketplace, however, if that is not something you are interested in doing then you can package your extension/ActiveX and the widget in a cab and deploy them that way (The marketplace cerification will fail for cabs that have widgets in them or widgets that have PE binaries in its package).

    To wite an extension you just need a COM object that implements the IDispatch interface, once that is registered in the system you can have the widget host load it for you by adding the following registry key:

    [HKEY_LOCAL_MACHINE\Software\Microsoft\Shell\Widgets\ObjectModels\<ObjectName>]

        "CLSID"="{GUID}"

    and, from javascript just do

    var myObj = widget.createObject(<ObjectName>);

    • Proposed as answer by Jorge Peraza Sunday, June 7, 2009 7:08 AM
    • Marked as answer by Kevin Daly Sunday, June 7, 2009 7:13 AM
    Sunday, June 7, 2009 7:07 AM
  • I've just posted on getting a very basic activex sample running - http://community.softteq.com/blogs/nick/archive/2009/06/08/extending-the-widget-model-on-windows-mobile-6-5.aspx.  Hope this helps
    Nick Randolph
    Monday, June 8, 2009 10:36 AM