Hi,
I am trying to get local address of device in Tizen emulator. I have tried this
const NetConnectionInfo* netInfo = Tizen::Net::NetConnectionInfo(); const IpAddress *pIp4Address = netInfo->GetLocalAddress();
But got nothing. Also tried this
NetAccountManager netAccountManager; result r; r = netAccountManager.Construct(); NetAccountId accountId = netAccountManager.GetNetAccountId(NET_BEARER_PS); NetConnection* pNetConnection = new NetConnection(); r = pNetConnection->Construct(accountId); r = pNetConnection->AddNetConnectionListener(*this); r = pNetConnection->Start(); const IpAddress* ipAddress = pNetConnection->GetNetConnectionInfo()->GetLocalAddress();
But in this case, 'pNetConnection->Start()' returns 'E_PRIVILEGE_DENIED'. If anyone can help me to know what I am missing or how to fix this problem, it'll be helpful.
Thanks.