Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tesing Algorand SDK on Unity Android: "ApiException: Operation is not supported on this platform." #34

Open
emaadgh opened this issue Nov 1, 2021 · 4 comments

Comments

@emaadgh
Copy link

emaadgh commented Nov 1, 2021

Hi,
I want to use dotnet-algorand-sdk to develope a multiplatform game in Unity that works on Android, iOS and Standalone PC. on windows platform everything is ok but after building for android and testing on device, I get the following error :

2021-11-01 12:04:37.721 7115-7250/? E/Unity: ApiException: Operation is not supported on this platform.
at Algorand.Client.ApiClient.Deserialize (RestSharp.IRestResponse response, System.Type type) [0x0018c] in :0
at Algorand.V2.Algod.DefaultApi.TransactionParamsWithHttpInfo () [0x00162] in :0
at Algorand.V2.Algod.DefaultApi.TransactionParams () [0x00000] in :0
at AlgorandManager.PayPlayerwithAlgorandFunction () [0x00087] in :0
Rethrow as Exception: Could not get params
at AlgorandManager.PayPlayerwithAlgorandFunction () [0x000a0] in :0
at Init.MakeTransaction () [0x0000f] in :0
at UnityEngine.Events.InvokableCall.Invoke () [0x00010] in <58ded747c1794c60a2531ce56044a432>:0
at UnityEngine.Events.UnityEvent.Invoke () [0x00022] in <58ded747c1794c60a2531ce56044a432>:0
at UnityEngine.UI.Button.Press () [0x0001c] in <46205c1946f1470

Is there any way that I can make it work on mobile platforms or because it uses .NET libraries it's impossible?

I like to mention that I used .NET libraries like Websocket-sharp before in these platforms and they work perfectly.

Thanks.

@Vytek
Copy link

Vytek commented Nov 1, 2021

@emaadgh I believe it is possible, but perhaps faster to use: https://github.com/CareBoo/unity-algorand-sdk

@rfustino
Copy link
Contributor

I am guessing it is possible. Xamarin deploys to Android. So, whatever they did to make that work could work here. Mono project.

@emaadgh
Copy link
Author

emaadgh commented Nov 17, 2021

@rfustino Thanks Russ, I like to make this repository work for mobile platforms in Unity.

So about Xamarin, do they use this exact SDK in Xamarin directly? or there is another one that I should look to it?

Any other suggestion on how I can make this work will be appreciated.

@rfustino
Copy link
Contributor

rfustino commented Dec 9, 2021

Yes @emaadgh . The exact SDK is used. It is .NET 2.0 compliant so should work cross platform. Are you still getting this error or have you started using the Unity SDK? If you started using https://github.com/CareBoo/unity-algorand-sdk please let me know o your experience. I will be reviewing that next week. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants