我有一个BottomNavigationView和一个应用程序ViewPager.如何使用新的"导航架构组件"实现它?
什么是最佳做法?
非常感谢
我想在 Samsung GALAXY TAB 8.9 中创建 BluetoothServerSocket。(android 4.04) 当调用 mmServerSocket.accept() - 抛出:
我阅读了许多类似的文章,但还没有详细的答案。也许有人解决了类似的问题,或者知道这个异常是什么意思。
代码来自android 示例“ChatExample”:
public class AcceptThread extends Thread {
// The local server socket
private final BluetoothServerSocket mmServerSocket;
private String mSocketType;
public AcceptThread(boolean secure) { BluetoothServerSocket tmp = null;
mSocketType = secure ? "Secure" : "Insecure";
try {
tmp = mAdapter.listenUsingInsecureRfcommWithServiceRecord(
NAME_INSECURE, MY_UUID_INSECURE);
} catch (IOException e) {
Log.e(TAG, "Socket Type: " + mSocketType + "listen() failed", e);
}
mmServerSocket = tmp;
} …Run Code Online (Sandbox Code Playgroud)