GameLift Android build

Hi,

I have sucessfully implemented gamelift server and client in unreal project.

I have built dedicated server + client for PC, and everything works fine.

But, i want to build for Android, how can i build gamelift for Android? Probably i need first to build library for Android?

Currently when i try to build .apk from unreal with current setup, i’m getting this error:

[59/365] Module.GameLiftClientSDK.gen.cpp [armv7-es2]
UATHelper: Packaging (Android (ASTC)): In file included from D:/Projects/Private/GameLift/Plugins/GameLiftClientSDK/Intermediate/Build/Android/GameLift/Development/GameLiftClientSDK/Module.GameLiftClientSDK.gen.cpp:2:
UATHelper: Packaging (Android (ASTC)): In file included from D:\Projects\Private\GameLift\Plugins\GameLiftClientSDK\Intermediate\Build\Android\GameLift\Inc\GameLiftClientSDK\GameLiftClientApi.gen.cpp:8:
UATHelper: Packaging (Android (ASTC)): In file included from D:/Projects/Private/GameLift/Plugins/GameLiftClientSDK/Source\GameLiftClientSDK/Public/GameLiftClientApi.h:9:
UATHelper: Packaging (Android (ASTC)): In file included from D:/Projects/Private/GameLift/Plugins/GameLiftClientSDK/Source/GameLiftClientSDK/Public/aws/gamelift/GameLiftClient.h:18:
UATHelper: Packaging (Android (ASTC)): D:/Projects/Private/GameLift/Plugins/GameLiftClientSDK/Source/GameLiftClientSDK/Public\aws/gamelift/GameLiftErrors.h(74,3): error: unknown type name '__declspec'
UATHelper: Packaging (Android (ASTC)): AWS_GAMELIFT_API Aws::Client::AWSError<Aws::Client::CoreErrors> GetErrorForName(const char* errorName);
UATHelper: Packaging (Android (ASTC)): ^
UATHelper: Packaging (Android (ASTC)): D:/Projects/Private/GameLift/Plugins/GameLiftClientSDK/Source/GameLiftClientSDK/Public\aws/gamelift/GameLift_EXPORTS.h(38,30): note: expanded from macro 'AWS_GAMELIFT_API'
UATHelper: Packaging (Android (ASTC)): #define AWS_GAMELIFT_API __declspec(dllimport)
UATHelper: Packaging (Android (ASTC)): ^

Update: Is it legit to remove gamelift client, and create everything in lambda, client (unreal-android) can send http request (throught apiGateway) to create player session, so player session is created and return back to client response, so client can join to that session?

Or for example: Player can send http request for session search, lambda function will return back to client possible sessions?

And with this, i’m avoiding that clients need to create session…is this right way?

So, if everything is correct that i have asked, is it later possible to integrate flexmatch?

Thanks

Sorry for the late reply, this is pretty much GameLift’s recommended approach, which is to have clients calling some client service that performs actions on their behalf to avoid having to embed AWS credentials in the client or provide direct permissions to create resources.

See

https://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-architecture.html

Theres a useful example (without API Gateway because its built for simplicity) here that could be useful to look at:

https://aws.amazon.com/blogs/gametech/creating-servers-for-multiplayer-mobile-games-with-amazon-gamelift/

(this is using the new realtime server approach but it still needs to create / find game sessions and create player sessions)

I forgot about this blog post which proposes a similar architecture:

https://aws.amazon.com/blogs/gametech/fitting-the-pattern-serverless-custom-matchmaking-with-amazon-gamelift/