Skip to content
Auto-screenshot library from OneSky
Java
Find file
Latest commit 5ef6935 Apr 26, 2016 @bretdabaker bretdabaker Untrack IDE files

README.md

OneSky Auto Screenshot Library for Android

This library helps you easily upload screenshots of your app that contains localizable strings to your OneSky project.

NOTE: This library is not designed for distribution on Google Play Store so remember to remove before submission.

Installation

NOTE: This library is now available on maven central (v0.7.0 or above), if you are updating from previous versions, remove the github repository block from pom.xml or build.gradle

You can install this plugin manually or use maven/gradle to apply the plugin to your project.

Android Studio/Gradle

Add the follow code to your build.gradle

    dependencies {
        // other dependencies.
        compile "com.oneskyapp:screenshot:0.7.5"
    }

Remote Maven Repository

Add the follow code to your pom.xml

    <dependencies>
        <dependency>
            <groupId>com.oneskyapp</groupId>
            <artifactId>screenshot</artifactId>
            <version>0.7.5</version>
        </dependency>
    </dependencies>

Download .jar file to libs folder

  1. Download OneSkyScreenshotHelper-v0.7.5.jar in the release tab in this GitHub page and drag it into the libs folder of your project.
  2. On Eclipse you are good to go.
  3. On Android Studio, locate the build.gradle file under your app's module and add the following:
    dependencies {
        compile files("OneSkyScreenshotHelper-v0.7.5.jar")
    }

Integration

<?xml version="1.0" encoding="utf-8"?>
<manifest>
    <!-- Internet permission for uploading screenshots to OneSky server -->
    <uses-permission android:name="android.permission.INTERNET"/>

    <application>
        <!-- declare service for screenshot button -->
        <service android:name="com.oneskyapp.screenshot.ScreenshotButtonService" />
    </application>

</manifest>

In your Application or main Activity subclass file, import the library:

import com.oneskyapp.screenshot.OneSkyScreenshotHelper;

Add the following code in under onCreate():

OneSkyScreenshotHelper.getHelper().setApiKey("ONESKY_API_KEY");
OneSkyScreenshotHelper.getHelper().setApiSecret("ONESKY_API_SECRET");
OneSkyScreenshotHelper.getHelper().setProjectId("ONESKY_PROJECT_ID");

// Auto loading string resources is now removed to support Android Studio 2.0 Instant Run
// so you will need to manually specify the resource classes that contain the identifiers
OneSkyScreenshotHelper.getHelper().startCapturing(this, R.string.class, R.array.class);
// for Activity subclasses, use startCapturing(this.getApplication())

ONESKY_API_KEY, ONESKY_API_SECRET can be found in Site Settings under API Keys & Usage on OneSky Web Admin. ONESKY_PROJECT_ID can be found under All Projects page.

NOTE: The above parameters must be set before calling startCapturing().

Advance Settings

Turn off capture status Toast updates.

OneSkyScreenshotHelper.getHelper().setShowsCaptureStatus(false);

Turn on/off debug messages in your logs.

OneSkyScreenshotHelper.getHelper().setDebug(true);

Support

http://support.oneskyapp.com/

Something went wrong with that request. Please try again.