SMS Parsing Delay in Tizen Native Application

Original Created May 02, 2017 | Regeneration Apr 22, 2026

When working with the Tizen Message API, I'm experiencing a delay between when an SMS is received (and appears in the inbox) and when the message callback is triggered. The callback sometimes takes several minutes to fire. Is this an issue with my application or the Tizen OS?

Problem Understanding

The user is developing a native Tizen application that needs to process incoming SMS messages immediately. While messages appear in the inbox promptly, the Message API callback experiences significant latency (several minutes) before being triggered.

Solution Methods

  1. Service Application Approach:

    • For reliable SMS processing, implement as a service application rather than a UI application
    • Enable background network support in the manifest
    • This ensures the callback triggers promptly regardless of the app's foreground state
  2. Manifest Configuration:

    • Add background-category with network support
    • Include necessary privileges for message reading
  3. Callback Implementation:

    • Properly initialize the message service
    • Implement the message received callback to handle incoming messages

Code Examples

// Service initialization
messages_service_h msg_service = NULL;
messages_open_service(&msg_service);
messages_set_message_incoming_cb(msg_service, on_message_received, NULL);

// Callback implementation
void on_message_received(messages_message_h incoming_msg, void *user_data) {
    char *message_txt = NULL;
    if(messages_get_text(incoming_msg, &message_txt) == MESSAGES_ERROR_NONE) {
        dlog_print(DLOG_DEBUG, LOG_TAG, "Message Text: %s", message_txt);
        // Process message here
    }
    free(message_txt);
}
<!-- Manifest configuration -->
<service-application appid="org.example.smsservice" exec="smsservice" multiple="false" nodisplay="true" taskmanage="false" type="capp">
    <background-category value="background-network"/>
</service-application>
<privileges>
    <privilege>http://tizen.org/privilege/message.read</privilege>
</privileges>

Additional Tips

  • This solution works on Tizen 2.3 and later versions
  • For UI applications, consider implementing a hybrid approach with a service component
  • Test thoroughly with different message types and network conditions
  • Monitor battery usage as background network operations can impact power consumption

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.