Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Android SDK + demo project to use with Mobtest service

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 MobtestDemo
Octocat-spinner-32 MobtestSDK
Octocat-spinner-32 MobtestSDKTest
Octocat-spinner-32 .gitignore
Octocat-spinner-32 README.md
README.md

mobtest-android-sdk

Android SDK + demo project to use with Mobtest service

Instructions

  1. Download this repository
  2. Add the MobtestSDK project to Eclipse and have your main project depend on it. Your project properties -->Android, under Library add a reference to the library project MobtestSDK
  3. Add references to the MobtestSDK Activities in your AndroidManifest.xml:

    <activity
        android:name="com.mobtest.sdk.LoginActivity"
          android:label="@string/title_activity_login" >
       </activity>
       <activity
           android:name="com.mobtest.sdk.InstructionsActivity"
           android:label="@string/title_activity_instructions" >
       </activity>
       <activity
           android:name="com.mobtest.sdk.FeedbackActivity"
           android:label="@string/title_activity_feedback"
           android:windowSoftInputMode="stateAlwaysHidden" >
       </activity>
       <activity
           android:name="com.mobtest.sdk.ManageTextActivity"
           android:theme="@android:style/Theme.Dialog"
           android:windowSoftInputMode="stateAlwaysVisible" >
       </activity>      
    
  4. Make sure you have these permissions in your AndroidManifest.xml:

    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    
  5. In your main activity add this:

    
    import com.mobtest.sdk.TestDialogHelper;
    
    
    public MyMainActivity extends Activity {
    
        public void onResume() {
            super.onResume();
        TestDialogHelper testDialogHelper = new TestDialogHelper();
        testDialogHelper.showDialog(this);     
        }
    }
    
  6. For logging add these lines in activities:

    
    import com.mobtest.sdk.MobtestLog;
    
    
    public MyMainActivity extends Activity {
    
      public doSomething() { 
            MobtestLog.logEvent("eventName", this);
            //or
            MobtestLog.logEvent("eventName", "subEventName", this);
        }
    }
    
Something went wrong with that request. Please try again.