Re-organisation Documentation and Getting started (#2055)
* Split MQTT documentation * Add more details * Move content to /docs * Enable sidebar * Move content to /docs * Enable sidebar * Move content * Update links * Remove wizard stuff * Enable sidebar * Minor changes * Move MQTT parts to /docs * update links * Update links and sync content * Fix link * Enable sidebar * Remove navigation * Remove navigation and other minor updates * Update links * Add overview page * Make title linkable * Update * Plit content * Update links * Rearrange content * New getting-started section * Add icons for docs * Update for new structure * Update for new structure * Add docs navigation * Add docs overview page * Remove ecosystem navigation * Add docs and remove other collections * Move ecosystem to docs * Remove duplicate files * Re-add ecosystem overview * Move to ecosystem * Fix permission * Update navigation * Remove collection * Move overview to right folder * Move mqtt to upper level * Move notebook to ecosystem * Remove un-used files * Add one more rectangle for iOS * Move two parts back from docs and rename Run step * Remove colon * update getting-started section * Add redirect * Update * Update navigation
This commit is contained in:
parent
0677895b5b
commit
481320128f
138 changed files with 1309 additions and 909 deletions
|
@ -0,0 +1,77 @@
|
|||
---
|
||||
layout: page
|
||||
title: "Notification attachments"
|
||||
description: "Adding attachments to iOS push notifications"
|
||||
date: 2016-10-25 15:00:00 -0700
|
||||
sidebar: true
|
||||
comments: false
|
||||
sharing: true
|
||||
footer: true
|
||||
redirect_from: /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.
|
||||
|
||||
<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>
|
||||
|
||||
```yaml
|
||||
- alias: Notify iOS app
|
||||
trigger:
|
||||
...
|
||||
action:
|
||||
service: notify.ios_robbies_iphone_7_plus
|
||||
data:
|
||||
message: "Something happened at home!""
|
||||
data:
|
||||
attachment:
|
||||
url: https://67.media.tumblr.com/ab04c028a5244377a0ab96e73915e584/tumblr_nfn3ztLjxk1tq4of6o1_400.gif
|
||||
content-type: gif
|
||||
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
|
||||
|
||||
<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>
|
||||
|
||||
## 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.
|
Loading…
Add table
Add a link
Reference in a new issue