Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

功能建议: [ 能量雨增加多开应用识别 ] (Edited) #510

Open
GodManRui opened this issue Aug 9, 2021 · 19 comments
Open

功能建议: [ 能量雨增加多开应用识别 ] (Edited) #510

GodManRui opened this issue Aug 9, 2021 · 19 comments
Labels
Enhancement 🛠️ 建议 New feature or request Feedback Awaited 🕒 等待反馈 Waiting for the feedback from issue creater and issue will be closed if duration is over one month More Info Needed 🔎 提供详情 Further information is requested

Comments

@GodManRui
Copy link

[ 包括但不限于 项目功能改进/功能添加/代码优化/执行逻辑优化... ]
经常使用多个支付宝账号收取能量雨,作者大大能否做下这么个优化,在能量雨跳转支付宝app时,能让系统弹出选择多开支付宝应用还是支付宝本身应用的那个小弹窗出来。

@GodManRui GodManRui added the Enhancement 🛠️ 建议 New feature or request label Aug 9, 2021
@SuperMonster003
Copy link
Owner

运行蚂蚁森林项目启动器 (ant-forest-launcher.js) 时是否能自动选择多开支付宝应用

@SuperMonster003 SuperMonster003 added the Feedback Awaited 🕒 等待反馈 Waiting for the feedback from issue creater and issue will be closed if duration is over one month label Aug 9, 2021
@GodManRui
Copy link
Author

也不能,直接打开了主应用。

@SuperMonster003
Copy link
Owner

这是项目有意为之的
为了防止多开应用弹窗阻碍脚本运行 直接默认打开主支付宝应用

如果想在运行能量雨收集工具时出现弹窗 可将能量雨工具脚本文件 84 行代码注释掉或直接删掉

代码:

packageName: $$app.alipay_pkg,

@GodManRui
Copy link
Author

好嘞,谢谢,我试试!

@GodManRui
Copy link
Author

注释了,不行咩,还是直接打开主应用了,小米10

@GodManRui
Copy link
Author

运行报错了。
IMG_20210810_123913
IMG_20210810_123903
IMG_20210810_123831

@SuperMonster003
Copy link
Owner

SuperMonster003 commented Aug 10, 2021

脚本文件末尾 应该有异常字符被插入

安卓 10 及以上系统使用 Auto.js 4.1.1 Alpha2 直接编辑脚本文件并保存后 会有一定概率出现文件末尾追加异常字符的 bug

目前没有好的解决方案 只能使用其他的文本编辑器编辑并保存代码

@GodManRui
Copy link
Author

了解! 不过我一开始说没效果是用2.1.6版本试的,那个删掉没报错,不过没效果,然后升级了下2.1.7,就报错了。我晚上回家再试试吧。!

@GodManRui
Copy link
Author

试了,2.1.7版本,和6版本一样,没效果,直接打开了主应用

@SuperMonster003
Copy link
Owner

提供一下多开支付宝应用的包名
支付宝的包名默认是 com.eg.android.AlipayGphone

@SuperMonster003 SuperMonster003 added the More Info Needed 🔎 提供详情 Further information is requested label Aug 13, 2021
@GodManRui
Copy link
Author

看了半天,多开貌似不会改变其包名。通过几种手段看到的多开应用包名都和原始app一样

@GodManRui
Copy link
Author

要不添加个手动模式?不自动跳转支付宝,让我手动打开支付宝分身应用的能量雨页面,代码申请完权限直接从开始识别 开始能量雨 按钮开始执行?
1.申请权限-- 2.打开支付宝跳转能量雨页面-- 3.等待开始能量雨按钮出现。
我临时想现在2之后,3之前,手动打开支付宝分身应用,麻烦作者指示下3步骤之前加个sleep是哪一行代码合适呢?不加sleep的话识别速度太快了,我来不及切换到分身应用。

@SuperMonster003
Copy link
Owner

test_$_get_user_ids.zip
运行上述测试脚本并反馈一下运行结果

@GodManRui
Copy link
Author

toast了一个 0,999

@SuperMonster003
Copy link
Owner

0 是机主用户的 user id
999 是分身用户的 user id

尝试单独运行以下代码看是否报错

context.startActivityAsUser(app.intent({
    data: 'alipays://platformapi/startapp?appId=20000027',
}), new android.os.UserHandle(999));

上述代码表示跨用户启动 Activity
启动目标是支付宝应用的切换账号页面

@SuperMonster003 SuperMonster003 changed the title 功能建议: [ 此处简述建议概要 ] 能量雨增加多开应用识别 功能建议: [ 能量雨增加多开应用识别 ] (Edited) Aug 20, 2021
@GodManRui
Copy link
Author

Uploading 1629473531620.jpg…
权限报错了

@GodManRui
Copy link
Author

Screenshot_2021-08-21-00-08-55-581_org autojs autojs

@SuperMonster003
Copy link
Owner

后续版本将根据多用户设备做出相关优化
请关注后续版本更新

@GodManRui
Copy link
Author

可以先开放一个tools吗,不需要自动跳转支付宝,开始执行了就直接识别当前页面是不是能量雨页面,是就开始执行就行,我手动打开支付宝分身的能量雨页面,打开后我用悬浮窗去运行脚本。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement 🛠️ 建议 New feature or request Feedback Awaited 🕒 等待反馈 Waiting for the feedback from issue creater and issue will be closed if duration is over one month More Info Needed 🔎 提供详情 Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants