We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
为了多个 Android 的 flavor 配置,将 wxapi.WXEntryActivity 配置成别名 Activity, 但是 Dcloud 内部会触发 hasWXEntryActivity() 判断失败,导致拉起分享成功,却提示 Unable to send 的错误。
下面是 AndroidManifest.xml 中对 .wxapi.WXEntryActivity 的配置:
<activity android:name="my.wxapi.WXEntryActivity" android:label="@string/app_name" android:exported="true" android:launchMode="singleTop"> <intent-filter> <action android:name="android.intent.action.VIEW"/> <category android:name="android.intent.category.DEFAULT"/> <data android:scheme="wxxxxxxxxxxx"/> </intent-filter> </activity> <activity-alias android:name="${applicationId}.wxapi.WXEntryActivity" android:exported="true" android:targetActivity="my.wxapi.WXEntryActivity" />
查了下代码, 应该是 hasWXEntryActivity() 内部的 Class.forName(clsName) 处不能查找到 activity-alias 类导致的。
private boolean hasWXEntryActivity(Context context) { String clsName = context.getPackageName() + ".wxapi.WXEntryActivity"; try { Class.forName(clsName); return true; } catch (ClassNotFoundException e) { return false; } }
H5P.Android/feature/share-weixin/src/io/dcloud/share/mm/WeiXinApiManager.java
Line 975 in 5e7cff2
The text was updated successfully, but these errors were encountered:
修复微信 WXEntryActivity使用 activity-alias 导致成功拉起分享,却返回 错误问题 dcloudio#10
a506813
No branches or pull requests
为了多个 Android 的 flavor 配置,将 wxapi.WXEntryActivity 配置成别名 Activity, 但是 Dcloud 内部会触发 hasWXEntryActivity() 判断失败,导致拉起分享成功,却提示 Unable to send 的错误。
下面是 AndroidManifest.xml 中对 .wxapi.WXEntryActivity 的配置:
查了下代码, 应该是 hasWXEntryActivity() 内部的 Class.forName(clsName) 处不能查找到 activity-alias 类导致的。
H5P.Android/feature/share-weixin/src/io/dcloud/share/mm/WeiXinApiManager.java
Line 975 in 5e7cff2
The text was updated successfully, but these errors were encountered: