Back to project page Sensors2OSC.
The source code is released under:
Author: Thomas Mayer <thomas@residuum.org> Antonio Deusany de Carvalho Junior Copyright (c) 2014 Thomas Mayer, Antonio Deusany de Carvalho Junior Permission is hereby granted, free of charge, to any...
If you think the Android project Sensors2OSC listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package org.sensors2.osc.sensors; // w ww. ja v a 2 s.c o m import android.content.SharedPreferences; /** * Created by thomas on 05.11.14. */ public class Settings extends org.sensors2.common.sensors.Settings { private final String host; private final int port; public Settings(SharedPreferences preferences) { super(preferences); this.host = this.setHost(preferences); this.port = this.setPort(preferences); } public int getPort() { return port; } private int setPort(SharedPreferences preferences) { return Integer.valueOf(preferences.getString("pref_comm_port", "9000")); } public String getHost() { return host; } private String setHost(SharedPreferences preferences) { return preferences.getString("pref_comm_host", "localhost"); } }