Help with Demo

Hello guess. Please help
i want to use photon cloud service for my android game

my actions
1. steps on ... #cat-First Steps
2. download Android Photon sdk and run on Eclipse
3. in file DemoClient change appId = "<insert your appid here>" on my "c32xxxxxx- xxxx-xxx.." (from my Application List)
if i start MainMenu project i get a error : default appId in use. Customize your appId in
if i start RealtimeDemo i get main menu scene. than click start game
1. get error timeoutDisconnect peer.state: connecting ( try
2. nothing happening (try

please help What i do wrong ?

My specifications
run on Motorola DROID (with Wi-Fi connect)


  • If you want to use the Photon Cloud, you need to use the "demo-loadbalancing" and in it setup the server-address and appId.
    The Cloud's servers are listed here:
    When used in the client, the address string must end on ":5055" (example: "").
    You already got the appID from your account's page, which is good. I don't see how it fails, if you replace the said string.

    Obviously you need a network connection, too.
  • Thanks Tobias for help. I past and now RealtimeDemo is working
    and in LoadBalansing I edit ApplicationManager class That is my fault

    if (m_client.getAppId().equals("<insert your appid here>") - I past here my appId and it is was error

    Thank you very much Tobias and all you team
  • hello so i continued implementation Photon cloud
    I create my Client class ()
    public class Client extends LoadBalancingClient {
    Random m_random = new Random();
    String appId = "c32070xxxxxxxxxxxxxxxxxxxx";
    public Client()
    Log.e(appId, "!!!!!!!!!!!!!!!!!!!Load Client extends LoadBalancingClient");

    public void Connect(){
    this.connectToMaster(this.appId, "v1.0", "PlayerX");
    this.setPlayerName("Player_" + m_random.nextInt(1000));
    this.getPlayer().m_customProperties.put("class", "tank" + m_random.nextInt(99));


    public void CreateNewRoom(String name){
    HashMap<Object, Object> customGameProperties = new HashMap<Object, Object>();
    customGameProperties.put("map", "blue");
    customGameProperties.put("units", 2);

    this.opCreateRoom(name, true, true, (byte)2, customGameProperties, new String[] { "map" });


    I create client variable in my app manager
    static Client client = new Client();

    public void onCreate() {
    applicationContext = this;
    Log.e(ACTIVITY_SERVICE, "start AppManager extends Application");


    and then i call

    System.out.println( AppManager.getClient().getCurrentRoom().getName() + " !!!!!!!!!!!!server");
    System.out.println( AppManager.getClient().getRoomsCount() + " !!!!!!!!!!!!server");

    But in logCat i get
    AppManager.getClient().getCurrentRoom().getName() - myRoom - it is true
    AppManager.getClient().getRoomsCount() - 0 (zero)

    please explain why zero? I did not create room ? but i have current room name. How i can see that room is created exactly in photon cloud? may be another error
  • The master server's "lobby" is where you get the room count.
    When you are inside a (game) room, you won't get those updates and the values are 0 (or in worst case whatever they were before you got into the room).
    You can't get room counts when in a room (cause we distribute the rooms across a range of machines and don't broadcast the overall room and player counts).