Getting Started for Android Studio IDE

Add Gooten SDK to your project

  1. In your project, open your_app | Gradle Scripts | build.gradle

  2. Add the Maven Central Repository to build.gradle before dependencies:

    repositories {
  3. Add compile com.gooten:gooten-android-sdk:3.3.14 to your build.gradle dependencies.

  4. Copy Fonts

    Create fonts folder in your project’s assets dir. Then copy fonts from this archive to fonts folder.

  5. Build your project.

Quick Launch Code

Here is example for launching Gooten SDK with minimal configuration.

// Create PIOConfig object which will be used to configure SDK
PIOConfig config = new PIOConfig();

// Mandatory config – set API key provided for every partner
config.setRecipeID("<INSERT YOUR KEY HERE>");

// Optional config – set available photo sources
	new PhonePhotoSource()

try {
	// Set configuration object and start Gooten SDK
	PIO.setConfig(this, config);
} catch (PIOException e) {

Quick Launch Result

After SDK has launches successfully (using “Quick Launch” code from above) you should see screen similar as on following screenshot:

Successfull launch screenshot

Optional SDK Configuration

  • Using defaul products settings – If you would like to use all available products and SKUs with default pricing you can configure SDK by setting following property of PIOConfig object:

  • Testing orders – If you would like to test placing orders without paying real money you can configure SDK by setting following property of PIOConfig object:

  • Passing in images – SDK allows you to set predefined list of images that will be available to the user. To do so you will need to set list of URIs of predefined images and set/add PreselectedPhotoSource to the list of available photo sources.

        // Set URIs to predefined images
      config.setImageUris(Arrays.asList("<URI to image 1>", "<URI to image 2>"));
      // Set Preselected photo source as single photo source. 
      // Preselected photo source will only show photos that were passed in using PIOConfig#setImageUris method.
      	new PreselectedPhotoSource()