언어 설정

Menu
Sites
Language

Check internet connection availability

Sometimes you have to check if Internet connectivity is available. The below code shows how to use Tizen Native APIs to check if there is a Wi-Fi or the Cellular network available.

Responses

2 댓글
Dima S

Hi 

i have a couple of questions :

1. Will this work on TV nacl app?  (WIFI/ETH)

2.  the include files , <net_connection.h> , <dlog.h>  , how do i get them? 

3. will this work on simlator / emulator as well?

 

thanks

Jay Sharma

Hello,
Please correct the code, it has wrong condition:

AS-IS:

    if(connection_get_type(connection, &type) != CONNECTION_ERROR_NONE){

TO-BE:

    if(connection_get_type(connection, &type) == CONNECTION_ERROR_NONE){