Loading presentation...

Present Remotely

Send the link below via email or IM


Present to your audience

Start remote presentation

  • Invited audience members will follow you as you navigate and present
  • People invited to a presentation do not need a Prezi account
  • This link expires 10 minutes after you close the presentation
  • A maximum of 30 users can follow your presentation
  • Learn more about this feature in our knowledge base article

Do you really want to delete this prezi?

Neither you, nor the coeditors you shared it with will be able to recover it again.


Lounge - How To Guide


Lukas Jarosch

on 12 April 2013

Comments (0)

Please log in to add your comment.

Report abuse

Transcript of Lounge - How To Guide

How-To Integrate
Tutorial Coming soon! <uses-permission android:name="android.permission.INTERNET" />
//For internet-connectivity

//For a seamless Login for the user <activity
//Add the LobbyActivity where users can interact <activity android:name="your.game.GameActivity">
<action android:name="android.intent.action.MAIN" />
<category android:name="eu.andlabs.lounge" />
//This category is required so Lounge knows which activity
//supposed to be started when a game starts public GameActivity implements Multiplayable{ // Your Game needs to implement the LoungeGameCallback Interface
// and its methods Implement the rest of the methods public void onCheckIn(String player){
//Use to update your UI which participating Players
//are also in the GameActivity
} public void onAllPlayerCheckedIn(){
//Get notified when all players are inside the gameActivity //if you need them to start the game
} Interacting with Lounge public void onGameMessage(Bundle msg){
//Your custom Game Message
String target=msg.getString("shootingAt")
String player=msg.getString("player")

yourGameStateMethod(target, player);
} Bundle b= new Bundle()
// Put in your custom messages, moves, data
// that need to be send to the other players into
// a Bundle and send it
mLoungeGameController.sendGameMessage(b); Advanced Topics You can associate your gamestate to the MatchID
so matches can be resumed at anytime public void onResume(){
String matchID=getIntent.getExtra(Lounge.MATCHID);
//Init new Game
//Reload old Gamestate
} public void onPause(){
String matchID=getIntent.getExtra(Lounge.MATCHID);
//If the game is not over, save the state under the matchId for resuming
getSharedPreferences().edit().putString(matchID, gameState);
} <service
//Add the LoungeService for the backend communication Your Game // In the class handling your communication, for example
// RemotePlayer implements Player, you should create an
// instance of LoungeGameController
private LoungeGameController mLoungeGameController
= new LoungeGameController(); @Override
public void onCheckIn(String player) {
// Called when a player checks into your game, meaning
// he is ready to play

public void onAllPlayerCheckedIn() {
// Convenience method to let you know that all players
// are ready to play

public void onCheckOut(String player) {
// Called when a player left the game
} @Override
public void onGameMessage(Bundle msg) {
// This is probably your most important callback –
// the one where you receive a move
} Callbacks // In your game Activity's onStart(), bind the
// Lounge service
public void onStart() {
} // In your game Activity's onStop(), unbind the
// Lounge service
public void onStop() {
} // In your game Activity's onResume(), register your
// Longe callback listener
// Lounge service
public void onResume() {
} // When your game is completely loaded, call checkin using
// your matchID
// When your game is not being played
// anymore, checkout using your matchID
Full transcript