{"action":"created","issue":{"url":"https://api.github.com/repos/BelledonneCommunications/linphone-iphone/issues/89","repository_url":"https://api.github.com/repos/BelledonneCommunications/linphone-iphone","labels_url":"https://api.github.com/repos/BelledonneCommunications/linphone-iphone/issues/89/labels{/name}","comments_url":"https://api.github.com/repos/BelledonneCommunications/linphone-iphone/issues/89/comments","events_url":"https://api.github.com/repos/BelledonneCommunications/linphone-iphone/issues/89/events","html_url":"https://github.com/BelledonneCommunications/linphone-iphone/issues/89","id":161929902,"number":89,"title":"notify_presence_received is not getting called approprietly","user":{"login":"nitesh-borad","id":17453543,"avatar_url":"https://avatars.githubusercontent.com/u/17453543?v=3","gravatar_id":"","url":"https://api.github.com/users/nitesh-borad","html_url":"https://github.com/nitesh-borad","followers_url":"https://api.github.com/users/nitesh-borad/followers","following_url":"https://api.github.com/users/nitesh-borad/following{/other_user}","gists_url":"https://api.github.com/users/nitesh-borad/gists{/gist_id}","starred_url":"https://api.github.com/users/nitesh-borad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nitesh-borad/subscriptions","organizations_url":"https://api.github.com/users/nitesh-borad/orgs","repos_url":"https://api.github.com/users/nitesh-borad/repos","events_url":"https://api.github.com/users/nitesh-borad/events{/privacy}","received_events_url":"https://api.github.com/users/nitesh-borad/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-06-23T13:59:05Z","updated_at":"2016-09-01T10:13:00Z","closed_at":"2016-09-01T10:13:00Z","body":"I have implemented code for Friend Presence referring tutorial: http://www.linphone.org/docs/liblinphone/group__buddy__tutorials.html\r\n\r\nBut, notify_presence_received method is not getting called at appropriate time. Sometimes, it gets called instantly when other user gets online/offline, sometimes not. Sometime it gets called after taking very much time, sometimes never.\r\nAnd it also gives only two statuses: online and offline. I never got other statuses like 'on-the-phone', 'busy', 'away' etc.\r\n\r\n**1. Should I do anything else apart from this tutorial code?\r\n2. At which time user gets offline status of other friend?\r\n3. Do I need to make user online/offline manually (programatically):** `linphone_core_set_presence_model(LC, linphone_presence_model_new_with_activity(LinphonePresenceActivityOnline, NULL));`\r\n\r\n  **OR it is already handled in linphone-sdk?**\r\n\r\n**4. If need to do it programatically, then where can I write code to make user offline?**\r\n\r\nI am using:\r\nXcode 7.3, iOS 9, Devices + Simulator, linphone-iphone (3.13.9) source code and sip.linphone.org accounts."},"comment":{"url":"https://api.github.com/repos/BelledonneCommunications/linphone-iphone/issues/comments/244036271","html_url":"https://github.com/BelledonneCommunications/linphone-iphone/issues/89#issuecomment-244036271","issue_url":"https://api.github.com/repos/BelledonneCommunications/linphone-iphone/issues/89","id":244036271,"user":{"login":"bagage","id":1451988,"avatar_url":"https://avatars.githubusercontent.com/u/1451988?v=3","gravatar_id":"","url":"https://api.github.com/users/bagage","html_url":"https://github.com/bagage","followers_url":"https://api.github.com/users/bagage/followers","following_url":"https://api.github.com/users/bagage/following{/other_user}","gists_url":"https://api.github.com/users/bagage/gists{/gist_id}","starred_url":"https://api.github.com/users/bagage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bagage/subscriptions","organizations_url":"https://api.github.com/users/bagage/orgs","repos_url":"https://api.github.com/users/bagage/repos","events_url":"https://api.github.com/users/bagage/events{/privacy}","received_events_url":"https://api.github.com/users/bagage/received_events","type":"User","site_admin":false},"created_at":"2016-09-01T10:12:59Z","updated_at":"2016-09-01T10:12:59Z","body":"Presence is still experimental but slowly getting stable. To get status like 'on-the-phone', you must use the following:\r\n\r\n```\r\nm = linphone_friend_get_presence_model(friend)\r\na = linphone_presence_model_get_activity(m)\r\nt = linphone_presence_activity_get_type(a) \r\n```\r\n\r\nHowever we strongly suggest not to use peer to peer presence since this consume too much network data and drain phone batteries too much. Instead you should use presence server using rls (see `linphone_friend_list_set_rls_uri`). We started adding it in iOS and Android for long term presence, but adding short term presence does not require much more work."}}
{"actor":{"display_login":"bagage"}}