Multi Platform Multi-Player Multi-App
The concepting phase is over and we will release a first beta client here soon. So stay tuned.
Licensed under the Apache License, Version 2.0
include StudioLounge as Android Library Project
register GCP background Service and LoungActivity in AndroidManifest.xml
<activity android:name="eu.andlabs.studiolounge.LoungeActivity" />
<service android:name="eu.andlabs.studiolounge.gcp.GCPService" />
Themes can be applied to the Lounge Activity
launch the Lounge Activity to visit the Player Lobby and Chat
startActivity(new Intent(this, LoungeActivity.class));
add category "eu.andlabs.lounge" to the Game Intent Filter
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="eu.andlabs.lounge" />
</intent-filter>
This activity will be started once players joined for a game
add the permission
<uses-permission android:name="android.permission.GET_ACCOUNTS"/>
for authentication and
<uses-permission android:name="android.permission.INTERNET"/>
for internet access.
start, bind and unbind the GCP backround service
@Override
protected void onStart() { mLounge = GCPService.bind(this); }
@Override
protected void onStop() { GCPService.unbind(this, mLounge); }
send game messages
Bundle data = new Bundle();
data.putString("foo", "bar");
mLounge.sendGameMessage(data)
receive game messages
mLounge.register(new GameMsgListener() {
@Override
public void onMessageRecieved(Bundle msg) {
msg.getString("foo") // returns "bar"
}
});
Currently only String data is supported
register listeners to implement a custom Lounge experience
mLounge.register( new LobbyListener() {...} );
mLounge.register( new ChatListener() {...} );