WidgetService sendContent/getContent Returning Empty Object

Original Created Jan 15, 2017 | Regeneration Apr 22, 2026

I'm trying to use WidgetService as described in the documentation. I've copied the example exactly and set the required permissions, but getContent() always returns an empty object without any exceptions. I'm unable to determine whether the issue is with sendContent() or getContent().

Could this be a bug, or am I missing something in the implementation?

Problem Understanding

The user is experiencing issues with WidgetService where getContent() returns an empty object despite proper implementation and permissions. The problem occurs without any error messages, making it difficult to diagnose.

Solution Methods

  1. Verify Sample Implementation:

    • Check the WidgetServiceSample in Tizen Studio (New > Sample > Wearable 2.3.2 > Web application > Application > WidgetServiceSample)
    • Compare your implementation with the sample code, particularly the sendContent() usage
  2. Check Required Privileges: Ensure your config.xml includes these essential privileges:

    <tizen:privilege name="http://tizen.org/privilege/widget.viewer"/>
    <tizen:privilege name="http://tizen.org/privilege/application.info"/>
    <tizen:privilege name="http://tizen.org/privilege/application.launch"/>
    
  3. Review API Documentation:

    • Consult the WidgetService API reference for proper usage of getContent()
    • Verify the expected return values and required parameters

Code Examples

Here's a basic implementation example:

// Sending content to widget
widgetInstance.sendContent({
  title: "Widget Title",
  content: "Widget Content"
});

// Retrieving content from widget
var content = widgetInstance.getContent();
console.log(content); // Should display the sent content

Additional Tips

  • Ensure your widget ID matches between the sender and receiver applications
  • Verify that both applications are properly signed with the same certificate
  • Check for any console warnings that might indicate permission issues
  • Consider testing with simple string content before moving to complex objects

Customize your cookie preferences

You can enable or disable non-essential cookies. Essential cookies are always on to ensure the site works properly and to keep you signed in.

Necessary

These cookies are necessary for the website to function properly and cannot be switched off. They help with things like logging in and setting your privacy preferences.

Always on

Analytics

These cookies help us improve the site by tracking which pages are most popular and how visitors move around the site.

Enable analytics cookies
Public Forum Public Forum
Employees only. Please sign in with your company account.