コード例 #1
0
  @Kroll.method
  public void getPlayerScore(final String codeID) {
    BScoreListener listener =
        new BScoreListener() {

          @Override
          public void onComplete(PlayerScore p) {
            KrollDict data = new KrollDict();
            data.put("PlayerScore", p);
            fireEvent("onPlayerScore", data);
          }

          @Override
          public void onBeintooError(Exception e) {
            fireEvent("onError", new KrollDict());
          }
        };

    Beintoo.currentContext = _tiContext.getAndroidContext();
    Beintoo.getPlayerScoreAsync(_tiContext.getAndroidContext(), codeID, listener);
  }