MCPcopy Create free account
hub / github.com/NativeScript/android / GetJavaStringArray

Method GetJavaStringArray

test-app/runtime/src/main/cpp/CallbackHandlers.cpp:980–990  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

978}
979
980jobjectArray CallbackHandlers::GetJavaStringArray(JEnv &env, int length) {
981 if (length > CallbackHandlers::MAX_JAVA_STRING_ARRAY_LENGTH) {
982 stringstream ss;
983 ss << "You are trying to override more methods than the limit of "
984 << CallbackHandlers::MAX_JAVA_STRING_ARRAY_LENGTH;
985 throw NativeScriptException(ss.str());
986 }
987
988 JniLocalRef tmpArr(env.NewObjectArray(length, JAVA_LANG_STRING, nullptr));
989 return (jobjectArray) env.NewGlobalRef(tmpArr);
990}
991
992void CallbackHandlers::NewThreadCallback(const v8::FunctionCallbackInfo<v8::Value> &args) {
993 try {

Callers

nothing calls this directly

Calls 3

NewObjectArrayMethod · 0.80
NewGlobalRefMethod · 0.80

Tested by

no test coverage detected