Is API v 2.3.x broken on Android

0 votes
I am unable to get any backend server call to succeed on Android. It is working on Win7, iOS and WP8. Rolled back to v1.9 and it started working again. Can you please confirm whether this is true and being looked at?


Rob Targosz

Bent Vector Studios
asked Mar 9, 2014 in App42 Cloud API-BaaS by rtargosz (94 points)

2 Answers

+1 vote
Best answer

API v 2.3.x is working great on android, in sdk sample there is App42_Unity3D_SDK_WP8_x.x.dll added, that's why you are not able to call any service on android, Because the WP8 _x.x.dll is only for Windows phone 8. 

App42 Unity SDK consists of separate DLLs to be used for building on Windows Phone and is available under x.x/App42-Unity3D-SDK-WP8 folder of downloaded zip. However, for the rest of the platform it is available inside x.x/App42-Unity3D-SDK folder.

So just replace the App42_Unity3D_SDK_WP8_x.x.x.dll with App42_Unity3D_SDK_x.x.x.dll . 


answered Mar 10, 2014 by Akshay.Mishra (179 points)
selected May 2, 2014 by rtargosz
If I put the -WP8 version in Assets/Plugins/WP8 and the other version in /Assets/Plugins, won't the WP8 version only get used in WP8 builds and the other one for all other platforms? That's what I'm doing...

I completely removed the -WP8 version from my project tree and still see the same problem.

I've only testing on Android version 4.4.2 so far. Perhaps this issue is specific to that platform?
Could you explain what the error says, when calling a method.
There's no error or anything. Any calls that go to the cloud backend simply never return. For example userService.Authenticate(name, pass, callback); never gets into the callback for success or failure. I've waited as long as 10 minutes. On other platforms, response times are typically 1-5s.
set  "App42Log.SetDebug(true);"  just before the method, and see the logs in the logcats console of your android installed eclipse.  And send me the app42 log details.
Ok, thanks for the debug function, that definitely shows a problem.
_serviceApi = new ServiceAPI(ApiKey, SecretKey);
_userService = _serviceApi.BuildUserService();
_callback = new cloudAuthenticateCallback();
// checked that _serviceApi, _userService, _playerName, _playerPassword, and _callback are all valid
_userService.Authenticate(_playerName, _playerPassword, _callback);

I/Unity   (32177): NullReferenceException: Object reference not set to an instance of an object
I/Unity   (32177):   at System.Security.Cryptography.HMAC.Initialize () [0x00000] in <filename unknown>:0
I/Unity   (32177):   at System.Security.Cryptography.HMAC.HashCore (System.Byte[] rgb, Int32 ib, Int32 cb) [0x00000] in <filename unknown>:0
I/Unity   (32177):   at System.Security.Cryptography.HashAlgorithm.ComputeHash (System.IO.Stream inputStream) [0x00000] in <filename unknown>:0
I/Unity   (32177):   at com.shephertz.app42.paas.sdk.csharp.util.Util.ComputeHmac (System.String input, System.Byte[] key) [0x00000] in <filename unknown>:0
I/Unity   (32177):   at com.shephertz.app42.paas.sdk.csharp.util.Util.Sign (System.String secretKey, System.Collections.Generic.Dictionary`2 paramsList) [0x00000] in <filename unknown>:0
I/Unity   (32177):   at com.shephertz.app42.paas.sdk.csharp.user.UserService.Authenticate (System.String uName, System.String pwd, App42CallBack callBack) [0x00000] in <filename unknown>:0
I/Unity   (32177):   at CloudService.Login () [0x00044] in D:\Source\WordPortal\Assets\NGUIMenu\Scripts\Custom\Misc\CloudService.cs:79
I/Unity   (32177):   at GameMana
I don't think this is being caused by my code. I see the same problem with the sample. Any feedback here?
You don't need to disable stripping level.
You just have to add a Link.xml file in your project.
As mentioned in this blog.
That works fine on iOS but on Android I get connection problems with stripping set to anything but disabled even with the link.xml file updated per the blog.
Sorry for not getting you, but as i understood that you are not able to make any call from android platform, when stripping level is set to any option except disabled.
Am I right ?
Nevermind; there were 2 link.xml files and I edited the wrong one. Byte code stripping is working on Android now!
0 votes
It turns out that if you set the Stripping Level to anything but Disabled you'll get this problem with several different plug-ins. I was using Stripping Level "use micro mscorlib". Switching to disabled fixes this problem.
answered Mar 13, 2014 by rtargosz (94 points)
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