Pruebas con el PCB. Batch mode

parent aa7b533d
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4"> <module type="JAVA_MODULE" version="4">
<component name="FacetManager">
<facet type="android" name="Android">
<configuration>
<option name="GEN_FOLDER_RELATIVE_PATH_APT" value="/../../android/gen" />
<option name="GEN_FOLDER_RELATIVE_PATH_AIDL" value="/../../android/gen" />
<option name="MANIFEST_FILE_RELATIVE_PATH" value="/../../android/AndroidManifest.xml" />
<option name="RES_FOLDER_RELATIVE_PATH" value="/../../android/res" />
<option name="ASSETS_FOLDER_RELATIVE_PATH" value="/../../android/assets" />
<option name="LIBS_FOLDER_RELATIVE_PATH" value="/../../android/libs" />
<option name="PROGUARD_LOGS_FOLDER_RELATIVE_PATH" value="/../../android/proguard_logs" />
</configuration>
</facet>
</component>
<component name="NewModuleRootManager" inherit-compiler-output="true"> <component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output /> <exclude-output />
<content url="file://$MODULE_DIR$" /> <content url="file://$MODULE_DIR$">
<orderEntry type="inheritedJdk" /> <sourceFolder url="file://$MODULE_DIR$/gen" isTestSource="false" generated="true" />
</content>
<orderEntry type="jdk" jdkName="Android API 21 Platform" jdkType="Android SDK" />
<orderEntry type="sourceFolder" forTests="false" /> <orderEntry type="sourceFolder" forTests="false" />
</component> </component>
</module> </module>
\ No newline at end of file
apply plugin: 'com.android.application' apply plugin: 'com.android.application'
android { android {
compileSdkVersion 21 compileSdkVersion 23
buildToolsVersion "21.1.2" buildToolsVersion "23.0.1"
defaultConfig { defaultConfig {
applicationId "com.yottacode.pictogrammar" applicationId "com.yottacode.pictogrammar"
minSdkVersion 19 minSdkVersion 19
......
...@@ -37,6 +37,9 @@ ...@@ -37,6 +37,9 @@
android:name=".gui.MainActivity" android:name=".gui.MainActivity"
android:label="@string/app_name" android:label="@string/app_name"
android:screenOrientation="landscape" > android:screenOrientation="landscape" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
</intent-filter>
</activity> </activity>
<activity <activity
android:name=".gui.SerialActivity" android:name=".gui.SerialActivity"
...@@ -65,7 +68,6 @@ ...@@ -65,7 +68,6 @@
android:screenOrientation="portrait" > android:screenOrientation="portrait" >
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN" /> <action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" /> <category android:name="android.intent.category.LAUNCHER" />
</intent-filter> </intent-filter>
</activity> </activity>
......
...@@ -22,27 +22,7 @@ import android.widget.EditText; ...@@ -22,27 +22,7 @@ import android.widget.EditText;
import android.widget.TextView; import android.widget.TextView;
import android.widget.Toast; import android.widget.Toast;
import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.HttpVersion;
import org.apache.http.NameValuePair;
import org.apache.http.StatusLine;
import org.apache.http.client.ClientProtocolException;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.conn.ClientConnectionManager;
import org.apache.http.conn.scheme.PlainSocketFactory;
import org.apache.http.conn.scheme.Scheme;
import org.apache.http.conn.scheme.SchemeRegistry;
import org.apache.http.conn.ssl.SSLSocketFactory;
import org.apache.http.entity.StringEntity;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.impl.conn.tsccm.ThreadSafeClientConnManager;
import org.apache.http.params.BasicHttpParams;
import org.apache.http.params.HttpParams;
import org.apache.http.params.HttpProtocolParams;
import org.apache.http.protocol.HTTP;
import org.json.JSONArray; import org.json.JSONArray;
import org.json.JSONException; import org.json.JSONException;
import org.json.JSONObject; import org.json.JSONObject;
...@@ -243,13 +223,14 @@ public class SerialActivity extends Activity implements iRestapiListener, iImgDo ...@@ -243,13 +223,14 @@ public class SerialActivity extends Activity implements iRestapiListener, iImgDo
@Override @Override
public void result(JSONArray result) { public void result(JSONArray result) {
Log.d(LOG_TAG, "Users:"+result.toString());
} }
@Override @Override
public void result(JSONObject result) { public void result(JSONObject result) {
// Si llego aquí es porque hay un único valor, no un array // Si llego aquí es porque hay un único valor, no un array
try { try {
Log.d(LOG_TAG, result.toString()); Log.d(LOG_TAG, "User:"+result.toString());
// Saco el token y los demás valores // Saco el token y los demás valores
Vector<User> users = new Vector<User>(1); Vector<User> users = new Vector<User>(1);
......
...@@ -5,7 +5,7 @@ buildscript { ...@@ -5,7 +5,7 @@ buildscript {
jcenter() jcenter()
} }
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:1.3.0' classpath 'com.android.tools.build:gradle:1.5.0'
// NOTE: Do not place your application dependencies here; they belong // NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files // in the individual module build.gradle files
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment