本文使用的是庆科wifi模块
--------------------------------------------------------------------------------------------------------------------------------------
http://developer.mico.io/downloads 庆科的开发者地址 有配网的sdk demo下载
下载下来的demo 有可能gradle不过 可以找他们工程师 android studio项目 ,看别人项目 细心 耐心 下面是主要配网代码
package com.example.administrator.easylinkdemo;
import android.app.AlertDialog;
import android.app.Dialog;
import android.content.DialogInterface;
import android.os.Handler;
import android.os.Message;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.Spinner;
import android.widget.TextView;
import android.widget.Toast;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import java.util.List;
import io.fogcloud.easylink.api.EasyLink;
import io.fogcloud.easylink.helper.EasyLinkCallBack;
import io.fogcloud.easylink.helper.EasyLinkParams;
import io.fog.fog2sdk.MiCODevice;
import io.fogcloud.fog_mdns.helper.SearchDeviceCallBack;
public class MainActivity extends AppCompatActivity implements View.OnClickListener {
private static final String TAG = "MainActivity";
private EasyLink elink;
private MiCODevice mMiCODevice;
private EditText ex_password;
private Spinner mSpinner;
private List mList;
private ArrayAdapter mAdapter;
private WifiUtils mWifiUtils;
private String ssId;
private LayoutInflater mLayoutInflater;
private LinearLayout lin_showmdns;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
lin_showmdns = (LinearLayout) findViewById(R.id.showmdns);
mLayoutInflater = LayoutInflater.f