Class MetaCore

java.lang.Object
net_62v.external.MetaCore

public final class MetaCore extends Object
Mundo core callback and process initializer
Version:
1.0
Author:
[email protected]
  • Constructor Details

    • MetaCore

      public MetaCore()
  • Method Details

    • getHostContext

      public static Context getHostContext()
      Get the application base context (of the host app)
      Returns:
      base context
    • attachMetaBase

      public static void attachMetaBase(Context context)
      Can be called inside the attachBaseContext block. MetaCore.attachMetaBase(base)
      Parameters:
      context - application base context
      See Also:
    • registerCoreCallback

      public static void registerCoreCallback(Runnable callback)
      You can render your app ui after our core done all initialize progresses.
      You should call this method to assure that our core done the initialization.
      Parameters:
      callback - will receive a callback after the init progress done.
    • setProcessLifecycleCallback

      public static void setProcessLifecycleCallback(IMundoProcessCallback callback)
      Set process callback, will schedule a callback when the mundo environment prepared and the internal application initialized.
      Parameters:
      callback - process callback, you can implement the app callback and the environment callback
    • addServiceInterpreter

      public static InvocationHandler addServiceInterpreter(String serviceName, String methodName, InvocationHandler handler)
      Add a service interpreter, you can interpret system service by this method.
      e.g. service name {Context.LOCATION_SERVICE} to interpret the location manager service.
      Method name {getLastLocation}
      (reference to {@nullable Location getLastLocation(String provider, in LastLocationRequest request, String packageName, @nullable String attributionTag);})
      to interpret the getLastLocation method.
      You can modify the service result by this api, and implement your own location spoofing tool help etc.
      Parameters:
      serviceName - The system service name
      methodName - Method name of the service you selected like getCurrentLocation
      handler - Your method interpreter, you can modify the return value and the params through our callback.
      Returns:
      The origin method interpreter, null if no origin method interpreter, if null, you can obtain the origin result by
      calling the Method.invoke function.
      See Also:
    • enableCrashReport

      public static void enableCrashReport()
      Enable crash reporter, this action will record all java side crash to a specific directory.
      The crash report can report the interior app's crash log.
    • obtainAllCrashLogs

      public static File[] obtainAllCrashLogs()
      Get all recorded crash logs, the return value should not be null.
      Will only return no more than 10 crash log files.
      You can submit these log files to us and remind us to analyse the crash reason.
      Returns:
      crash log files
    • clearAllCrashLogFiles

      public static void clearAllCrashLogFiles()
      Clear all crash log files.