{"action":"created","issue":{"url":"https://api.github.com/repos/NativeScript/NativeScript/issues/638","labels_url":"https://api.github.com/repos/NativeScript/NativeScript/issues/638/labels{/name}","comments_url":"https://api.github.com/repos/NativeScript/NativeScript/issues/638/comments","events_url":"https://api.github.com/repos/NativeScript/NativeScript/issues/638/events","html_url":"https://github.com/NativeScript/NativeScript/issues/638","id":103754265,"number":638,"title":"Ad Control Request","user":{"login":"paranoid-android","id":4273160,"avatar_url":"https://avatars.githubusercontent.com/u/4273160?v=3","gravatar_id":"","url":"https://api.github.com/users/paranoid-android","html_url":"https://github.com/paranoid-android","followers_url":"https://api.github.com/users/paranoid-android/followers","following_url":"https://api.github.com/users/paranoid-android/following{/other_user}","gists_url":"https://api.github.com/users/paranoid-android/gists{/gist_id}","starred_url":"https://api.github.com/users/paranoid-android/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paranoid-android/subscriptions","organizations_url":"https://api.github.com/users/paranoid-android/orgs","repos_url":"https://api.github.com/users/paranoid-android/repos","events_url":"https://api.github.com/users/paranoid-android/events{/privacy}","received_events_url":"https://api.github.com/users/paranoid-android/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-08-28T16:48:43Z","updated_at":"2015-10-13T07:54:06Z","closed_at":null,"body":"The more I experiment with NativeScript, the more excited I am about it. However, one of the requests I routinely get from customers is the need to include advertisements in their apps. I hope NativeScript will provide some sort of advertisement control that would allow me to:\r\n\r\n1. Enter application and ad unit IDs by provider.\r\n    a. Enter for Android Apps\r\n    b. Enter for iOS Apps\r\n    c. Enter an Application ID and Ad Unit ID for use in Windows Apps\r\n2. Provide a way to prioritize advertisements\r\n3. Provide a way to fall back.\r\n\r\nIn general, I'm thinking of something like this:\r\n```\r\n<ui:Advertisement UseCustomFirst=\"true\" OnErrorLoadingAdvertisement=\"functionName\" OnClick=\"functionName\">\r\n  <ui:Advertisement.Android>\r\n    <ui:AdvertisementService ApplicationId=\"...\" AdUnitId=\"...\"  />\r\n  </ui:Advertisement.Android>\r\n\r\n  <ui:Advertisement.iOS>\r\n    <ui:AdvertisementService ApplicationId=\"...\" AdUnitId=\"...\"  />\r\n  </ui:Advertisement.iOS>\r\n\r\n  <ui:Advertisement.Windows>\r\n    <ui:AdvertisementService ApplicationId=\"...\" AdUnitId=\"...\"  />\r\n  <ui:Advertisement.Windows>\r\n\r\n  <ui.Advertisement.Custom>\r\n  </ui.Advertisement.Custom>\r\n</ui:Advertisement> \r\n```\r\n\r\nThe syntax is a little unique. Due to the nature of native advertisements, I'm not sure how to have OS specific advertisements and provide settings for each service. At the same time, sometimes, I need to show a custom advertisement first and fall back to the ad services. Other times, I need to do it the other way.\r\n\r\nI hope this control will be considered. If nothing else, I hope it makes it into NativeScript UI. That would be a huge, valuable addition."},"comment":{"url":"https://api.github.com/repos/NativeScript/NativeScript/issues/comments/147635270","html_url":"https://github.com/NativeScript/NativeScript/issues/638#issuecomment-147635270","issue_url":"https://api.github.com/repos/NativeScript/NativeScript/issues/638","id":147635270,"user":{"login":"N3ll","id":12541122,"avatar_url":"https://avatars.githubusercontent.com/u/12541122?v=3","gravatar_id":"","url":"https://api.github.com/users/N3ll","html_url":"https://github.com/N3ll","followers_url":"https://api.github.com/users/N3ll/followers","following_url":"https://api.github.com/users/N3ll/following{/other_user}","gists_url":"https://api.github.com/users/N3ll/gists{/gist_id}","starred_url":"https://api.github.com/users/N3ll/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/N3ll/subscriptions","organizations_url":"https://api.github.com/users/N3ll/orgs","repos_url":"https://api.github.com/users/N3ll/repos","events_url":"https://api.github.com/users/N3ll/events{/privacy}","received_events_url":"https://api.github.com/users/N3ll/received_events","type":"User","site_admin":false},"created_at":"2015-10-13T07:54:06Z","updated_at":"2015-10-13T07:54:06Z","body":"You can vote on out ideas-voting site https://nativescript.ideas.aha.io/ideas/NS-I-6."}}