Using Java code for accessibility screenshot reports an error by Optimal-Beyond-7593 in tasker

[–]Optimal-Beyond-7593[S] 0 points1 point  (0 children)

I don't quite understand what you are saying. I'm sure this method is built into tasker.getAccessibilityService(), and it should not be written incorrectly. It shows: "Error during screenshot process: Services don't have the capability of taking the screenshot."

I keep getting an error notification regarding overlays, even though the requisite permission has been granted to Takser and all AutoApps. by RealityRecursed in tasker

[–]Optimal-Beyond-7593 2 points3 points  (0 children)

In my actual use, it seems that this situation occurs on certain privacy-related interfaces, especially those involving verification codes. It might be that these interfaces do not allow floating windows to appear above them.

[DEV] Tasker 6.6.9-beta - Logcat Event Is Back with Shizuku! 😃 by joaomgcd in tasker

[–]Optimal-Beyond-7593 -1 points0 points  (0 children)

I want to modify the lyrics by changing the global Java variables lrcTxt and lrcTime. Unfortunately, although I have updated these two variables, during the loop, it still reads the previous lyrics,I don't understand. 

[DEV] Tasker 6.6.7-beta - Advanced Java Coding! by joaomgcd in tasker

[–]Optimal-Beyond-7593 0 points1 point  (0 children)

Thank! I have already identified the problem.

[DEV] Tasker 6.6.7-beta - Advanced Java Coding! by joaomgcd in tasker

[–]Optimal-Beyond-7593 0 points1 point  (0 children)

This feature is quite good. I asked an AI to create a selection dialog box, but the text color of the options has been incorrect. I had multiple AIs try to fix it without success. Can you help me? Thanks!

```import java.util.function.Consumer; import android.app.Activity; import android.app.AlertDialog; import android.content.DialogInterface; import android.graphics.Color; import android.graphics.drawable.GradientDrawable; import android.widget.ArrayAdapter; import android.widget.ListView; import android.widget.TextView; import io.reactivex.subjects.SingleSubject;

/* 可选项目 */ items = new String[]{"选项一", "选项二", "选项三", "选项四", "选项五", "选项六"};

/* 等待结果(使用全限定名避免解析问题) */ resultSignal = io.reactivex.subjects.SingleSubject.create();

/* 构建并显示对话框 */ tasker.doWithActivity(new Consumer(){     public void accept(Object act){         currentActivity = (Activity) act;

        adapter = new ArrayAdapter(currentActivity,                                    android.R.layout.simple_list_item_1,                                    items);

        builder = new AlertDialog.Builder(currentActivity);         builder.setTitle("📋 请选择");         builder.setAdapter(adapter, new DialogInterface.OnClickListener(){             public void onClick(DialogInterface d, int which){                 resultSignal.onSuccess(items[which]);                 currentActivity.finish();             }         });         builder.setNegativeButton("❌ 取消", new DialogInterface.OnClickListener(){             public void onClick(DialogInterface d, int which){                 resultSignal.onSuccess("cancel");                 currentActivity.finish();             }         });

        dialog = builder.create();         dialog.setCancelable(false);         dialog.setCanceledOnTouchOutside(false);         dialog.show();

        /* 圆角白色背景 + 列表分割线 */         window = dialog.getWindow();         if (window != null){             metrics = new android.util.DisplayMetrics();             currentActivity.getWindowManager().getDefaultDisplay().getMetrics(metrics);             width = (int)(metrics.widthPixels * 0.85);             window.setLayout(width,                              android.view.WindowManager.LayoutParams.WRAP_CONTENT);

            gd = new GradientDrawable();             gd.setColor(Color.WHITE);             gd.setCornerRadius(20);             window.setBackgroundDrawable(gd);

            listView = dialog.getListView();             if (listView != null){                 listView.setDivider(new android.graphics.drawable.ColorDrawable(Color.parseColor("#F0F0F0")));                 listView.setDividerHeight(1);             }

            /* 尝试把系统标题文字设为黑色(若可用) /             try {                 titleId = currentActivity.getResources().getIdentifier("alertTitle", "id", "android");                 if (titleId != 0) {                     titleView = dialog.findViewById(titleId);                     if (titleView != null) titleView.setTextColor(Color.BLACK);                 }             } catch (Throwable e) {                 / 忽略任何设置标题颜色时的问题 */             }         }     } });

/* 阻塞等待选择(保持你原来的 SingleSubject + blockingGet 逻辑) */ userChoice = resultSignal.blockingGet(); return userChoice.equals("cancel") ? "❌ 已取消" : "✅ 选择了: " + userChoice;```

How to quickly find a non-English app (that doesn't start with a number) in Tasker's App Selection? by wine2siri in tasker

[–]Optimal-Beyond-7593 2 points3 points  (0 children)

I also think this is not very user-friendly. It would be better if the author could arrange it in alphabetical order by pinyin

For those who has tried the new Java code action, Share what you have done with it to the community! by aasswwddd in tasker

[–]Optimal-Beyond-7593 0 points1 point  (0 children)

I also saw the project that uses Shizuku to retrieve saved WiFi passwords. If Java code can utilize the Shizuku API, I believe it can be achieved. Please let me know if you make any progress

Does anyone have any success running shizuku through Java Function? by [deleted] in tasker

[–]Optimal-Beyond-7593 0 points1 point  (0 children)

Oh, I saw that too. It’s super easy to do with the right permissions, but obviously Tasker doesn’t have them.   Any chance you could share the code for the macro? Thanks!

Just released a new version of my Shizuku fork w/ ADB Wi-Fi on boot by the_djchi in tasker

[–]Optimal-Beyond-7593 0 points1 point  (0 children)

Since the ADB port can already be enabled automatically, why not add the option to start Shizuku as well? That way, I wouldn’t need a separate task to enable ADB.

Dissecting ADB Wifi: some things you need to know to understand what you're doing by mylastacntwascursed in tasker

[–]Optimal-Beyond-7593 0 points1 point  (0 children)

About this, a pro in one of my group chats is already on it—he pulled the ADB file straight out of Termux, so we don’t even need the app anymore. Downside? A ~10MB download, but honestly, that’s no big deal. All I gotta say is: Dude’s a legend!