eclipsesource / eclipsesource/J2V8

Use Case - connect with a TS library and call its method in Java Android app

Open
#595 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
2.6k
Forks
387
PR merge metrics
No merged PRs in 30d

Description

Hello,

I have created a sample Android app using J2V8. I have read a js file inside my code and called JS methods from it. This worked well.

Now, I have a compiled TS library (having js files) and I want to import this in my Android app and use that complete library in my android app.

Is it possible? Will I need to copy every js file first and then call methods from it?

` v8.executeScript(readFileAsString("sampleModule.js"));
Object result1 = v8.executeJSFunction("greet", "Gourav");
Log.d("Gourav", result1.toString());`

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.