openforge / capacitor-game-services Goto Github PK
View Code? Open in Web Editor NEWA capacitor plugin for both Apple Game Center and Google Play Game Services libraries.
License: MIT License
A capacitor plugin for both Apple Game Center and Google Play Game Services libraries.
License: MIT License
Adding a warning log to a plugin call that matches the ios signature. While no reset call is in the android games API, the ios API call is very useful for manual testing.
I haven't reproduced this myself but google is reporting it in their automated tests. I've also seen it on crashlytics, occurs in Android 8.1.
Line:
Error:
io.openforge.gameservices.GameServices.handleOnActivityResult (GameServices.java:57)
com.getcapacitor.Bridge.onActivityResult (Bridge.java:1000)
com.getcapacitor.BridgeActivity.onActivityResult (BridgeActivity.java:216)
android.app.Activity.dispatchActivityResult (Activity.java:8300)
View in native android app is found automatically but might need to be set/found for WebView applications.
Title is descriptive.
I call GameServices.showLeaderboard("CgkIqpWnm6UbEAIQAQ")
and get (from logcat):
05-09 07:44:51.544 15437 15524 V Capacitor/Plugin: To native (Capacitor plugin): callbackId: 129018517, pluginId: GameServices, methodName: showLeaderboard
05-09 07:44:51.544 15437 15524 V Capacitor: callback: 129018517, pluginId: GameServices, methodName: showLeaderboard, methodData: {}
05-09 07:44:51.545 15437 15502 W GameServices: showLeaderboard called without providing leaderboardId
Edit:
Trying to call GameServices.unlockAchievement("abcdef");
didn't work either, logging Achievement ID must not be null or empty
. Apparently no method, that needs an argument, works.
There are is enabled methods available in android SDKs. I will check if ios services also crash the application.
Mentioned: openforge/openfarm-puzzle-game#15
Adding null checks instead of isAvailable calls.
The completion banner may have been true by default at some point. It seems to be false as default now. Past issues report banner not showing on devices in sandbox environments, so it could be a combination of these issues.
https://developer.apple.com/documentation/gamekit/gkachievement/1521058-showscompletionbanner
How is my MainActivity supposed to look?
I get this error: cannot find symbol add(GameServices.class);
My code looks like this
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
add(GameServices.class);
}
What's wrong?
Add an option that turns off native dialogs, captures achievement unlock data, and pass the event data to the WebView
Whatever I do, I meet "GameServices does not have web implementation.", Can you tell me what it might be?
(I don't use ionic if that's important.)
import { Plugins } from '@capacitor/core';
import '@openforge/capacitor-game-services';
import { GameServicesPlugin } from '@openforge/capacitor-game-services';
const GameServices = Plugins.GameServices as GameServicesPlugin;
GameServices.signIn();
This plugin doesn't support Capacitor 3. It should be a pretty straightforward process to upgrade. The upgrade guide here: https://capacitorjs.com/docs/updating/plugins/3-0#use-the-new-capacitorplugin-annotation
Happy to contribute a PR to help migrate it over from the Capacitor 2.x style to Capacitor 3.x. ๐
There is no GameServices plugin when trying to use it in iOS. What is minimum version of capacitor (i use 2.4.7). Maybe i need to add something extra to ios code?
Thanks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.