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
demo中无法获取导出文件时的回调,通过阅读源码发现以下方法可行:
a a = com.huawei.hms.audioeditor.ui.common.a.a(); AudioExportCallBack audioExportCallBack = a.b(); if (audioExportCallBack == null) { audioExportCallBack = new AudioExportCallBack() { @Override public void onAudioExportSuccess(AudioInfo audioInfo) { Log.e("TAG", "onAudioExportSuccess: " + audioInfo); startSelf();//返回主页 } @Override public void onAudioExportFailed(int i) { Log.e("TAG", "onAudioExportSuccess: " + i); } }; ReflexUtil.setFieldValueByFieldName(a, "b", audioExportCallBack); } public static void setFieldValueByFieldName(Object object, String fieldName, Object value) { try { // 获取obj类的字节文件对象 Class<?> c = object.getClass(); // 获取该类的成员变量 Field field = c.getDeclaredField(fieldName); // 取消语言访问检查 field.setAccessible(true); // 给变量赋值 field.set(object, value); } catch (Exception e) { Log.e(TAG, "setFieldValueByFieldName: ", e); } }
源码中在导出文件的Activity中设置了回调,但是没有给出set方法并且回调接口是私有属性,唯有通过反射方能设置回调。希望官方修复这个问题
The text was updated successfully, but these errors were encountered:
这个目前是预留的回调,一些基础功能下个版本会逐渐开放
Sorry, something went wrong.
No branches or pull requests
demo中无法获取导出文件时的回调,通过阅读源码发现以下方法可行:
源码中在导出文件的Activity中设置了回调,但是没有给出set方法并且回调接口是私有属性,唯有通过反射方能设置回调。希望官方修复这个问题
The text was updated successfully, but these errors were encountered: