This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package smuldr.espresso.util; | |
import android.content.res.Resources; | |
import android.support.test.espresso.matcher.BoundedMatcher; | |
import android.view.View; | |
import android.widget.EditText; | |
import org.hamcrest.Description; | |
import org.hamcrest.Matcher; | |
import org.hamcrest.Matchers; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<LinearLayout | |
xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:app="http://schemas.android.com/apk/res-auto" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:fitsSystemWindows="true" | |
android:orientation="vertical"> | |
<android.support.v7.widget.Toolbar | |
android:id="@+id/toolbar" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
try { | |
String deviceUuid = SenseApi.getDefaultDeviceUuid(this); | |
SenseApi.getSensorId(this, "name", null, null, deviceUuid); | |
} catch (IOException e) { | |
// TODO: Handle exception when connection failed | |
} catch (JSONException e) { | |
// TODO: Handle exception when response was unparsable | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import nl.sense_os.service.commonsense.SenseApi; | |
public class Foo extends Activity { | |
/** | |
* Sends a JSON object to /foo/bar at CommonSense API and checks the response | |
*/ | |
public void foo() { | |
String urlString = "https://api.sense-os.nl/foo/bar"; |