mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-02 15:06:51 +00:00

* 🔥 Removes octopress.js * 🔥 Removes use of root_url var * 🔥 Removes Octopress generator reference from feed * 🔥 Removes delicious support * 🔥 Removes support for Pinboard * 🔥 Removes support for Disqus * 🔥 Removes support for Google Plus * ↩️ Migrate custom after_footer to default template * ↩️ Migrate custom footer to default template * ↩️ Migrate custom header to default template * 🔥 Removes unused template files * 🚀 Places time to read directly in post template * 🚀 Removes unneeded capture from archive_post.html template * 🔥 🚀 Removes unused, but heaving sorting call in component page * 🚀 Merged javascripts into a single file * 🔥 Removes more uses of root_url * 🚀 Removal of unneeded captures from head * 🔥 🚀 Removal of expensive liquid HTML compressor * 🔥 Removes unneeded templates * 🚀 Replaces kramdown with GitHub's CommonMark 🚀 * 💄 Adds Prism code syntax highlighting * ✨ Adds support for redirect in Netlify * ↩️ 🔥 Let Netlify handle all developer doc redirects * ✏️ Fixes typo in redirects file: Netify -> Netlify * 🔥 Removes unused .themes folder * 🔥 Removes unused aside.html template * 🔥 Removes Disqus config leftover * 🔥 Removes rouge highlighter config * 🔥 Removes Octopress 🎉 * 💄 Adjust code block font size and adds soft wraps * 💄 Adds styling for inline code blocks * 💄 Improve styling of note/warning/info boxes + div support * 🔨 Rewrites all note/warning/info boxes
2.4 KiB
2.4 KiB
title, description, redirect_from
title | description | redirect_from |
---|---|---|
Notification attachments | Adding attachments to iOS push notifications | /ecosystem/ios/notifications/attachments/ |
iOS 10 adds attachments 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.
To expand a notification on 3D Touch devices simply force touch any notification. On non-3D Touch devices swipe and tap the "View" button.
- alias: Notify iOS app
trigger:
...
action:
service: notify.ios_robbies_iphone_7_plus
data:
message: "Something happened at home!"
data:
attachment:
url: "https://github.com/home-assistant/home-assistant-assets/blob/master/logo-round-192x192.png?raw=true"
content-type: png
hide-thumbnail: false
Notes:
- The thumbnail of the notification will be the media at the
url
. - The notification content is the media at the
url
. - Attachment can be used with custom push notification categories.
Example
An unexpanded push notification with an attachment.
The same notification but expanded to show the full size attachment
Supported media types
If the attachment does not appear please ensure it is in one of the following formats:
Audio attachments
Maximum file size: 5 MB
Allowed Formats: AIFF, WAV, MP3, MPEG4 Audio
Image attachments
Maximum file size: 10 MB
Allowed Formats: JPEG, GIF, PNG
Video attachments
Maximum file size: 50 MB
Allowed Formats: MPEG, MPEG2, MPEG4, AVI
Configuration
- url (Required): The URL of content to use as the attachment. This URL must be accessible from the Internet, or the receiving device must be on the same network as the hosted content.
- content-type (Optional): By default, the extension of the URL will be checked to determine the filetype. If there is no extension/it can't be determined you can manually provide a file extension.
- hide-thumbnail (Optional): If set to
true
the thumbnail will not show on the notification. The content will only be viewable by expanding.