Skip to content

Commit

Permalink
set delay
Browse files Browse the repository at this point in the history
  • Loading branch information
tink-expo committed Dec 1, 2019
1 parent b0531a0 commit b4d77fe
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,6 @@ public static BroadcastReceiver connectAndRegisterReceiver(
if (ssidPw.pw != null) {
config.preSharedKey = "\"" + ssidPw.pw + "\"";
}

// config.SSID = "\"" + "SPARCS-AP" + "\"";
// config.preSharedKey = "\"" + "tnfqkrtmtnfqkrtm" + "\"";
Log.d(TAG, config.SSID + " " + config.preSharedKey);

intentFilter.addAction(ConnectivityManager.CONNECTIVITY_ACTION);
Expand All @@ -72,6 +69,7 @@ public void onReceive(Context context, Intent intent) {
NetworkInfo networkInfo = intent.getParcelableExtra(WifiManager.EXTRA_NETWORK_INFO);
if (networkInfo != null && networkInfo.getType() == ConnectivityManager.TYPE_WIFI &&
networkInfo.isConnected() && wifiManager.getConnectionInfo().getSSID().equals(config.SSID)) {
Log.d(TAG, "Success");
Intent successIntent = new Intent(activity, SuccessActivity.class);
successIntent.putExtra("id", wifiManager.getConnectionInfo().getSSID());
activity.startActivity(successIntent);
Expand All @@ -95,7 +93,7 @@ public void run() {
activity.startActivity(failIntent);
}
}
}, 3500);
}, 4000);

return connectReceiver;
}
Expand Down

0 comments on commit b4d77fe

Please sign in to comment.