Mobile SDK Sizes

iOS SDK Framework

The pre-compiled iOS Framework is approx. 100 Mb

Why is it so big?

  • the pre-compiled framework has to support several iOS architectures (arm7, arm7s, arm64)

Once compiled into an .ipa the sdk is ~3MB

Android SDK Library

Once included in the apk the additional size <1 MB and adds ~5K methods.

 

More details here:

HelloWorld application w/o the Applause SDK

HelloWorld application with the Applause SDK

 

 

 

New Look Android and iOS Mobile SDKs

Android SDK  3.4.0 and iOS  SDK 3.3.0 introduce a completely new UI to the mobile sdks a bit darker and much cleaner.

  

Android | iOS

  

Enter your registered email address to access MBM.

  

Once in the app shake or use the notification bar to create a new report. As before you have two options: Report a Bug or Give feedback.

Please notice the new settings option (three dots in Android and cog in iOS)

  

Settings View

  

In the Settings view you will find the following:

  • email address of the participant
  • Ability to Update the version of the application (if available)
  • Show Tutorial (the blue screen)
  • Switch accounts to another MBM participant
  • Allow data to be sent over a cellular network

Reporting Bugs  

  

Reporting Feedback

  

  

  

  

Additional Information

EXAMPLE APPLICATION

Want to see the Mobile SDK up and running in a demo project right now? Take a look at our Android Hello World application – available in Github.

https://github.com/ApplauseAQI/AH-Android-Int

STEP 1 – INTEGRATE THE MOBILE SDK

First visit the  download page to get the latest Applause Android SDK

If you’re not using gradle please see:

STEP 2 – RUN THE SDK

Each time your app launches, you should start a new Applause SDK session. The only action to take is to invoke the Applause.startNewSession() method in the onCreate event of your application class.

Please note the ‘withUTestEnabled‘ flag. If you’re using beta.applause.com then this has to be set to false. But if you’re using our uTest testing services it should be true.

First, make sure you import the Applause SDK

import com.applause.android.Applause;
import com.applause.android.config.Configuration;

Then launch the Applause SDK

public class MyApplication extends Application {
    @Override
    public void onCreate() {
        super.onCreate();
        Configuration configuration = new Configuration.Builder(this)
            .withAPIKey("Your-API-Key-Goes-Here")
            .withUTestEnabled(false)
            .build();
Applause.startNewSession(this, configuration);
    }
}


APP Key

Note in order for your application logs, bugs and crashes to be reported to your application you have to add the API key within the confiuration.

Go to beta.applause.com and in the dashboard or settings of your application you’ll see your app  key.

STEP 3 – PERMISSIONS

By default the SDK adds the android.permission.INTERNET permission. This is required for SDK to contact the sessions server.

Applause SDK is capable of gathering device state like Bluetooth or Networking. Please check the detailed instructions in this section.

Additional Information

Android SDK: Under the Hood

How does the Applause Android SDK catch crashes?

The Android SDK makes use of the following method:

setDefaultUncaughtExceptionHandler 

Sets the default uncaught exception handler.

Where is the crash / bug data stored?

We have implemented our own extension of the UncaughtExceptionHandler (ApplauseUncaughtExceptionHandler). This handles all crashes from an application once the Android SDK is integrated into the app.

All crash data and bugs are stored in the application’s sandbox.

How often does the Applause Android SDK send data to Applause servers?

  • Bugs & Feedback are sent immediately as long as their is connectivity or as soon as connectivity is restored.
  • Crashes are stored and sent when the app restarts (this is because there is usually not enough time to send the data at the time of an app crash)
  • Logs are sent periodically (when a pre-sized buffer is filled) or if the data is consider ‘stale’.

Android 5.1 Important Information (for SDK versions before 3.3.0)

Important Update:  In response to the permissions model change in Android M we’ve made some changes in how the Applause SDK UI is displayed in version 3.3.0 and this permission is no longer required – that’s good right?!

The release of Android 5.1 brought with it some important changes. In terms of the Applause Android SDK it means we had to update the SDK and developers will have to upgrade to the latest version of Android SDK  or else their app will crash on startup on Android 5.1 devices.

On pre Android 5.1 we were able to show  any dialog ui at any time for any app. Starting from 5.1 the bug the application needs to have following permission in AndroidManifest
http://developer.android.com/reference/android/Manifest.permission.html#SYSTEM_ALERT_WINDOW

This is also included in step 3 of the  Android SDK Integration Guide

 

STEP 1 – INTEGRATE THE APPLAUSE ANDROID  SDK

STEP 1 – INTEGRATE THE APPLAUSE ANDROID  SDK

Please see:  our download page  to get the latest Android SDK

STEP 2 – RUN THE SDK

Each time your app launches, you should start a new Applause SDK session. The only action to take is to invoke the Applause.startNewSession() method in the onCreate event of your application class.

First, make sure you import the Applause SDK

import com.applause.android.Applause;

Then launch the Applause SDK

public class MyApplication extends Application {
    @Override
    public void onCreate() {
        super.onCreate();
        Applause.startNewSession(this, "Your-Application-Key-Goes-Here");
    }
}

STEP 3 – MODIFY THE ANDOIRD MANIFEST FILE

Make sure to declare Applause SDK activities in the <application> section. The result should look as follows

<application>
  <activity android:name="com.applause.android.ui.ProblemActivity" />
  <activity android:name="com.applause.android.ui.FeedbackActivity" />
  <activity android:name="com.applause.android.ui.ScreenshotEditorActivity" />
</application>

STEP 4 – PERMISSIONS

Appluase SDK requires the android.permission.INTERNET permission to work. Please add following line inside <manifest> tags

<uses-permission android:name="android.permission.INTERNET"/>

Appluase SDK is capable of gathering device state like Bluetooth or Networking. Please check detailed instruction in this section.

For more info

For more information like setting the API key go to the main help page

Logging Events to the SDK Server

  The Applause SDK allows you to manually log events to the Applause SDK server. This can be useful when you are debugging problems or crash reports submitted by your users because you can track custom defined activities from your application.

The Applause SDK comes with its own logging library com.applause.Log, which you can use in place of the standard Android logging library. This class mimics the standard android.util.Log and has the same interfaces including the Log.v, Log.d, Log.i, Log.w and Log.e methods. Also, the Applause SDK’s logging methods will still pass your data to Logcat.

The easiest way to have all your logs go through the Applause SDK is to replace the import statement:

import android.util.Log;

with

import com.applause.android.Log;

Filtering sessions by logging level

You can control the level logging sent to the Applause web panel in your App Settings via the ‘SDK Logging’ options.

Configuring Optional Android SDK Permissions

The Applause  SDK is capable of gathering device state and other contextual information. Note that the none of the permissions below are not obligatory. The SDK will detect their declaration in AndroidManifest.xml file and start to monitor the device.

Please refer to Android security docs for more information about app permissions.

READ_EXTERNAL_STORAGE

We strongly recommend enabling the READ_EXTERNAL_STORAGE  permission. This will allow the Applause SDK to create bug attachments from OS Gallery and Camera.

<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />

READ_PHONE_STATE

We strongly recommend enabling the READ_PHONE_STATE permission. This will allow the Applause SDK to get information about the carrier, provided  the SIM card is present.

<uses-permission android:name="android.permission.READ_PHONE_STATE" />

ACCESS_WIFI_STATE & ACCESS_NETWORK_STATE

Both permissions allow the SDK to gather information about  connectivity. It is recommended that developers enable these permissions and capture this information.

<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

ACCESS_COARSE_LOCATION & ACCESS_FINE_LOCATION

These allow the Applause SDK to report location information based on both coarse references (the location of the nearest mobile network tower) and precise references (such as GPS).

<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />

BLUETOOTH & BLUETOOTH_ADMIN

This allows the Applause SDK to report information about the device’s Bluetooth interface, including its state (on/off) and pair/unpair events.

<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />

Android SDK Advanced Configuration Options

Android SDK Advanced Configuration Options

Changing Settings

The SDK is configurable. This page describes some changes to the behaviour of the SDK.

API key

Sets the API. Calling this method is obligatory for custom conifguration. There is no default value. The API tells the SDK to which Applause App bugs, crashes, logs and feedback will be sent.

For API key represented by String value

IBuilder withAPIKey(String key);

The API key can also be represented by a resource id

IBuilder withAPIKey(int resId);

Mode

With Applause SDK you can pick the following two modes:

  • QA Mode (Mode.QA): Use this mode to fully activate the Mobile SDK for your testing. When testers start your app, they will be presented with a login screen so that the Applause SDK can associate their bugs with their Applause SDK accounts. Full details about the app and device state are sent with logs, sessions, bug reports, and crash reports. This mode is the default, and in most cases, you should choose this mode
  • Market Mode (Mode.MARKET): This mode hides the Applause SDK from the user. They will not be able to login to the Applause SDK server or report bugs from the app.

The default mode is Mode.QA.

IBuilder withMode(Applause.Mode mode);

Report On Shake

The default is true. Specifies whether to report bugs by shaking the device.

IBuilder withReportOnShakeEnabled(boolean shakeEnabled);

Applause Integration (Enable Feedback)

The default value is false. Activate Applause’s integration with uTest. Set this to false if you are not an Applause customer and you’re not using Applause SDK with the Applause community. NOTE: This also enables/disables theFeedback button in the SDK UI. If you want to collect user feedback in addition to bugs, this flag should be set tofalse. Feedback will be available within the SDK platform’s control panel ([sdk.applause.com]).

IBuilder withUTestEnabled(boolean withUTest);

Customize Notifications shown in your app

The default value is ‘true’. If this is set to false, the only method to report bugs will be the shake gesture. It will also had the ‘logged in’ notification.

IBuilder withNotificationsEnabled(boolean notificationsEnabled);

Server URL

The default server is https://sdk.applause.com. If you are using the SDK in conjunction with an on-premise installation then you will have to override this to ensure your applause traffic goes to the right server.

IBuilder withServerURL(String serverURL);

Set default user

Specify the default user. For password authentication the login field will be filled with this e-mail address. In case of the quick authentication the SDK will use this e-mail automatically if the user is present in the white list.

Placing anonymous@apphance.com as an argument will trigger the login automatically. No login dialog will be displayed

There is no default value.

IBuilder withDefaultUser(String defaultUser);

Build the configuration

Please remember to call

Configuration build();

method on builder object before passing the custom configuration to Applause SDK.

How to start new session with custom configuration

The startNewSession method instead of API_KEY acceppts the custom configuration.

import com.applause.android.Applause;
import com.applause.android.config.Configuration;

public class MyApplication extends Application {
    @Override
    public void onCreate() {
        super.onCreate();
        Configuration.Builder builder = new Configuration.Builder(this);
        builder.withAPIKey("MY_API_KEY");
        builder.withMode(Applause.Mode.QA);
        builder.withReportOnShakeEnabled(true);
        builder.withServerURL("https://sdk.applause.com");
        builder.withDefaultUser("johnsmith@sample.mail");
        builder.withNotificationsEnabled(false);

        //start the applause session with the configuration above
        Applause.startNewSession(this, builder.build());
    }
}

Troubleshooting SDK (Android)

App not starting on  Android 5.1 Devices

Please note since Android 5.1 an additional permission is required. If this permission is not added then the app will crash. You can check for this particular reason in the logs of the application:

E/AndroidRuntime? FATAL EXCEPTION: main
Process: com.applause.android.internal, PID: 12300
android.view.WindowManager$InvalidDisplayException: Unable to add window android.view.ViewRootImpl$W@2bb301b6 – the specified window type is not valid
at android.view.ViewRootImpl.setView(ViewRootImpl.java:594)
at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:282)
at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:85)
at com.applause.android.dialog.ApplauseDialog.attach(ApplauseDialog.java:167)
at com.applause.android.dialog.ApplauseDialog.show(ApplauseDialog.java:152)
at com.applause.android.dialog.LoginDialog.show(LoginDialog.java:53)
at com.applause.android.dialog.PasswordLoginDialog.show(PasswordLoginDialog.java:31)
at com.applause.android.dialog.BetaPasswordLoginDialog.show(BetaPasswordLoginDialog.java:44)
at com.applause.android.dialog.LoginDialogWrapper.show(LoginDialogWrapper.java:18)
at com.applause.android.logic.IdentifyFinishedListener.displayLoginActivity(IdentifyFinishedListener.java:41)
at com.applause.android.logic.IdentifyFinishedListener.onIdentifyFinished(IdentifyFinishedListener.java:27)
at com.applause.android.logic.QaIdentifyHandler$1.run(QaIdentifyHandler.java:56)
at android.os.Handler.handleCallback(Handler.java:739)

see: Android 5.1 information

Compiler error upon integration (missing Material Theme)

The Applause Android SDK uses Android Material Design  hence the version of the compiler must be set to at least version 21.

In case there is a compiler error post integration with an output similar to below then:

Execution failed for task ':app:processApplauseReleaseResources'..
Error Code:
1
Output:
/Users/USERNAME/dev/projects/PROJECT/app/build/intermediates/bundles/applause/release/res/values-v21/values.xml:8: error: Error retrieving parent for item: No resource found that matches the given name 'android:style/Widget.Material.Button

API version check:

Please check the version of the compiler you’re using it should be at least 21 (you can check in the build.gradle file)

android {
    compileSdkVersion 21
}