@@ -0,0 +1,3405 @@
+package org.godotengine.godot;%0A%0Aimport android.app.Activity;%0A%0A//import GameAnalytics SDK%0Aimport com.gameanalytics.sdk.GameAnalytics;%0A%0A/**%0A * Created by rodrigo favarete on April 2, 2017%0A */%0A%0Apublic class GodotGameAnalytics extends Godot.SingletonBase %0A%7B   %0A    private Activity activity; %0A    private boolean initialized;%0A%0A    private static final String TAG = %22GodotGameAnalytics%22;%0A%0A    /* Methods%0A     * ********************************************************************** */%0A%0A    /**%0A     * initialize SDK With GameKey and Secret Key%0A     */%0A%0A    public void init(String gaGameKey, String gaSecretKey) %0A    %7B%0A        if(!initialized) %7B%0A            final String gameKey = gaGameKey;%0A            final String secretKey = gaSecretKey;%0A            activity.runOnUiThread(new Runnable() %7B%0A                @Override %0A                public void run() %7B%0A                    initOnUiThread(gameKey, secretKey);%0A                %7D%0A            %7D);%0A        %7D%0A    %7D%0A%0A    /**%0A     * initOnUiThread%0A     */%0A%0A    public void initOnUiThread(String gaGameKey, String gaSecretKey) %0A    %7B   %0A        GameAnalytics.initializeWithGameKey(activity, gaGameKey, gaSecretKey);%0A        initialized = true;%0A    %7D%0A%0A    /**%0A     * Send a simple Design Event%0A     */%0A%0A    public void sendCustomEvent(String eventHierarchy)%0A    %7B   %0A        if(initialized) %7B%0A            GameAnalytics.addDesignEventWithEventId(eventHierarchy);%0A        %7D    %0A    %7D%0A%0A    /**%0A     * Send a Design Event with additional numerical value%0A     */%0A%0A    public void sendCustomEventWithFloat(String eventHierarchy, float value)%0A    %7B   %0A        if(initialized) %7B%0A            GameAnalytics.addDesignEventWithEventId(eventHierarchy, value);%0A        %7D    %0A    %7D%0A%0A    /**%0A     * If using modules for ads set this to true right before calling an ad and set back to false after return%0A     * to game, this avoids SDK ending a session%0A     */%0A%0A    public void manualSessionHandling(boolean toggle)%0A    %7B%0A        if(initialized) %7B%0A            GameAnalytics.setEnabledManualSessionHandling(toggle);%0A        %7D    %0A    %7D%0A%0A    /**%0A     * If manual session handling is enabled and SDK is initialized (%22init%22 method will start a session automatically)%0A     * you can control the beggining of a session from here%0A     */%0A%0A    public void startSession()%0A    %7B%0A        if(initialized) %7B%0A            GameAnalytics.startSession();%0A        %7D    %0A    %7D%0A%0A    /**%0A     * If manual session handling is enabled, there's a active session and SDK is initialized (%22init%22 method will%0A     * start a session automatically), you can control the end of a session from here%0A     */%0A    public void endSession()%0A    %7B%0A        if(initialized) %7B%0A            GameAnalytics.endSession();%0A        %7D    %0A    %7D%0A%0A%0A    /* Definitions%0A     * ********************************************************************** */%0A%0A    /**%0A     * Initilization of the Singleton%0A     */%0A%0A    static public Godot.SingletonBase initialize(Activity p_activity)%0A    %7B%0A        return new GodotGameAnalytics(p_activity);%0A    %7D%0A%0A    /**%0A     * Constructor%0A     */%0A%0A    public GodotGameAnalytics(Activity activity) %0A    %7B%0A        registerClass(%22GodotGameAnalytics%22, new String%5B%5D%0A        %7B%0A            %22init%22, %0A            %22sendCustomEvent%22,%0A            %22sendCustomEventWithFloat%22,%0A            %22manualSessionHandling%22,%0A            %22startSession%22,%0A            %22endSession%22%0A        %7D);%0A%0A        this.activity = activity;%0A    %7D%0A%7D%0A

Add singleton object