Returns an instance of the CleverTap SDK.

@param context The Android context
@return The {@link CleverTapAPI} object
@deprecated use {@link CleverTapAPI#getDefaultInstance(Context context)}
969668
public static @Nullable CleverTapAPI getInstance(Context context) throws CleverTapMetaDataNotFoundException, CleverTapPermissionsNotSatisfied {
        // For Google Play Store/Android Studio tracking
        sdkVersion = BuildConfig.SDK_VERSION_STRING;
        return getDefaultInstance(context);
    }
38529
protected static <T extends Annotation> T getAnnotationFromContext(InvocationContext context, Class<T> clazz) {
        T result = context.getMethod().getAnnotation(clazz);
        return result != null ? result : context.getTarget().getClass().getAnnotation(clazz);
    }
1190502
private GestureDetectorCompat getGestureDetector() {
    if (gestureDetector == null) {
      gestureDetector = new GestureDetectorCompat(view.getContext(), gestureListener);
    }
    return gestureDetector;
  }
751441
public static Bitmap getThumbnail(Context context, Uri uri) {
        return getThumbnail(context, uri, getMimeType(context, uri));
    }
280205
JCAContextProvider getJCAContextProvider(Class<?> workContextClass) {
        JCAContextProvider provider = null;
        for (Class<?> cl = workContextClass; provider == null && cl != null; cl = cl.getSuperclass())
            provider = contextProviders.getService(cl.getName());

        return provider;
    }
773673
@NonNull public static Activity getActivity(@NonNull Context context) {
    if (context == null) {
      throw new NullPointerException("context == null");
    }
    if (context instanceof Activity) {
      return (Activity) context;
    }

    while (context instanceof ContextWrapper) {
      if (context instanceof Activity) {
        return (Activity) context;
      }
      context = ((ContextWrapper) context).getBaseContext();
    }
    throw new IllegalStateException("Could not find the surrounding Activity");
  }
572105
public static Activity scanForActivity(Context context) {
        if (context == null) return null;

        if (context instanceof Activity) {
            return (Activity) context;
        } else if (context instanceof ContextWrapper) {
            return scanForActivity(((ContextWrapper) context).getBaseContext());
        }

        return null;
    }
809972
public static RxBleClient getRxBleClient(Context context) {
        SampleApplication application = (SampleApplication) context.getApplicationContext();
        return application.rxBleClient;
    }
963177
@Deprecated
    public static RequestQueue getRequestQueue(Context context) {
        if (InstanceRequestQueue == null) {
            InstanceRequestQueue = newRequestQueue(context);
        }
        return InstanceRequestQueue;
    }
56499
private GestureDetectorCompat getGestureDetectorCompat() {
    if (gestureDetector == null) {
      GestureDetector.OnGestureListener gestureListener = new SimpleOnGestureListener() {

        @Override public boolean onSingleTapUp(MotionEvent e) {
          boolean handled = false;
          int position = shape.getNoxItemHit(e.getX(), e.getY());
          if (position >= 0) {
            handled = true;
            NoxItem noxItem = noxItemCatalog.getNoxItem(position);
            listener.onNoxItemClicked(position, noxItem);
          }
          return handled;
        }
      };
      gestureDetector = new GestureDetectorCompat(getContext(), gestureListener);
    }
    return gestureDetector;
  }
751296
public static <T> T getContext(ELContext context, Class<T> key, T defaultValue) {
        @SuppressWarnings("unchecked")
        final T result = (T) context.getContext(key);
        return result == null ? defaultValue : result;
    }
758106
@Override
    public Map<String, String> getCopyOfContextMap() {
        Map<String, String> oldMap = inheritableThreadLocal.get();
        if (oldMap != null) {
            return new HashMap<>(oldMap);
        } else {
            return null;
        }
    }
1321063
@Pure
	public static ClassLoader getContextClassLoader() throws AndroidException {
		synchronized (Android.class) {
			final ClassLoader cl = (contextClassLoader == null) ? null : contextClassLoader.get();
			if (cl != null) {
				return cl;
			}
		}
		final Object context = getContext();
		try {
			final Method method = context.getClass().getMethod("getClassLoader"); //$NON-NLS-1$
			final Object classLoader = method.invoke(context);
			final ClassLoader cl = (ClassLoader) classLoader;
			synchronized (Android.class) {
				contextClassLoader = new WeakReference<>(cl);
			}
			return cl;
		} catch (Exception e) {
			throw new AndroidException(e);
		}
	}
90019
@SuppressWarnings("unchecked") //
  public static <T> T getDaggerComponent(Context context) {
    //noinspection ResourceType
    return (T) context.getSystemService(SERVICE_NAME);
  }
960049
@SuppressWarnings({"unused", "WeakerAccess"})
    protected static CleverTapInstanceConfig createInstance(@NonNull String jsonString){
        try {
            return new CleverTapInstanceConfig(jsonString);
        } catch (Throwable t) {
            return null;
        }
    }
399828
private String getDefaultBrowserAgent(Context context) {
        String userAgent = "";
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {
            try {
                userAgent = WebSettings.getDefaultUserAgent(context);
            } catch (Exception ignore) {
                // A known Android issue. Webview packages are not accessible while any updates for chrome is in progress.
                // https://bugs.chromium.org/p/chromium/issues/detail?id=506369
            }
        }
        return userAgent;
    }
146138
NullnessPropagationTransfer setContext(@Nullable Context context) {
    // This is a best-effort check (similar to ArrayList iterators, for instance), no guarantee
    Preconditions.checkArgument(
        context == null || this.context == null,
        "Context already set: reset after use and don't use this class concurrently");
    this.context = context;
    // Clear traversed set just-in-case as this marks the beginning or end of analyzing a method
    this.traversed.clear();
    // Null out local inference results when leaving a method
    this.inferenceResults = null;
    return this;
  }