/**
- 引用 Android 系统库,示例如下:
- import { Context } from "android.content.Context";
- [可选实现,按需引入]
*/
import Context from "android.content.Context";
import AudioManager from "android.media.AudioManager";
import { Options,Result } from "../interface";
export function requestAudioFocus(options : Options) {
const context = UTSAndroid.getAppContext();
var audioManager : AudioManager = context?.getSystemService(Context.AUDIO_SERVICE) as AudioManager;
}
1 个回复
2***@qq.com (作者)
最终是在插件市场下载了一个插件然后把我的代码搬进去就能正常编译了