Skip to content
This repository was archived by the owner on Jun 13, 2024. It is now read-only.
This repository was archived by the owner on Jun 13, 2024. It is now read-only.

How to use javascript Uint8array as parameter of ace.Native.Invoke helper #76

@airomyas

Description

@airomyas

I'm using cordova file plugin to retrieve a jpg picture from sd card and I need to pass this picture to java side through Ace's native invoker.

Here is part of my code:

javascript side:
fileEntry.file(function (file) {
var reader = new FileReader();
reader.onloadend = function() {
console.log("Successful file read: " + this.result);
var className = ace.valueOn({ android: "videotest.VideoTest"});
ace.NativeObject.invoke(className, "startFull360View", new Uint8Array(this.result), size, index, function(result){});

java side:
public static int startFull360View(byte[] img, int len, int index)
{
LOG.e("Full360View", "size is " + len);
...

When I do this there is no error message appear on the logcat but it doesn't work, Anyone could help?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions