[Group Play SDK introduction]
Group Play 기능을 제공해 주는 SDK 인줄 알았더니 그게 아닌 것 같다.
할 수 있는 것은 아래와 같이 정리되어 있음.
Group Play SDK provides the following features:
- Launches Group Play applications.
- Checks if Group Play sessions are available.
- Checks Group Play status to confirm if a Host or Client exists.
- Checks user status by monitoring if they have entered or exited applications. Group Play SDK then sends the information about application use to Group Play.
- Wi-Fi network connectivity is required to use applications that are developed with Chord SDK.
할 수 있는 것은 Group Play application을 실행하고 Session이 생성되어 있는지와 Session 내에서 Host 인지 Client 인지 확인 할 수 있는 기능을 제공함. 생각보다 제한된 functionality와 API를 제공하고 있음.
시나리오를 봤을 때도 게임을 하다가 옆 사람하고 같이 하고 싶을때 Group play를 띄워서 private session을 생성한 뒤 다른 방법으로 게임을 진행하게 될 것으로 보인다.
그래서 주요 API는 다음과 같다.
ethod Summary | |
---|---|
int | getGroupPlayStatus() Checks the status of Group Play. |
boolean | hasSession() Checks if a device belongs to a group. |
boolean | runGroupPlay() Launches Group Play and displays its start screen so that user can create or join a group. |
boolean | setParticipantInfo(boolean enable) Hands over 3rd party application and user participant information to Group Play. |
void | start() To use the Group Play SDK API, the applications being developed must be initialized. |
그리고 Group Play는 위 그림에서 보다 시피 Chord SDK를 사용하고 있으며 제대로된 use scenario를 위해서는 Chord SDK를 사용해야 할 것으로 보임.
[Chrod SDK Introduction]
Feature들은 다음과 같다.
- Enable reliable, peer-to-peer communication across
connected devices, without the need of a server
- Connection: WiFi, Mobile hotspot, WiFi Direct
- Group Management: Manage multiple device groups
in a local network
- Messaging Framework: Real-time data transfer
across a group of devices(text messages, binary data
and files)
디바이스 검색, 그룹 생성, 메세지/파일 전송이 가능하다.
어차피 Group Play SDK도 Chord SDK의 subset이라 게임을 구현하려면 Chord SDK를 사용해서 구현해도 무리가 없을 것으로 보임.
[Samples]
. Chord SDK만 사용한 간단한 게임들(TicTacToc 같은)
. Chord SDK와 AllShare SDK를 사용한 카드 게임.
API reference로는 SchordManager를 사용해서 Channel을 만든 뒤 SchordChannel에서 Data, File들을 전달
com.samsung.android.sdk.chord
Class SchordManager
void | close()
Stop Chord and release the resources.
|
List<Integer> | getAvailableInterfaceTypes()
Get the list of available network interface types.
|
String | getIp()
Get the IPv4 address of own device.
|
SchordChannel | getJoinedChannel(String channelName)
Get the channel interface for the specific channel name.
|
List<SchordChannel> | getJoinedChannelList()
Get the list of all channel interfaces the device has joined.
|
boolean | isSmartDiscoveryEnabled()
Check if smart discovery is enabled for the device.
|
SchordChannel | joinChannel(String channelName, SchordChannel.StatusListener listener)
Join the specified channel with the specified status listener.
|
void | leaveChannel(String channelName)
Leave the specified channel.
|
void | resetSmartDiscoveryPeriod()
Reset the smart discovery period for nodes.
|
void | setLooper(Looper looper)
Set the specified looper object to the thread handling callback methods.
|
void | setNetworkListener(SchordManager.NetworkListener listener)
Set the specified NetworkListener instance.
|
void | setNodeKeepAliveTimeout(int timeoutMsec)
Set how long the node remains active before the connection times out.
|
void | setSecureModeEnabled(boolean enabled)
Enable or disable secure mode.
|
void | setSendMultiFilesLimitCount(int count)
Set the limit for the maximum number of simultaneous files that
sendMultiFiles() can send. |
void | setSmartDiscoveryEnabled(boolean enabled)
Enable or disable smart discovery.
|
void | setTempDirectory(String tmpDirPath)
Set the specified directory path to temporarily store the files that are received.
|
void | start(int interfaceType, SchordManager.StatusListener listener)
Start Chord with the specified interface type and listener.
|
void | stop()
Stop chord.
|
com.samsung.android.sdk.chord
Interface SchordChannel
Modifier and Type | Method and Description |
---|---|
void | acceptFile(String exchangeId, int chunkTimeoutMsec, int chunkRetries, long chunkSize)
Accept the receive request for the specified file transfer.
|
void | acceptMultiFiles(String taskId, int chunkTimeoutMsec, int chunkRetries, long chunkSize)
Accept the receive request for the specified multiple file transfer.
|
void | cancelFile(String exchangeId)
Cancel the specified file transfer.
|
void | cancelMultiFiles(String taskId)
Cancel the specified multiple file transfer.
|
List<String> | getJoinedNodeList()
Get the list of nodes on the channel.
|
String | getName()
Get the channel name.
|
String | getNodeIpAddress(String nodeName)
Get the IPv4 address of the specified node.
|
boolean | isSecureChannel()
Check if the channel is secure.
|
void | rejectFile(String exchangeId)
Reject the receive request for the specified file transfer.
|
void | rejectMultiFiles(String taskId)
Reject the receive request for the specified multiple file transfer.
|
void | sendData(String toNode, String payloadType, byte[][] payload)
Send the specified data to the specified node on the channel.
|
void | sendDataToAll(String payloadType, byte[][] payload)
Send the specified data to all the nodes on the channel.
|
String | sendFile(String toNode, String fileType, String filePath, int timeoutMsec)
Send the specified file to the specified node on the channel.
|
String | sendMultiFiles(String toNode, String fileType, List<String> listFilePath, int timeoutMsec)
Send the specified list of files to the specified node on the channel.
|
혹시 그룹플레이 기능을 명시한 최대 11명 이상사용할 수 있는 방법은 없나요?
답글삭제죄송합니다만 저도 잘 모르겠네요. ㅜㅜ 그런데 링크가서 확인해 보니 Group play는 Note4 이후로 지원안하는것 같네요. chord는 못 찾겠구요.
삭제