Android: Unterschied zwischen den Versionen
Aus wiki
| Zeile 18: | Zeile 18: | ||
read.close(); | read.close(); | ||
Log.d(this.getClass().getName(), targetString); | Log.d(this.getClass().getName(), targetString); | ||
| + | |||
| + | === Reader to String code === | ||
| + | <code>Reader read = response.body().charStream(); | ||
| + | int intValueOfChar; | ||
| + | String targetString = ""; | ||
| + | while ((intValueOfChar = read.read()) != -1) { | ||
| + | targetString += (char) intValueOfChar; | ||
| + | } | ||
| + | read.close(); | ||
| + | Log.d(this.getClass().getName(), targetString);</code> | ||
Version vom 27. März 2015, 09:27 Uhr
Inhaltsverzeichnis
Exclude "TAG" from LogCat (Eclipse-View)
tag:^(?!(TAG))
Uninstall Application from CLI
adb uninstall ch.christofbuechi.xyz
delete just user-data from application
adb shell pm clear ch.christofbuechi.xyz
Reader to String
Reader read = response.body().charStream();
int intValueOfChar;
String targetString = "";
while ((intValueOfChar = read.read()) != -1) {
targetString += (char) intValueOfChar;
}
read.close();
Log.d(this.getClass().getName(), targetString);
Reader to String code
Reader read = response.body().charStream();
int intValueOfChar;
String targetString = "";
while ((intValueOfChar = read.read()) != -1) {
targetString += (char) intValueOfChar;
}
read.close();
Log.d(this.getClass().getName(), targetString);