Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 package com.github.rosjava.android_remocons.common_tools.zeroconf;
00018
00019 import android.app.ProgressDialog;
00020 import android.content.Context;
00021 import android.os.AsyncTask;
00022
00023 import com.github.rosjava.zeroconf_jmdns_suite.jmdns.Zeroconf;
00024
00025
00030 public class DiscoverySetup extends AsyncTask<Zeroconf, String, Void> {
00031
00032 private ProgressDialog commencing_dialog;
00033 private final Context context;
00034
00035 public DiscoverySetup(Context context) {
00036 this.context = context;
00037 }
00038
00039 protected Void doInBackground(Zeroconf... zeroconfs) {
00040 if (zeroconfs.length == 1) {
00041 Zeroconf zconf = zeroconfs[0];
00042 android.util.Log.i("zeroconf", "*********** Discovery Commencing **************");
00043
00044 zconf.addListener("_ros-master._tcp", "local");
00045 zconf.addListener("_ros-master._udp", "local");
00046 zconf.addListener("_concert-master._tcp", "local");
00047 zconf.addListener("_concert-master._udp", "local");
00048
00049 } else {
00050 android.util.Log.i("zeroconf", "Error - DiscoveryTask::doInBackground received #zeroconfs != 1");
00051 }
00052 return null;
00053 }
00054 }