{"action":"created","issue":{"url":"https://api.github.com/repos/xamarin/Xamarin.Forms/issues/4773","repository_url":"https://api.github.com/repos/xamarin/Xamarin.Forms","labels_url":"https://api.github.com/repos/xamarin/Xamarin.Forms/issues/4773/labels{/name}","comments_url":"https://api.github.com/repos/xamarin/Xamarin.Forms/issues/4773/comments","events_url":"https://api.github.com/repos/xamarin/Xamarin.Forms/issues/4773/events","html_url":"https://github.com/xamarin/Xamarin.Forms/pull/4773","id":391622915,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM5MDc1NjM3","number":4773,"title":"Add Device.IsVirtual property","user":{"login":"kzu","id":169707,"node_id":"MDQ6VXNlcjE2OTcwNw==","avatar_url":"https://avatars2.githubusercontent.com/u/169707?v=4","gravatar_id":"","url":"https://api.github.com/users/kzu","html_url":"https://github.com/kzu","followers_url":"https://api.github.com/users/kzu/followers","following_url":"https://api.github.com/users/kzu/following{/other_user}","gists_url":"https://api.github.com/users/kzu/gists{/gist_id}","starred_url":"https://api.github.com/users/kzu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kzu/subscriptions","organizations_url":"https://api.github.com/users/kzu/orgs","repos_url":"https://api.github.com/users/kzu/repos","events_url":"https://api.github.com/users/kzu/events{/privacy}","received_events_url":"https://api.github.com/users/kzu/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2018-12-17T09:26:22Z","updated_at":"2018-12-17T19:16:16Z","closed_at":"2018-12-17T19:06:04Z","author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/xamarin/Xamarin.Forms/pulls/4773","html_url":"https://github.com/xamarin/Xamarin.Forms/pull/4773","diff_url":"https://github.com/xamarin/Xamarin.Forms/pull/4773.diff","patch_url":"https://github.com/xamarin/Xamarin.Forms/pull/4773.patch"},"body":"Sometimes (especially for tooling and/or telemetry purposes) it's\r\nuseful to know if your code is running on a physical device or an\r\nemulator/simulator. Xamarin.Essentials provides this information\r\nvia the DeviceInfo class, but it requires its own separate initialization\r\nin addition to what XF already does.\r\n\r\nFor a library targeting XF, depending on Xamarin.Essentials to provide\r\nthis information would mean taking a dependency on its package.\r\nConsumers of the library would need to now know to initialize Essentials\r\nproperly or otherwise the library will fail. Since it would be a\r\ntransitive dependency, it wouldn't be easy to figure out what's\r\nrequired to make it work.\r\n\r\nSo in order to make this information available in the easiest\r\npossible way, a new `IsVirtual` property is added to the `Device`\r\nclass, which is set for Android and iOS in the same way Essentials does,\r\nbut using a simple boolean instead to reduce the added API surface.\r\n\r\n### API Changes ###\r\nAdded:\r\n - bool IsVirtual { get; } \r\n\r\n### Platforms Affected ### \r\n- iOS\r\n- Android\r\n\r\n### Behavioral/Visual Changes ###\r\nNone\r\n\r\n### Before/After Screenshots ### \r\nNot applicable\r\n\r\n### Testing Procedure ###\r\nSince this code is already tested as part of Xamarin.Essentials, likely not needed again here?\r\n\r\n### PR Checklist ###\r\n\r\n- [ ] Has automated tests <!-- (if tests are omitted or manual, state reason in description) -->\r\n- [ ] Rebased on top of the target branch at time of PR\r\n- [ ] Changes adhere to coding standard\r\n"},"comment":{"url":"https://api.github.com/repos/xamarin/Xamarin.Forms/issues/comments/447964417","html_url":"https://github.com/xamarin/Xamarin.Forms/pull/4773#issuecomment-447964417","issue_url":"https://api.github.com/repos/xamarin/Xamarin.Forms/issues/4773","id":447964417,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0Nzk2NDQxNw==","user":{"login":"kzu","id":169707,"node_id":"MDQ6VXNlcjE2OTcwNw==","avatar_url":"https://avatars2.githubusercontent.com/u/169707?v=4","gravatar_id":"","url":"https://api.github.com/users/kzu","html_url":"https://github.com/kzu","followers_url":"https://api.github.com/users/kzu/followers","following_url":"https://api.github.com/users/kzu/following{/other_user}","gists_url":"https://api.github.com/users/kzu/gists{/gist_id}","starred_url":"https://api.github.com/users/kzu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kzu/subscriptions","organizations_url":"https://api.github.com/users/kzu/orgs","repos_url":"https://api.github.com/users/kzu/repos","events_url":"https://api.github.com/users/kzu/events{/privacy}","received_events_url":"https://api.github.com/users/kzu/received_events","type":"User","site_admin":false},"created_at":"2018-12-17T19:16:16Z","updated_at":"2018-12-17T19:16:16Z","author_association":"MEMBER","body":"So no answer to my last comment, at all? :-1:"}}
{"actor":{"display_login":"kzu"}}