Minimum target of android?

edited March 2013 in Native
Which is minimum target of android, is it 2.2(API-8) or 2.3(API-9)?

I have some building issues of can't build with gnustl_static, at 2.2.
and it is buildable at stlport_static. but when I run program, it encounters error

[14] WARN Photon.SocketServer.PeerBase [(null)] - Disconnecting peer 0: Unexpected data received

like this.

Because it is completely run well at iOS version, I think it's some build or link issues.


  • Minimum supported target is 2.2, but we havn't tested with 2.2 for a while, so maybe some of the changes, that have gone public in the near past, could have introduced an issue.
    We are currently preparing the release. Would be cool, if you could give us feedback then, if its still an issue with that version.
  • The C++ client SDKs have just gone live, so it would be great if you could tell us, if you can still reproduce your issues with the AndroiNDK client lib.
  • Hi, I got a clue.

    I upgraded my client to and now can compile both gnustl_static and stlport_static

    However, the problem was not linking or compile issue. I think.

    I am using establishEncryption() to encrypt message between client and servers.
    When I remove establishEncryption() from Android Client.
    It works just fine!.

    I think Android Version of establishEncryption has problem.
    Please, fix this.

  • Here are more details.

    at first client connect to server and calls establishEncryption().

    it always goes to ENCRYPTION_ESTABLISHED.
    it's fine.

    and sending and receiving not encrypted messages, it's fine.

    but, when sending and receiving encrypted messages, some is fine, and some is not.

    when client send some messages.
    2013-02-22 21:29:37,315 [14] WARN Photon.SocketServer.PeerBase [(null)] - Disconnecting peer 0: Unexpected data received

    I got some messages, like this. and disconnected.

    and if I send some message from server to client.
    client get no messages and gets timeout disconnect.

    As I said before. It is still runs well at iOS build.
    So I could only think NDK version of encrypting, decrypting library is bugggy.
  • Thank you for the information.
    Is this reproduceable with the demos from within the SDK?
    If not, then please provide us with a minimal reproduction case.
  • I reporoduced with demo_realtime

    first add one line of establishEncryption();

    void CPhotonLib::onStatusChanged(int statusCode)
    CCLOG("onStatusChanged called, statusCode = %d", statusCode);
    case ExitGames::Photon::StatusCode::CONNECT:
    // join the game.
    CCLOG("joining game");
    mCurrentState = stateJoining;
    mIsInGame = true;

    and second add one line of sending encrypted one at sendData function

    void CPhotonLib::sendData(unsigned char eventCode)
    if(mCurrentState != stateJoined)

    // data container
    ExitGames::Common::Hashtable ev;

    // switch over different data types
    // game-related position information of local player
    ev.put(STATUS_PLAYER_POS_X, mpSample->player[0].x);
    ev.put(STATUS_PLAYER_POS_Y, mpSample->player[0].y);
    mpPeer->opCustom(228, true, 0, true);

    server get error of
    2013-03-08 21:19:39,371 [21] WARN Photon.SocketServer.PeerBase [(null)] - Disconnecting peer 36: Unexpected data received

    and disconnected.

    as same source is work well at iOS version, this is bug of AndroidNDK version.
  • Thank you for the reproduction case.
    Couldn't try it yet. We will look into this early next week.
  • Hi again.
    We have successfully reproduced and fixed this issue and I am confident that we can provide you with a fix tomorrow.
Sign In or Register to comment.