Spectrum

Spectrum

  • About Spectrum
  • Getting Started
  • GitHub

›Contributing

Intro

  • About Spectrum

Getting Started

  • Getting Started on Android
  • Getting Started on iOS
  • Sample Apps

Concepts

  • Supported Image Flows
  • Supported Image Formats

Using Spectrum

  • Transcoding Images for Upload
  • Resizing Images
  • Cropping Images
  • Rotating Images
  • Encoding Images
  • FAQ

Contributing

  • Project Structure
  • Contributing on Android
  • Contributing on iOS

Contributing on Android

Thank you for your interest in contributing to Spectrum! We try to make the experience as smooth as possible despite Spectrum's numerous external dependencies.

Prerequisites

Before checking out the code please ensure that the following tools are correctly setup and up-to-date.

  • Ensure that you have the latest Android Studio and SDK tools installed on your machine.
  • Setup the latest Native Development Kit (NDK) and verify your setup with the sample C++ project in Android Studio.

Preparing the project

Fork the Spectrum project or checkout the sources of our main repository:

git clone https://github.com/facebookincubator/spectrum.git

The external native dependencies require preparation to correctly show up in Android Studio. Therefore, run the following command to before opening the project in Android Studio:

cd your/checkout/of/spectrum/
./gradlew prepareNativeLibrary

Testing your changes

We will only accept pull requests that come with a plausible test plan. If your change affects the output of an image operation, provide the input image, the output image before the change, and the output image after the change. Also include any output from adb logcat.

Also verify that Android unit tests pass. You can run them using the following command:

./gradlew test

For running the extensive GTests on the native code, please see the Contributing on iOS section of this documentation. For native changes we recommend following that guide and to use Xcode.

← Project StructureContributing on iOS →
  • Prerequisites
  • Preparing the project
  • Testing your changes
Spectrum
Docs
About SpectrumGetting StartedContributing
Community
FacebookTwitter
Legal
Terms of UseData PolicyCookie Policy
More
GitHubStar
Facebook Open Source
Copyright © 2022 Facebook