Up

Integration for Android

Important note: Android users will need to make sure they use the most up to date version of the Ubertesters hub app to enjoy all the latest features of the Ubertesters SDK. You can install the app by opening dashboard.ubertesters.com/m on your device’s browser and clicking on the ‘Install Ubertesters’ link
Download the latest version
Download V 2.3.4 Released: November 28, 2016
Requirements Requires Android 2.3 or later
Release notes
v. 2.3.4
  • Improved permissions screen in Ubertesters app
  • Fixed bugs
v. 2.3.1
  • Added ‘permissions’ window
  • Optimized hub performance
  • Fixed bugs
v. 2.1.6
  • Changed the logic of ‘UT widget’ performance
  • Fixed issues with Activity tracking
  • Fixed bugs
v. 2.1.5
  • Added an option to disable Ubertesters SDK on production
  • Fixed bugs
v. 2.1.4
  • Improved UT hub performance in Offline mode
  • Fixed bugs
v. 2.1.0
  • Improved and optimized ‘UT widget’ performance
  • Fixed bugs
v. 2.0.8
  • Optimized activity tracking performance
  • Added the bug-submission interface for beta-testers users
  • Fixed bugs
v. 2.0.6
  • Optimized the Ubertesters SDK performance on the devices with the enabled ART mode.
v. 2.0.5
  • Fixed the bug with Ubertesters widget appearing when the app is folded up
  • Fixed ‘grey screen’ bug affecting the app performance
v. 2.0.4
  • Fixed the bugs affecting the Ubertesters SDK performance on devices that run Android 5.0
v. 2.0.3
  • Added Android 5.0 support
v. 2.0.2
  • Added the new API methods: Ubertesters.disableCrashHandler(), Ubertesters.setBeforeSendIssueListener(), Ubertesters.setBeforeSendCrashListener()
  • Renamed Ubertesters options for locking and activation mode
  • Ubertesters Project ID parameter is replaced with Ubertesters Organization SDK Token
v. 2.0.1
  • Removed Ubertesters.setIsIgnored(false); method
  • Fixed problem with dynamic menu behavior
Important note: Please make sure you’ve compiled the apk file using the debug key. In case the .apk is signed with the release key, Ubertesters functionality will be disabled.
    1. Add Android ubertesters library to your project

      1. Download ubertesters.sdk.android.zip
      2. Extract ubertester.sdk.android.jar from archive
      3. Put ubertester.sdk.android.jar to ‘libs’ folder in your project
    2. Open project manifest file AndroidManifest.xml and modify the following:

      • Add permissions into <manifest> tag
        <?xml version="1.0" encoding="utf-8"?>
        <manifest xmlns:android="http://schemas.android.com/apk/res/android"
                  package="your package"
                  android:versionCode="1"
                  android:versionName="1.0">
        
            ...
        
            <!-- Ubertesters library user-permissions -->
            
            <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
            
            <!-- Ubertesters library user-permissions -->
        
            ...
        </manifest>
        According to Android specifications, starting in API level 19, “WRITE_EXTERNAL_STORAGE” permission is no longer required to read/write files in your application. Please do not include it in your AndroidManifest file..
      • Open http://beta.ubertesters.com/projects and select your project, go to SDK Integration
      • Copy “Ubertesters Organization SDK token”
      • Add “Ubertesters Organization SDK token” to project manifest file into <application> tag
        <application>
        
            ...
        
            <meta-data android:name="ubertesters_organization_token" android:value="your
        organization sdk token"/>
        
            ...
        
        </application>
    3. Modify your project application class to initialize Ubertesters library:

      It is possible to initialize Ubertesters in 3 ways:
      1. Using initializer with the default options:
        import com.ubertesters.sdk.Ubertesters;
        ...
        public class YourApplicationClass extends Application {
         @Override
            public void onCreate() {
              super.onCreate();
              Ubertesters.initialize(this);
            }
        }
        Where the default options are:
        LockingMode.DisableUbertesters, ActivationMode.Widget
      2. Using initializer with two parameters:
        import com.ubertesters.common.models.LockingMode;
        import com.ubertesters.sdk.Ubertesters;
        ...
        Ubertesters.initialize(this,
            LockingMode.DisableUbertesters);
        The parameter for the activation mode is ActivationMode.Widget
      3. Using initializer with three parameters:
        Import com.ubertesters.common.models.ActivationMode;
        import com.ubertesters.common.models.LockingMode;
        import com.ubertesters.sdk.Ubertesters;
        
        Ubertesters.initialize(this,
            LockingMode.DisableUbertesters, ActivationMode.Widget);
        
            public enum ActivationMode {
                Widget,
                Shake,
                Manually
            }
      The Ubertesters SDK options determine the behavior of Ubertesters widget (with the help of which you call the bug submission screen) and the behavior of the Ubertesters app when the build/app is not available in Ubertesters system. According to their functions, all the options can be divided in two groups – activation mode options and locking mode options. You can use the following options for customized initializer: Activation mode:
      ActivationMode.Widget The Ubertesters widget (an orange bubble) is shown, and you need to click on it to call a bug submission screen.
      ActivationMode.Shake The widget is not shown, you need to shake your phone to call a menu for a bug submission or take a screenshot.
      ActivationMode.Manual The Ubertesters widget is not shown, a menu should be called with the help of our API methods. You can specify the conditions under which the Ubertesters menu will be shown.
      Locking mode:
      LockingMode.DisableUbertesters This option will not lock your application if the build is not uploaded on our server, but the Ubertesters SDK will be disabled.
      LockingMode.LockApplication Ubertesters SDK locks the app completely if the build is not located on our server, it is impossible to navigate through the app
      Example:
      import com.ubertesters.common.models.ActivationMode;
      import com.ubertesters.common.models.LockingMode;
      import com.ubertesters.sdk.Ubertesters;
      ...
      Ubertesters.initialize(this,
          LockingMode.DisableUbertesters, ActivationMode.Widget);
      
          public enum ActivationMode {
              Widget,
              Shake,
              Manually
          }
Ubertesters SDK is used for beta-testing. Please make sure you’ve removed Ubertesters SDK before publishing your app to Play Market.
  1. Ubertesters SDK API methods

    API methods allow the developers to call additional methods and customize our SDK according to their needs. Remote Logging To perform remote logging you can use the Log method. UT log is a function with a text and a log level. Remote logging allows you to send an important system event information to Ubertesters server dedicating to storing and archiving this data. You can check the sent logs in your Ubertesters account in Activity > Session > Session Tracking It is possible to use the following API methods for remote logging:
    Method Action
    Ubertesters.logger().info(“logs”); Sends info logs
    Ubertesters.logger().warn(“logs”); Sends warning logs
    Ubertesters.logger().error(“logs”); Sends error logs
    Example:
    import com.ubertesters.sdk.Ubertesters;
    
    ...
    
    Ubertesters.logger().info("logs");
    API methods used with ActivationMode.Manual option These methods allow to specify the behavior of the Ubertesters bug submission screen in case ActivationMode.Manual mode is used.
    Method Action
    Ubertesters.takeScreenshot(); Catches the screenshot
    Ubertesters.showMenu(); Shows Ubertesters bug submission screen
    Ubertesters.hideMenu(); Hides Ubertesters bug submission screen
    Example
    import com.ubertesters.sdk.Ubertesters;
    
    ...
    
    Ubertesters.takeScreenshot();
    Other API methods:
    Method Action
    Ubertesters.disableCrashHandler(); Disables Ubertesters crash handler. Allows using our platform along with third party crash reporters.
    Ubertesters.setBeforeSendIssueListener(Ubertesters.IBeforeSendIssueListener) Allows the developer to add extra data parameters to the reports sent to the server when the issue is reported.
    Ubertesters.setBeforeSendCrashListener(Ubertesters.IBeforeSendCrashListener) Allows the developer to add extra data parameters to the reports sent to the server when the crash is reported.
    Examples: Disable Crash Handler:
    import com.ubertesters.sdk.Ubertesters;
    ...
    Ubertesters.disableCrashHandler();
    
    Add extra data for the issue:
    import com.ubertesters.sdk.Ubertesters;
    ...
       Ubertesters.setBeforeSendIssueListener(new Ubertesters.IBeforeSendIssueListener() {
    
        @Override
        public void addExtraIssueParameter(ExtraDataMap extra) {
         extra.add("your_key", "your extra data");
        }
       });