简体   繁体   English

关于android设备之间通信的问题

[英]question about communication between android device

device A is server, it has sqlite database. 设备A是服务器,它具有sqlite数据库。

device B, C and D is client, it don't have any database. 设备B,C和D是客户端,它没有任何数据库。

those devices i use serversocket, 我使用serversocket的那些设备,

InetAddress serverAddr = InetAddress.getByName(IP);
socket = new DatagramSocket(PORT, serverAddr);
byte[] buf = new byte[20];
DatagramPacket packet = new DatagramPacket(buf, buf.length);
socket.receive(packet);

so, my question is after connected. 所以,我的问题是连接后。 client device is able to access server device like fetchdata() in database? 客户端设备能够访问数据库中的服务器设备,例如fetchdata()? if can, then how to access? 如果可以,那么如何访问?

Last but not least, i want to ask the wifimanager that allow multiple client access at a time should declare like what and should place the code at where? 最后但并非最不重要的一点是,我想问一次允许多个客户端访问的wifimanager应该声明什么,并将代码放置在哪里?

Concerning your question about SQLite, SQLite is not meant to be used in the way you described. 关于您关于SQLite的问题,SQLite不能以您描述的方式使用。 See Connect to a remote sqlite3 database with Python for further information. 有关更多信息,请参见使用Python连接到远程sqlite3数据库

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM