Android SDK + demo project to use with Mobtest service
Java
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
MobtestDemo
MobtestSDK
MobtestSDKTest
.gitignore
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);
     	}
     }