Sunbird UCI
  • Overview of Sunbird UCI
  • 📙Learn
    • UCI use cases
    • UCI for Education(Case study)
    • Tech Overview
      • Glossary
      • High-level Architecture Design
      • Design Principles
      • Standards
  • 🚀Use
    • Choose your Persona
    • Adopter - Install and use UCI
      • Pre-requisites, Installation Setup, Post Setup
      • Setting up your very first conversation
      • API Documentation
      • Data Exhaust and Analytics
      • Posthog Event
      • Whatsapp (Netcore)
      • Environment Variables
    • Developer - Contribute to UCI
      • UCI Basics
        • XMessage Specification
        • Transformers
          • ODK Transformer
            • Interactive-Messages
            • Media Messages
            • Location
          • Broadcast Transformer
        • Adapters
          • Firebase Notification Adapter
        • User Segment
        • Schema Overview
          • UCI Core Schema
            • XMessage Schema
            • Assessment DB Schema
          • UCI API Schema
      • Development environment
        • Backend Setup
        • Setting up IDE
        • Environment variable setup
        • Debug services
        • Build and Execute UCI
        • Frontend Setup (Admin Console)
        • Frontend Setup (PWA)
        • Transport Socket
      • API Documentation
        • Bot Setup APIs
        • History APIs
        • Direct Message APIs
        • Vault APIs
      • Database Schema
        • Cassandra Xmessage Database
        • Postgres Forms Database
        • Postgres User Analytics Database
        • Postgres Comms Database
      • Contribution Guide
        • Your first PR
        • Contribute an Adapter
        • Adapter Implementation
        • Create a Transformer
    • Contact the administrator
  • ✅Releases
    • Release V2
  • 🤝Engage
    • Software License
    • Acceptable Use Policy
    • Terms of Service
    • Source Code
    • Discussion Forum
Powered by GitBook
On this page
  • Overview
  • 1. Send media to user
  • 2. Receive media from user

Was this helpful?

Edit on GitHub
  1. Use
  2. Developer - Contribute to UCI
  3. UCI Basics
  4. Transformers
  5. ODK Transformer

Media Messages

Overview

UCI provides an option to send media files to user or receive the media files from user. We use different types of styling tags to send media files to user.

1. Send media to user

We use below styling tags to send media files to user.

  1. image

  2. audio

  3. video

  4. file (Document files only)

As the name says these tags are used to specify the media type to be sent to user. These styling tags will be added

Steps for adding media message

For sending a media to user, add following properties in ODK form :

  • type : select_one <field_name> Column type describes the property of any particular message.

  • name : <field_name> Column name refers to unique field_name of any message.

  • label : <text> In label, we can write text content that we want to send to user. For media files mention the file name that you are uploading inside {} placeholders. For example, if your file name is 'test.png', set the label as {test.png}.

  • bind::stylingTags : image/audio/video/file This column indicates, which type of media file should be displayed to user.

  • bind::caption : <caption> This column has the caption for media file specifically for image/file. As for whatsapp the caption is required.

ODK Styling tag example:

Whatsapp Preview

2. Receive media from user

In ODK forms we can specify which type of content we want from the user. For media files, we should mention the type for media ones. Below are the types for media files.

  1. image

  2. audio

  3. video

  4. file

2.1 Steps for expecting media message

For receiving media from user, add following properties in ODK form :

  • type : image/audio/video/file Column type describes the property of any particular message.

  • name : <field_name> Column name refers to unique field_name of any message.

  • label : <text> In label, we can write text content that we want to send to user.

2.2 Allowed files types

Field Type
Allowed Media Type

Image

image/jpg, image/jpeg, image/gif, image/png

Audio

audio/mp3, audio/aac, audio/wav, audio/flac, audio/ogg, audio/ogg; audio/wma, audio/x-ms-wma, audio/mpeg

Video

video/mp4, video/flc, video/mov, video/wmv, video/mkv, video/quicktime, video/x-matroska, video/x-flv

File

application/pdf, application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document

2.3 ODK media type example

PreviousInteractive-MessagesNextLocation

Last updated 1 year ago

Was this helpful?

🚀