- Home /
WWW problems on android
I have this code:
public tk2dTextMesh debugMessage;
IEnumerator CoExecute()
{
string data = "some data";
WWW req = new WWW(serverName + "/?" + data);
yield return req;
if (!string.IsNullOrEmpty(req.text))
debugMessage.text = req.text;
else
debugMessage.text = "No result??";
result = JsonMapper.ToObject<MyClass>(req.text);
if (!string.IsNullOrEmpty(result.error))
{
debugMessage.text = result.error;
}
}
It works fine in the editor but after building on android the debugMessage shows "No result??" which means it's not an error in the request.
Note: debugMessage is a text mesh from 2DToolkit asset.
Comment
Did you enable the needed permissions for your Android application ? These may be needed to access the network (internet).
Your answer
Follow this Question
Related Questions
Unity download audio 1 Answer
How can i do youtube video player from video url for Android devices ? 0 Answers
WWW Android Memory Leak? 1 Answer
WWW Post (Form) not working on mobile. 1 Answer
www not working on android and iOS 0 Answers