How-to get network events in a service app?

52 views Asked by At

On Tizen (wearable), I have to create a service application which 99% inactive. However it must get a callback when network of the device changes (i.e. from no connection to LTE).

How can I get this kind of events?

1

There are 1 answers

2
Jeik On BEST ANSWER

I think the guide below seems to be helpful. https://docs.tizen.org/application/native/guides/connectivity/connection/

To monitor changes in the connection type, register and define a callback:

connection_set_type_changed_cb(connection, __connection_changed_cb, NULL);

static void
__connection_changed_cb(connection_type_e type, void* user_data)
{
    dlog_print(DLOG_INFO, LOG_TAG, "Type changed callback, connection type: %d", type);
}