|Table of Contents|
Video of how the Poll app uses an Attachment Picker
What is an attachment picker?
Clicking on the polls app button in the attachment picker on mobile or desktop, opens a modal widget, which the user then uses to create a poll.
What are the available actions for an attachment picker button?
When a user presses the attachment picker button, you can configure it to do one of the below -
Alongwith launching any of the above, a client.pressButton event will also be passed as a parameter to the web app URL loaded in any of the above widgets or browser
- Go through Creating an App to setup your app in the developer dashboard.
In the Advanced Info section, enable the attachment picker.
Provide Fill in the info below details:
- Go through app installation and install this app into your own Flock account.
- Whenever a user presses the attachment picker button, the event client.pressButton along with a validation event token will be appended to the corresponding client action you selected and sent to your service.
- After verifying the validation token, you should present the interface for the user to create an attachment.
- Once the user has finished creating the attachment you can send it to back to Flock to the chat tab from where the user clicked on your attachment picker by creating a message object, with an attachment object, and sending the message to Flock via the chat.sendMessage method call.
- Publish your app to the app store once you are done testing it.