Site updated at 2017-03-18 17:12:07 UTC

This commit is contained in:
Travis CI 2017-03-18 17:12:07 +00:00
parent 7573fcba68
commit 67179bf8fe
994 changed files with 1768 additions and 68252 deletions

View file

@ -3,17 +3,14 @@
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Notification attachments - Home Assistant</title>
<meta name="author" content="Home Assistant">
<meta name="description" content="Adding attachments to iOS push notifications">
<meta name="viewport" content="width=device-width">
<link rel="canonical" href="https://home-assistant.io/docs/ecosystem/ios/notifications/attachments/">
<meta property="fb:app_id" content="338291289691179">
<meta property="og:title" content="Notification attachments">
<meta property="og:site_name" content="Home Assistant">
@ -21,39 +18,31 @@
<meta property="og:type" content="article">
<meta property="og:description" content="Adding attachments to iOS push notifications">
<meta property="og:image" content="https://home-assistant.io/images/default-social.png">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:site" content="@home_assistant">
<meta name="twitter:title" content="Notification attachments">
<meta name="twitter:description" content="Adding attachments to iOS push notifications">
<meta name="twitter:image" content="https://home-assistant.io/images/default-social.png">
<link href="/stylesheets/screen.css" media="screen, projection" rel="stylesheet">
<link href="/atom.xml" rel="alternate" title="Home Assistant" type="application/atom+xml">
<link rel='shortcut icon' href='/images/favicon.ico' />
<link rel='icon' type='image/png' href='/images/favicon-192x192.png' sizes='192x192' />
</head>
<body >
<header>
<div class="grid-wrapper">
<div class="grid">
<div class="grid__item three-tenths lap-two-sixths palm-one-whole ha-title">
<a href="/" class="site-title">
<img width='40' src='/demo/favicon-192x192.png'>
<span>Home Assistant</span>
</a>
</div>
<div class="grid__item seven-tenths lap-four-sixths palm-one-whole">
<nav>
<input type="checkbox" id="toggle">
<label for="toggle" class="toggle" data-open="Main Menu" data-close="Close Menu"></label>
<ul class="menu pull-right">
<li><a href="/getting-started/">Getting started</a></li>
<li><a href="/components/">Components</a></li>
<li><a href="/docs/">Docs</a></li>
@ -64,40 +53,24 @@
</ul>
</nav>
</div>
</div>
</div>
</header>
<div class="grid-wrapper">
<div class="grid grid-center">
<div class="grid__item two-thirds lap-one-whole palm-one-whole">
<article class="page">
<div class='edit-github'><a href='https://github.com/home-assistant/home-assistant.github.io/tree/current/source/_docs/ecosystem/ios/notifications/attachments.markdown'>Edit this page on GitHub</a></div>
<header>
<h1 class="title indent">
Notification Attachments
</h1>
</header>
<hr class="divider">
<p>iOS 10 adds <em>attachments</em> to notifications. An attachment is an image, video, or audio file which is downloaded to the device when a notification is received and shown alongside the notification. A thumbnail is shown when the notification is not expanded. The full size attachment is shown when the notification is expanded.</p>
<p class="note">
To expand a notification on 3D Touch devices simply force touch any notification. On non-3D Touch devices swipe and tap the “View” button.
</p>
<div class="language-yaml highlighter-rouge"><pre class="highlight"><code><span class="pi">-</span> <span class="s">alias</span><span class="pi">:</span> <span class="s">Notify iOS app</span>
<span class="s">trigger</span><span class="pi">:</span>
<span class="s">...</span>
@ -112,67 +85,42 @@ To expand a notification on 3D Touch devices simply force touch any notification
<span class="s">hide-thumbnail:</span><span class="nv"> </span><span class="s">false</span>
</code></pre>
</div>
<p>Notes:</p>
<ul>
<li>The thumbnail of the notification will be the media at the <code class="highlighter-rouge">url</code>.</li>
<li>The notification content is the media at the <code class="highlighter-rouge">url</code>.</li>
<li>Attachment can be used with custom push notification categories.</li>
</ul>
<h2>Example</h2>
<p class="img">
<img src="/images/ios/attachment.png" />
An unexpanded push notification with an attachment.
</p>
<p class="img">
<img src="/images/ios/expanded_attachment.png" />
The same notification but expanded to show the full size attachment
</p>
<h2>Supported media types</h2>
<p>If the attachment does not appear please ensure it is in one of the following formats:</p>
<h3>Audio attachments</h3>
<p>Maximum file size: 5 MB</p>
<p>Allowed Formats: AIFF, WAV, MP3, MPEG4 Audio</p>
<h3>Image attachments</h3>
<p>Maximum file size: 10 MB</p>
<p>Allowed Formats: JPEG, GIF, PNG</p>
<h3>Video attachments</h3>
<p>Maximum file size: 50 MB</p>
<p>Allowed Formats: MPEG, MPEG2, MPEG4, AVI</p>
<h2>Configuration</h2>
<ul>
<li><strong>url</strong> (<em>Required</em>): The URL of content to use as the attachment. This URL <em>must</em> be accessible from the Internet, or the receiving device must be on the same network as the hosted content.</li>
<li><strong>content-type</strong> (<em>Optional</em>): By default, the extension of the URL will be checked to determine the filetype. If there is no extension/it cant be determined you can manually provide a file extension.</li>
<li><strong>hide-thumbnail</strong> (<em>Optional</em>): If set to <code class="highlighter-rouge">true</code> the thumbnail will not show on the notification. The content will only be viewable by expanding.</li>
</ul>
</article>
</div>
<aside id="sidebar" class="grid__item one-third lap-one-whole palm-one-whole">
<div class="grid">
<section class="aside-module grid__item one-whole lap-one-half">
<div class='section'>
<h1 class="title delta">Topics</h1>
@ -359,13 +307,10 @@ To expand a notification on 3D Touch devices simply force touch any notification
</ul>
</div>
</section>
</div>
</aside>
</div>
</div>
<footer>
<div class="grid-wrapper">
<div class="grid">
@ -375,7 +320,6 @@ To expand a notification on 3D Touch devices simply force touch any notification
<a rel="me" href='https://facebook.com/homeassistantio'><i class="icon-facebook"></i></a>
<a rel="me" href='https://plus.google.com/110560654828510104551'><i class="icon-google-plus"></i></a>
<a rel="me" href='https://github.com/home-assistant/home-assistant'><i class="icon-github"></i></a>
<div class="credit">
Contact us at <a href='mailto:hello@home-assistant.io'>hello@home-assistant.io</a>.<br>
Website powered by <a href='http://jekyllrb.com/'>Jekyll</a> and the <a href='https://github.com/coogie/oscailte'>Oscalite theme</a>.<br />
@ -387,7 +331,6 @@ To expand a notification on 3D Touch devices simply force touch any notification
</div>
</div>
</footer>
<script>
var _gaq=[['_setAccount','UA-57927901-1'],['_trackPageview']];
(function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];
@ -395,4 +338,4 @@ To expand a notification on 3D Touch devices simply force touch any notification
s.parentNode.insertBefore(g,s)}(document,'script'));
</script>
</body>
</html>
</html>