// Path: hoko/src/main/java/com/hokolinks/Hoko.java
// public class Hoko {
// 
//     public static final String VERSION = "2.3.0";
// 
//     // Static Instance
//     private static Hoko sInstance;
// 
//     // Private modules
//     private Deeplinking mDeeplinking;
// 
//     // Private variables
//     private boolean mDebugMode;
//     private String mToken;
// 
//     // Private initializer
//     private Hoko(Context context, String token, boolean debugMode) {
//         mDebugMode = debugMode;
//         mToken = token;
//         Networking.setupNetworking(context);
// 
//         mDeeplinking = new Deeplinking(token, context);
//     }
// 
//     // Setup
//     /**
//      * Setups all the Hoko module instances, logging and asynchronous networking queues.
//      * Setting up with a token will make sure you can take full advantage of the Hoko service,
//      * as you will be able to track everything through automatic Analytics, which will
//      * be shown on your Hoko dashboards.
//      * Also sets the debug mode according to your generated BuildConfig class, which depends on your
//      * Build Variant. Debug mode serves the purpose of uploading the mapped Routes to the Hoko
//      * backend service.
//      * <pre>{@code
//      * Hoko.setup(this, "YOUR-API-TOKEN");
//      * }</pre>
//      *
//      * @param context   Your application context.
//      * @param token     Hoko service API key.
//      */
//     public static void setup(Context context, String token) {
//         setup(context, token, App.isDebug(context));
//     }
// 
//     /**
//      * Setups all the Hoko module instances, logging and asynchronous networking queues.
//      * Setting up with a token will make sure you can take full advantage of the Hoko service,
//      * as you will be able to track everything through automatic Analytics, which will
//      * be shown on your Hoko dashboards.
//      * Also sets the debug mode for the devices set.  Debug mode serves the purpose of uploading
//      * the mapped Routes to the Hoko backend service.
//      * <pre>{@code
//      * Hoko.setup(this, "YOUR-API-TOKEN", true);
//      * }</pre>
//      *
//      * @param context   Your application context.
//      * @param token     Hoko service API key.
//      * @param debugMode Toggle debug mode manually.
//      */
//     public static void setup(Context context, String token, boolean debugMode) {
//         if (sInstance == null) {
//             sInstance = new Hoko(context, token, debugMode);
//             sInstance.checkVersions();
//             AnnotationParser.parseActivities(context);
// 
//         } else {
//             HokoLog.e(new SetupCalledMoreThanOnceException());
//         }
//     }
// 
//     // Modules
// 
//     /**
//      * The Deeplinking module provides all the necessary APIs to map, handle and generate
//      * deeplinks.
//      * Different APIs as provided in order to be as versatile as your application requires them to
//      * be.
//      *
//      * @return A reference to the Deeplinking instance.
//      */
//     public static Deeplinking deeplinking() {
//         if (sInstance == null) {
//             HokoLog.e(new SetupNotCalledYetException());
//             return null;
//         }
//         return sInstance.mDeeplinking;
//     }
// 
//     // Logging
// 
//     /**
//      * Use this function to enable or disable logging from the Hoko SDK.
//      * It is disabled by default.
//      *
//      * @param verbose true to enable logging, false to disable.
//      */
//     public static void setVerbose(boolean verbose) {
//         HokoLog.setVerbose(verbose);
//     }
// 
//     // Debug
// 
//     /**
//      * Returns a boolean on whether the debug mode is activated or not.
//      *
//      * @return true if debug mode is on, false otherwise.
//      */
//     public static boolean isDebugMode() {
//         if (sInstance == null) {
//             HokoLog.e(new SetupNotCalledYetException());
//             return false;
//         }
//         return sInstance.mDebugMode;
//     }
// 
//     /**
//      * Checks for new SDK version on GITHUB, also checks for which version was previously installed,
//      * and in case its different it will reset the routes that were previously posted, to allow new
//      * routes to be posted.
//      */
//     private void checkVersions() {
//         if (mDebugMode) {
//             VersionChecker.checkForNewVersion(VERSION, mToken);
//         }
//     }
// 
// }
// 
// Path: hoko/src/main/java/com/hokolinks/deeplinking/listeners/SmartlinkResolveListener.java
// public interface SmartlinkResolveListener {
// 
//     void onLinkResolved(String deeplink, JSONObject metadata);
// 
//     void onError(Exception e);
// 
// }


import android.annotation.SuppressLint;
import android.app.Activity;
import android.os.Bundle;
import com.hokolinks.Hoko;
import com.hokolinks.deeplinking.listeners.SmartlinkResolveListener;
import org.json.JSONObject;
package com.hokolinks.activity;




/**
 * HokoActivity serves the purpose of receiving incoming deeplinking intents and forwarding them to
 * the Deeplinking module where it will be parsed and start the associated activity.
 */
@SuppressLint("Registered")
public class HokoActivity extends Activity implements SmartlinkResolveListener {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        String urlString = getIntent().getData().toString();
        if (urlString.startsWith("http")) {
            Hoko.deeplinking().openSmartlink(urlString, this);
        } else {
            Hoko.deeplinking().openURL(urlString);
        }
    }

    @Override
// Path: hoko/src/main/java/com/hokolinks/Hoko.java
// public class Hoko {
// 
//     public static final String VERSION = "2.3.0";
// 
//     // Static Instance
//     private static Hoko sInstance;
// 
//     // Private modules
//     private Deeplinking mDeeplinking;
// 
//     // Private variables
//     private boolean mDebugMode;
//     private String mToken;
// 
//     // Private initializer
//     private Hoko(Context context, String token, boolean debugMode) {
//         mDebugMode = debugMode;
//         mToken = token;
//         Networking.setupNetworking(context);
// 
//         mDeeplinking = new Deeplinking(token, context);
//     }
// 
//     // Setup
//     /**
//      * Setups all the Hoko module instances, logging and asynchronous networking queues.
//      * Setting up with a token will make sure you can take full advantage of the Hoko service,
//      * as you will be able to track everything through automatic Analytics, which will
//      * be shown on your Hoko dashboards.
//      * Also sets the debug mode according to your generated BuildConfig class, which depends on your
//      * Build Variant. Debug mode serves the purpose of uploading the mapped Routes to the Hoko
//      * backend service.
//      * <pre>{@code
//      * Hoko.setup(this, "YOUR-API-TOKEN");
//      * }</pre>
//      *
//      * @param context   Your application context.
//      * @param token     Hoko service API key.
//      */
//     public static void setup(Context context, String token) {
//         setup(context, token, App.isDebug(context));
//     }
// 
//     /**
//      * Setups all the Hoko module instances, logging and asynchronous networking queues.
//      * Setting up with a token will make sure you can take full advantage of the Hoko service,
//      * as you will be able to track everything through automatic Analytics, which will
//      * be shown on your Hoko dashboards.
//      * Also sets the debug mode for the devices set.  Debug mode serves the purpose of uploading
//      * the mapped Routes to the Hoko backend service.
//      * <pre>{@code
//      * Hoko.setup(this, "YOUR-API-TOKEN", true);
//      * }</pre>
//      *
//      * @param context   Your application context.
//      * @param token     Hoko service API key.
//      * @param debugMode Toggle debug mode manually.
//      */
//     public static void setup(Context context, String token, boolean debugMode) {
//         if (sInstance == null) {
//             sInstance = new Hoko(context, token, debugMode);
//             sInstance.checkVersions();
//             AnnotationParser.parseActivities(context);
// 
//         } else {
//             HokoLog.e(new SetupCalledMoreThanOnceException());
//         }
//     }
// 
//     // Modules
// 
//     /**
//      * The Deeplinking module provides all the necessary APIs to map, handle and generate
//      * deeplinks.
//      * Different APIs as provided in order to be as versatile as your application requires them to
//      * be.
//      *
//      * @return A reference to the Deeplinking instance.
//      */
//     public static Deeplinking deeplinking() {
//         if (sInstance == null) {
//             HokoLog.e(new SetupNotCalledYetException());
//             return null;
//         }
//         return sInstance.mDeeplinking;
//     }
// 
//     // Logging
// 
//     /**
//      * Use this function to enable or disable logging from the Hoko SDK.
//      * It is disabled by default.
//      *
//      * @param verbose true to enable logging, false to disable.
//      */
//     public static void setVerbose(boolean verbose) {
//         HokoLog.setVerbose(verbose);
//     }
// 
//     // Debug
// 
//     /**
//      * Returns a boolean on whether the debug mode is activated or not.
//      *
//      * @return true if debug mode is on, false otherwise.
//      */
//     public static boolean isDebugMode() {
//         if (sInstance == null) {
//             HokoLog.e(new SetupNotCalledYetException());
//             return false;
//         }
//         return sInstance.mDebugMode;
//     }
// 
//     /**
//      * Checks for new SDK version on GITHUB, also checks for which version was previously installed,
//      * and in case its different it will reset the routes that were previously posted, to allow new
//      * routes to be posted.
//      */
//     private void checkVersions() {
//         if (mDebugMode) {
//             VersionChecker.checkForNewVersion(VERSION, mToken);
//         }
//     }
// 
// }
// 
// Path: hoko/src/main/java/com/hokolinks/deeplinking/listeners/SmartlinkResolveListener.java
// public interface SmartlinkResolveListener {
// 
//     void onLinkResolved(String deeplink, JSONObject metadata);
// 
//     void onError(Exception e);
// 
// }


// Path: hoko/src/main/java/com/hokolinks/activity/HokoActivity.java
import android.annotation.SuppressLint;
import android.app.Activity;
import android.os.Bundle;
import com.hokolinks.Hoko;
import com.hokolinks.deeplinking.listeners.SmartlinkResolveListener;
import org.json.JSONObject;

package com.hokolinks.activity;




/**
 * HokoActivity serves the purpose of receiving incoming deeplinking intents and forwarding them to
 * the Deeplinking module where it will be parsed and start the associated activity.
 */
@SuppressLint("Registered")
public class HokoActivity extends Activity implements SmartlinkResolveListener {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        String urlString = getIntent().getData().toString();
        if (urlString.startsWith("http")) {
            Hoko.deeplinking().openSmartlink(urlString, this);
        } else {
            Hoko.deeplinking().openURL(urlString);
        }
    }

    @Override
    public void onLinkResolved(String deeplink, JSONObject metadata) {