VIM3 running official Android Build 230408. Also tried 230130.
After entering the WiFi password there is no option to Connect.
VIM3 running official Android Build 230408. Also tried 230130.
After entering the WiFi password there is no option to Connect.
Hello, what you are describing is the START CONNECT button shown in the picture below, does the firmware you use not have this?
I downgraded to the 32bit version and the “Start Connect” button is available but it is not shown in any of the 64bit versions I tried.
This has been added to the new firmware that will be released soon. You can wait patiently for a few days to update the new firmware. This button will appear on the 64-bit firmware.
If you want to compile your own image, you can put the following patch under the path packages-apps-TvSettings
From 4191127f62c0fbab9337dcdbad24d57dcb7190c0 Mon Sep 17 00:00:00 2001
From: Xiong Zhang <xiong.zhang@wesion.com>
Date: Tue, 25 Apr 2023 18:30:38 +0800
Subject: [PATCH] WIFI: add connect button for WiFi menu
Signed-off-by: Xiong Zhang <xiong.zhang@wesion.com>
---
Settings/res/drawable/connect_button.xml | 52 +++++++++----------
Settings/res/layout/setup_password_item.xml | 8 +++
Settings/res/values/strings.xml | 4 ++
.../setup/EnterPasswordState.java | 15 ++++++
4 files changed, 53 insertions(+), 26 deletions(-)
diff --git a/Settings/res/drawable/connect_button.xml b/Settings/res/drawable/connect_button.xml
index 43931024..b36a598a 100755
--- a/Settings/res/drawable/connect_button.xml
+++ b/Settings/res/drawable/connect_button.xml
@@ -1,26 +1,26 @@
-<?xml version="1.0" encoding="utf-8"?>
-<selector xmlns:android="http://schemas.android.com/apk/res/android">
- <item android:state_pressed="true">
- <shape>
- <gradient android:startColor="#666666" android:endColor="#666666"
- android:angle="0" />
- <corners android:radius="2dp" />
- </shape>
- </item>
-
- <item android:state_focused="true">
- <shape>
- <gradient android:startColor="#435353" android:endColor="#435353"
- android:angle="0" />
- <corners android:radius="2dp" />
- </shape>
- </item>
-
- <item>
- <shape>
- <gradient android:startColor="#00000000" android:endColor="#00000000"
- android:angle="0" />
- <corners android:radius="2dp" />
- </shape>
- </item>
-</selector>
+<?xml version="1.0" encoding="utf-8"?>
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:state_pressed="true">
+ <shape>
+ <gradient android:startColor="#666666" android:endColor="#666666"
+ android:angle="0" />
+ <corners android:radius="2dp" />
+ </shape>
+ </item>
+
+ <item android:state_focused="true">
+ <shape>
+ <gradient android:startColor="#435353" android:endColor="#435353"
+ android:angle="0" />
+ <corners android:radius="2dp" />
+ </shape>
+ </item>
+
+ <item>
+ <shape>
+ <gradient android:startColor="#00000000" android:endColor="#00000000"
+ android:angle="0" />
+ <corners android:radius="2dp" />
+ </shape>
+ </item>
+</selector>
diff --git a/Settings/res/layout/setup_password_item.xml b/Settings/res/layout/setup_password_item.xml
index 64951483..a83055a3 100644
--- a/Settings/res/layout/setup_password_item.xml
+++ b/Settings/res/layout/setup_password_item.xml
@@ -44,6 +44,14 @@
</EditText>
</FrameLayout>
+ <Button
+ android:id="@+id/connect_btn"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginTop="@dimen/setup_obfuscation_margin_top"
+ android:background="@drawable/connect_button"
+ android:text="@string/start_connect" />
+
<CheckBox
android:id="@+id/password_checkbox"
android:layout_width="wrap_content"
diff --git a/Settings/res/values/strings.xml b/Settings/res/values/strings.xml
index fd36df0a..3fa8298d 100644
--- a/Settings/res/values/strings.xml
+++ b/Settings/res/values/strings.xml
@@ -1680,6 +1680,10 @@
<string name="keywords_led">led, hint,led hint</string>
<string name="device_led_white">White LED</string>
<string name="device_led_red">Red LED</string>
+
+ <!-- khadas connect button for wifi menu -->
+ <string name="start_connect">Start connect</string>
+
<!-- khadas os08a10 mipi camera ircut info -->
<string name="device_ircut">Camera ir-cut</string>
<string name="ircut_title">Turn on mipi camera ir-cut</string>
diff --git a/Settings/src/com/android/tv/settings/connectivity/setup/EnterPasswordState.java b/Settings/src/com/android/tv/settings/connectivity/setup/EnterPasswordState.java
index 4d4c42d8..e2253e22 100755
--- a/Settings/src/com/android/tv/settings/connectivity/setup/EnterPasswordState.java
+++ b/Settings/src/com/android/tv/settings/connectivity/setup/EnterPasswordState.java
@@ -27,6 +27,8 @@ import android.support.v17.leanback.widget.GuidedActionsStylist;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentActivity;
import android.text.InputType;
+import android.view.KeyEvent;
+import android.widget.Button;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
@@ -81,6 +83,7 @@ public class EnterPasswordState implements State {
private StateMachine mStateMachine;
private EditText mTextInput;
private CheckBox mCheckBox;
+ private Button mBtn;
@NonNull
@Override
@@ -111,6 +114,16 @@ public class EnterPasswordState implements State {
if (action.getId() == GuidedAction.ACTION_ID_CONTINUE) {
PasswordViewHolder viewHolder = (PasswordViewHolder) vh;
mTextInput = (EditText) viewHolder.getTitleView();
+ mBtn = (Button) viewHolder.mButton;
+ mBtn.setOnClickListener(view -> {
+ String password = mTextInput.getText().toString();
+ if (password.length() >= WEP_MIN_LENGTH) {
+ mUserChoiceInfo.put(UserChoiceInfo.PASSWORD, password);
+ mUserChoiceInfo.setPasswordHidden(mCheckBox.isChecked());
+ setWifiConfigurationPassword(password);
+ mStateMachine.getListener().onComplete(StateMachine.OPTIONS_OR_CONNECT);
+ }
+ });
mCheckBox = viewHolder.mCheckbox;
mCheckBox.setOnClickListener(view -> {
updatePasswordInputObfuscation();
@@ -208,10 +221,12 @@ public class EnterPasswordState implements State {
private static class PasswordViewHolder extends GuidedActionsAlignUtil.SetupViewHolder {
CheckBox mCheckbox;
+ Button mButton;
PasswordViewHolder(View v) {
super(v);
mCheckbox = v.findViewById(R.id.password_checkbox);
+ mButton = v.findViewById(R.id.connect_btn);
}
}
}
--
2.17.1
Thanks, I will wait for the official firmware. Hopefully it will also fix the problem with the LTE module mentioned in my other post.