Package net_62v.external
Class MetaCore
java.lang.Object
net_62v.external.MetaCore
Mundo core callback and process initializer
- Version:
- 1.0
- Author:
- [email protected]
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic InvocationHandleraddServiceInterpreter(String serviceName, String methodName, InvocationHandler handler) Add a service interpreter, you can interpret system service by this method.
e.g.static voidattachMetaBase(Context context) Can be called inside the attachBaseContext block.static voidClear all crash log files.static voidEnable 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.static ContextGet the application base context (of the host app)static File[]Get all recorded crash logs, the return value should not benull.
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.static voidregisterCoreCallback(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.static voidSet process callback, will schedule a callback when the mundo environment prepared and the internal application initialized.
-
Constructor Details
-
MetaCore
public MetaCore()
-
-
Method Details
-
getHostContext
Get the application base context (of the host app)- Returns:
- base context
-
attachMetaBase
Can be called inside the attachBaseContext block.MetaCore.attachMetaBase(base)- Parameters:
context- application base context- See Also:
-
registerCoreCallback
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
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 namemethodName- Method name of the service you selected like getCurrentLocationhandler- 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
Get all recorded crash logs, the return value should not benull.
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.
-