You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
the onContentChangedByOuterProcess method defined at MMKVContentChangeNotification.java as an interface callback which return type is void
publicinterfaceMMKVContentChangeNotification {
// content change notification of other process// trigger by getXXX() or setXXX() or checkContentChangedByOuterProcess()voidonContentChangedByOuterProcess(StringmmapID);
}
but under native-bridge.cpp, the calling method is wrong
voidonContentChangedByOuterProcess(conststd::string&mmapID) {
auto currentEnv=getCurrentEnv();
if (currentEnv&&g_callbackOnContentChange) {
jstringstr=string2jstring(currentEnv, mmapID);
//CallStaticIntMethod isn't the original methodcurrentEnv->CallStaticIntMethod(g_cls, g_callbackOnContentChange, str);
}
}
this maybe make newers misunderstanding, we just need change that into below code,
voidonContentChangedByOuterProcess(conststd::string&mmapID) {
auto currentEnv=getCurrentEnv();
if (currentEnv&&g_callbackOnContentChange) {
jstringstr=string2jstring(currentEnv, mmapID);
currentEnv->CallStaticVoidMethod(g_cls, g_callbackOnContentChange, str);
}
}
The text was updated successfully, but these errors were encountered:
the
onContentChangedByOuterProcess
method defined atMMKVContentChangeNotification.java
as an interface callback which return type is voidbut under
native-bridge.cpp
, the calling method is wrongthis maybe make newers misunderstanding, we just need change that into below code,
The text was updated successfully, but these errors were encountered: