Sorry we missed this. It is possible to use libgdx with GameSparks. Let us know if you are still creating this project and we'll see if we can help.
Thanks,
Oisin
A
Aecio Lima Ribeiro
said
almost 7 years ago
Hi,
I'm very interested in to know if it's possible to integrate GameSparks on LibGDX. I saw you have an Android SDK version. Does it can be used to integrate on LibGDX? Does it use some Android sdk dependency so it can't be reused on java projects?
Thanks,
Aecio
A
Aecio Lima Ribeiro
said
almost 7 years ago
Hi there, after some research I decided to try integrate GameSparks by myself. For my surprise it's pretty easy, salvo some gradle configuration. Anyway, I decided to write a blog post about it: http://www.locomotivemobile.com/devlog/2016/03/18/libgdx-and-gamesparks/
Hope I can help someway.
a
azli aima
said
over 6 years ago
Hello Aecio Lima Ribeiro, can you share the code to IGSPlatform. Its not documented anywhere on how to implements it. In your blog, you have CustomPlatform class, can you share how to implement it?
A
Aecio Lima Ribeiro
said
over 6 years ago
Hey azli,
I've implemented the code based on Android sample code, from here:
Thanks Aecio! I will try it out. Good to see some LibGDX user here :)
S
SeungHo Back
said
almost 6 years ago
Hello, Aecio Lima Ribeiro
this getHmac() function makes some error
{"@class":".AuthenticatedConnectResponse","error":"ERROR Unrecognized token 'C': was expecting ('true', 'false' or 'null')\n at [Source: {\"platform\":\"Service API Tests\",\"hmac\":[C@fb02ffd,\"@class\":\".AuthenticatedConnectRequest\"}; line: 1, column: 42]","requestId":"0"
like this.
is there another way to use that function?
Thanks~
B
Benjamin Schulte
said
over 5 years ago
class LibGdxPlatform implements IGSPlatform { @Override public File getWritableLocation() { return null; }
@Override public void executeOnMainThread(Runnable runnable) { Gdx.app.postRunnable(runnable); }
@Override public String getPlayerId() { return null; }
@Override public String getAuthToken() { return null; }
@Override public void setPlayerId(String s) {
}
@Override public void setAuthToken(String s) {
}
@Override public Object getHmac(String nonce, String secret) { try { Mac sha256_HMAC = Mac.getInstance("HmacSHA256"); SecretKeySpec secret_key = new SecretKeySpec(secret.getBytes("UTF-8"), "HmacSHA256");
Lam Kok Weng
Hi,
Just wondering, is there a way to use game sparks with libgdx? Do I have to create bridges in Android and IOS to do this?
Hi Lam,
Sorry we missed this.
It is possible to use libgdx with GameSparks. Let us know if you are still creating this project and we'll see if we can help.
Thanks,
Oisin
- Oldest First
- Popular
- Newest First
Sorted by Oldest FirstCustomer Support
Hi Lam,
Sorry we missed this.
It is possible to use libgdx with GameSparks. Let us know if you are still creating this project and we'll see if we can help.
Thanks,
Oisin
Aecio Lima Ribeiro
Hi,
I'm very interested in to know if it's possible to integrate GameSparks on LibGDX. I saw you have an Android SDK version. Does it can be used to integrate on LibGDX? Does it use some Android sdk dependency so it can't be reused on java projects?
Thanks,
Aecio
Aecio Lima Ribeiro
Hi there, after some research I decided to try integrate GameSparks by myself. For my surprise it's pretty easy, salvo some gradle configuration. Anyway, I decided to write a blog post about it: http://www.locomotivemobile.com/devlog/2016/03/18/libgdx-and-gamesparks/
Hope I can help someway.
azli aima
Hello Aecio Lima Ribeiro, can you share the code to IGSPlatform. Its not documented anywhere on how to implements it. In your blog, you have CustomPlatform class, can you share how to implement it?
Aecio Lima Ribeiro
Hey azli,
I've implemented the code based on Android sample code, from here:
https://bitbucket.org/gamesparks/gamesparks-android-sdk/src/c0e7d30f076aafc5f7984e6010006cd05f9c13bf/gamesparks-android-client-sdk/src/main/java/com/gamesparks/sdk/android/GSAndroidPlatform.java?at=master&fileviewer=file-view-default
So, I've created this code:
public class CustomPlatform implements IGSPlatform {
@Override
public File getWritableLocation() {
return null;
}
@Override
public void executeOnMainThread(Runnable runnable) {
}
@Override
public String getPlayerId() {
return null;
}
@Override
public String getAuthToken() {
return null;
}
@Override
public void setPlayerId(String s) {
}
@Override
public void setAuthToken(String s) {
}
@Override
public Object getHmac(String nonce, String secret) {
try {
Mac sha256_HMAC = Mac.getInstance("HmacSHA256");
SecretKeySpec secretKeySpec = new SecretKeySpec(secret.getBytes("UTF-8"), "HmacSHA256");
sha256_HMAC.init(secretKeySpec);
return Base64Coder.encode(sha256_HMAC.doFinal(nonce.getBytes("UTF-8")));
} catch(Exception e) {
return null;
}
}
@Override
public void logMessage(String s) {
}
@Override
public void logError(Throwable throwable) {
}
}
Hope, this can help you.
Regards
1 person likes this
azli aima
Thanks Aecio! I will try it out. Good to see some LibGDX user here :)
SeungHo Back
Hello, Aecio Lima Ribeiro
this getHmac() function makes some error
{"@class":".AuthenticatedConnectResponse","error":"ERROR Unrecognized token 'C': was expecting ('true', 'false' or 'null')\n at [Source: {\"platform\":\"Service API Tests\",\"hmac\":[C@fb02ffd,\"@class\":\".AuthenticatedConnectRequest\"}; line: 1, column: 42]","requestId":"0"
like this.
is there another way to use that function?
Thanks~
Benjamin Schulte
-
Documentation Notes
-
Design issues with user events
-
Using NoSQL
-
Runtime Collections vs Metadata Collections
-
Anonymous authentication from browser app
-
Modules
-
Movement With Unity
-
Problem with url parameters for downloadables
-
Querying NoSql GameSparks database
-
Challenge accesType
See all 2487 topics