问题描述
您好,我遵循https://source.android.com/devices/tech/connect/esim-euicc-api准则来制作运营商应用程序,使用具有板卡广播接收器的回调意图调用euiccManager.downloadSubscription(...)。问题在于,永远不会触发onReceive方法,而不是从活动中触发onNewIntent。 您知道如何从e-sim downlaodSubscription获取进度或状态吗?
解决方法
尝试在import { networkInterfaces } from "os";
const netInterfaces = networkInterfaces();
const [{ address }] = Object.values(netInterfaces).flatMap((netInterface) =>
netInterface.filter((prop) => prop.family === "IPv4" && !prop.internal)
);
console.log(address) // -> '192.168...'
注册期间删除LPA权限,它将起作用。