chat event value is not received after few seconds

0 votes
Hello, If i play app on system then messsge send and receive but in the case when i deploy app and run it on devices,after few secons message are not receive.
asked Aug 1, 2016 in Android by rbhardwaj1 (10 points)

1 Answer

0 votes
Hi Bhardwaj,

If i understood the query correctly, then after installing the app on device, everything works fine for few seconds but after that it is not working. If yes, then could you please share some more details for the same like the console logs whenever this issue occurs and the code snippet you are using to send messages? Are you getting any eror code in the corresponding callback? What is version of AppWarp SDK you are using in your application?

All the above informations will help us to debug the problem.

Regards,

Rajeev Ranjan
answered Aug 1, 2016 by rajeev.etc (1,660 points)
Hello sir,

Yes ,You got it right, i am not getting any error or null reference,i checked the debug console window, but i found after fews second message not debug and if(eventObj.getSender() != appwarp.username) statement is not execute,this problem is happening when app is running on device.
please check my code is given below.

public void onChatReceived (ChatEvent eventObj)
{
   com.shephertz.app42.gaming.multiplayer.client.SimpleJSON.JSONNode msg = com.shephertz.app42.gaming.multiplayer.client.SimpleJSON.JSON.Parse (eventObj.getMessage ());
    if(eventObj.getSender() != appwarp.username)
    {
           print ("chat event values received" );
        appwarp.movePlayer(msg["x"].AsFloat,msg["y"].AsFloat,msg["z"].AsFloat);
    }
}

I am using Unity4.6 pro and App42-Unity3D-SDK-3.4


Thanks
Rampravesh
Which SDK you are using for AppWarp?
Hi,

 App42-Unity3D-SDK-3.4
Hi Rampravesh,

I am not asking about App42-Unity3d-SDK. This SDK does not have chat support.
The chat support is only available in AppWarpUnity SDKs.
So, please let me know that which AppWarpUnity SDK you are using, it may be AppWarpUnity.dll or AppWarpUnityMobile.dll.

Regards,
Rajeev
Hello sir,

I am using AppWarpUnity.
Hi Rampravesh,

Could you please try AppWarpUnityMobile.dll whenever you are building your unity project for mobile platform?

Please try this and let me know if you still face the same issue.

Regards,
Rajeev
AppWarpUnity.dll is for desktop builds and AppWarpUnityMobile.dll is for mobile builds. Also, you need add the plug-ins provided by us while building for mobile platform. Please have a look here: https://github.com/shephertz/AppWarpUnity/tree/master/v1.10.1
Hello sir,


AppWarpUnityMobile.dll is not working in Unity editor.Whenever i try to connect to appwarp sever it failed and does not connected.

Thanks
Ramparvesh
Yes, AppWarpUnityMobile will not work on editor. For editor use AppWarpUnity.dll but while building project for mobile(iOS, Android), please use AppWarpUnityMobile.dll.
Hello Rajeev,

Thank a ton for your reply. Now i have replaced the appwarpUnity SDk with AppWarpUnityMobile but after building the xcode project i am facing few more issues that are mentioned below:

Undefined symbols for architecture arm64:
  "__CloseUdpIos", referenced from:
      _ClientChannel__CloseUdpIos_m9067 in Bulk_AppWarpUnityMobile_0.o
     (maybe you meant: _ClientChannel__CloseUdpIos_m9067_MethodInfo, _ClientChannel__CloseUdpIos_m9067 )
  "__ReadUdpIos", referenced from:
      _ClientChannel__ReadUdpIos_m9066 in Bulk_AppWarpUnityMobile_0.o
     (maybe you meant: _ClientChannel__ReadUdpIos_m9066_MethodInfo, _ClientChannel__ReadUdpIos_m9066 )
  "__CreateUdpIos", referenced from:
      _ClientChannel__CreateUdpIos_m9064 in Bulk_AppWarpUnityMobile_0.o
     (maybe you meant: _ClientChannel__CreateUdpIos_m9064, _ClientChannel__CreateUdpIos_m9064_MethodInfo )
  "__CloseIos", referenced from:
      _ClientChannel__CloseIos_m9058 in Bulk_AppWarpUnityMobile_0.o
     (maybe you meant: _ClientChannel__CloseIos_m9058, _ClientChannel__CloseIos_m9058_MethodInfo )
  "__ReadIos", referenced from:
      _ClientChannel__ReadIos_m9057 in Bulk_AppWarpUnityMobile_0.o
     (maybe you meant: _ClientChannel__ReadIos_m9057_MethodInfo, _ClientChannel__ReadIos_m9057 )
  "__SendIos", referenced from:
      _ClientChannel__SendIos_m9056 in Bulk_AppWarpUnityMobile_0.o
     (maybe you meant: _ClientChannel__SendIos_m9056, _ClientChannel__SendIos_m9056_MethodInfo )
  "__ConnectIos", referenced from:
      _ClientChannel__ConnectIos_m9055 in Bulk_AppWarpUnityMobile_0.o
     (maybe you meant: _ClientChannel__ConnectIos_m9055, _ClientChannel__ConnectIos_m9055_MethodInfo )
  "__SendUdpIos", referenced from:
      _ClientChannel__SendUdpIos_m9065 in Bulk_AppWarpUnityMobile_0.o
     (maybe you meant: _ClientChannel__SendUdpIos_m9065, _ClientChannel__SendUdpIos_m9065_MethodInfo )
  "__CreateIos", referenced from:
      _ClientChannel__CreateIos_m9054 in Bulk_AppWarpUnityMobile_0.o
     (maybe you meant: _ClientChannel__CreateIos_m9054, _ClientChannel__CreateIos_m9054_MethodInfo )
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)


Any help would be great full.

Thanks
Bhardwaj
Hi Bhardwaj,

Please check if you forgot to add plugin folder which you get along with the SDK. The SDK comes with 3 dlls and one plugin folder. The plugin folder must be added while building the project for Mobile platform.

Let me know if this is not the case.

Regards,
Rajeev
Hello Rajeev,

Replacing the SDK worked for me, thank you

Regards
Bhardwaj
Great, let me know if you have any further queries.
Download Widgets
Welcome to ShepHertz Product line forum, where you can ask questions and receive answers from the community. You can also reach out to us on support@shephertz.com
...