summaryrefslogtreecommitdiff
path: root/master/src/main/java/com/orbekk/HelloAndroidActivity.java
diff options
context:
space:
mode:
Diffstat (limited to 'master/src/main/java/com/orbekk/HelloAndroidActivity.java')
-rw-r--r--master/src/main/java/com/orbekk/HelloAndroidActivity.java23
1 files changed, 5 insertions, 18 deletions
diff --git a/master/src/main/java/com/orbekk/HelloAndroidActivity.java b/master/src/main/java/com/orbekk/HelloAndroidActivity.java
index a142214..4160bf4 100644
--- a/master/src/main/java/com/orbekk/HelloAndroidActivity.java
+++ b/master/src/main/java/com/orbekk/HelloAndroidActivity.java
@@ -1,8 +1,7 @@
package com.orbekk;
-import org.apache.log4j.Level;
+import com.orbekk.net.Broadcaster;
-import de.mindpipe.android.logging.log4j.LogConfigurator;
import android.app.Activity;
import android.os.Bundle;
import android.util.Log;
@@ -12,19 +11,6 @@ public class HelloAndroidActivity extends Activity {
private static String TAG = "master";
private PingServer pingServer;
- private void configureLog4j() {
- final LogConfigurator logConfigurator = new LogConfigurator();
-
- //logConfigurator.setFileName(Environment.getExternalStorageDirectory() + "myapp.log");
- logConfigurator.setRootLevel(Level.DEBUG);
- logConfigurator.setUseLogCatAppender(true);
- logConfigurator.setUseFileAppender(false);
- // Set log level of a specific logger
- // logConfigurator.setLevel("org.apache", Level.ERROR);
- logConfigurator.configure();
- System.err.println("GOT HERE.");
- }
-
/**
* Called when the activity is first created.
* @param savedInstanceState If the activity is being re-initialized after
@@ -39,7 +25,6 @@ public class HelloAndroidActivity extends Activity {
System.setProperty("java.net.preferIPv6Addresses", "false");
Log.i(TAG, "onCreate");
- configureLog4j();
setContentView(R.layout.main);
pingServer = PingServer.createPingServer(10080);
@@ -49,8 +34,10 @@ public class HelloAndroidActivity extends Activity {
throw new RuntimeException(e.getMessage());
}
- Broadcast broadcast = new Broadcast(this);
- broadcast.sendBroadcast("Broadcast test".getBytes(), 10010);
+// Broadcast broadcast = new Broadcast(this);
+// broadcast.sendBroadcast("Broadcast test".getBytes(), 10010);
+ Broadcaster broadcaster = new Broadcaster();
+ Log.i(TAG, "Broadcast success: " + broadcaster.sendBroadcast(10010, "Broadcast test from Android".getBytes()));
}
@Override