Android Open Source - inspectable Preference Configure






From Project

Back to project page inspectable.

License

The source code is released under:

Apache License

If you think the Android project inspectable listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package me.hanqin.apps.inspect;
//from  w  ww . ja v a 2  s.  c om
import android.content.Context;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.test.InstrumentationTestRunner;

/**
 * Guide for using this tool to setup the data server url
 * 1, build HHT5_Core, install
 * ant debug; ant installd
 * 2, build HHT5_Config (this project), install
 * ant debug; ant installd
 * 3, adb shell am instrument -e tcp '10.18.2.31:10006' me.hanqin.apps.inspect/me.hanqin.apps.inspect.PreferenceConfigure
 * Note, please update the address quoted above
 * <p/>
 */
public class PreferenceConfigure extends InstrumentationTestRunner {

    @Override
    public void onCreate(Bundle arguments) {
        Context targetContext = getTargetContext();
        SharedPreferences preferences = targetContext.getSharedPreferences("TcpServer", Context.MODE_PRIVATE);
        SharedPreferences.Editor editor = preferences.edit();
        editor.putString("TcpServerAddress", arguments.getString("tcp"));
        editor.commit();
    }
}




Java Source Code List

fi.iki.elonen.NanoHTTPD.java
me.hanqin.apps.inspect.Inspectable.java
me.hanqin.apps.inspect.PreferenceConfigure.java
me.hanqin.apps.inspect.handlers.BaseHandler.java
me.hanqin.apps.inspect.handlers.DatabaseHandler.java
me.hanqin.apps.inspect.server.DefaultRequestDispatcher.java
me.hanqin.apps.inspect.server.HttpServer.java
me.hanqin.apps.inspect.util.JSONUtil.java