简体   繁体   中英

is it possible to send push notification with video/audio IOS?

I am working on an application which uses apple push-notification. I implemented this feature and working fine, now client is asking about sending push-notification with Audio/video file.

Can you please tell me whether apple allows this type of notifications, if YES any suggestion to implement.

Thanks.

Well yes and no is the answer. You can't really include the audio/video in the push notification.

What you could do is, in the payload of the push notification, add an URL to an audio/video file. Once your user select to view the push notification you can pick up the URL and load the audio/video.

push notification is simply a message, and it has a very limited length (256 characters, including service, or more ). It can add a number on the icon, or play sound by it name (sound should be in the folder of application) and actually show a message. You can pass additional data - number, link or resourceId, but the resources need to pass in other ways

I was searching for this and found this thread. I would like to update it by saying that with iOs 10+ now images, video and audio are now supported with little limitations which are:

Devices WITH force touch support video, images and audio.

Devices WITHOUT force touch only support images. (not sure if audio is supported too, but videos definitely are not supported)

take a look at https://developer.apple.com/documentation/usernotifications/unnotificationattachment

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM