Skip to content
mzorz edited this page May 14, 2021 · 9 revisions

Welcome to the Stories library! This guide explains how you can use the Stories library in your project.

The Stories library will provide your users with a single screen where they can create colorful slides using either their phone's camera or pre-existing media files as backgrounds, and attach comments using fancy fonts in a friendly and intuitive way.

drawing


The Stories library is designed to have the least friction in integration, but still should be extensible. The provided UI has been entirely designed with an aim at covering the usual flows for creating image or video slides and adding them to an ordered arrangement we call a Story. Users can rearrange the order in which slides should appear, and add colorful text which they can resize and drag around intuitively.

The interface should be easy to navigate and is constrained to a single screen, which should make it easier for developers to integrate into their projects.

The output contract for the Stories library is the simplest common ground one could think of: the library will produce jpeg / mp4 files with the composition of added text / emoji. Given the common denominator is just a set of files, this loose integration contract imposes no requirements on your side with regards to how you should obtain or treat the resulting output in your project.

Metadata such as the slide arrangement, original background media used, text font used, positioning and sizing of added text is broadcasted on a simple data class named StorySaveResult via EventBus. Just registering to listen to these events will get you all the data you need in order to make sense of how the Story was created by the user, and will even allow you to serialize and save to retrieve later and let users return to editing from where they left off.

As a developer, you don't even need to worry about the internals (although you're welcome to dig in if you want to!), but persisting these result events will allow you to pass the information back to the Story composer to populate and edit previously created Stories.

Ready? Let's get started!

Next: Operating modes

Clone this wiki locally