@RequiresApi(api = Build.VERSION_CODES.O)
public void turnOnHotspot() {
WifiManager manager = (WifiManager) mContext.getSystemService(Context.WIFI_SERVICE);
manager.startLocalOnlyHotspot(new WifiManager.LocalOnlyHotspotCallback() {
@Override
public void onStarted(WifiManager.LocalOnlyHotspotReservation reservation) {
super.onStarted(reservation);
Log.d(TAG, "Wifi Hotspot is on now");
mReservation = reservation;
}
@Override
public void onStopped() {
super.onStopped();
Log.d(TAG, "onStopped: ");
}
@Override
public void onFailed(int reason) {
super.onFailed(reason);
Log.d(TAG, "onFailed: ");
}
}, new Handler());
}
在上述设置中,我想知道为什么在软件包 B 中没有继承名称空间,以便可以使用名称空间<package name="A" extends="default" namespace="/A">
...
</package>
<package name="B" extends="A" namespace="/B">
<action name="show" class="...">
...
</action>
</package>
调用动作 show 。