Package net_62v.external
Class MetaCore
java.lang.Object
net_62v.external.MetaCore
Mundo core callback and process initializer
- Version:
- 1.0
- Author:
- king@62v.net
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic InvocationHandler
addServiceInterpreter
(String serviceName, String methodName, InvocationHandler handler) Add a service interpreter, you can interpret system service by this method.
e.g.static void
attachMetaBase
(Context context) Can be called inside the attachBaseContext block.static Context
Get the application base context (of the host app)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 initialize.static void
Set process callback, will 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 initialize.- Parameters:
callback
- will receive a callback after the init progress done.
-
setProcessLifecycleCallback
Set process callback, will 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:
-