0

I am trying to implement GalleryPicker in one of my project like this:

let activity = app.android.foregroundActivity || app.android.startActivity;
let i = android.content.Intent(activity, com.picker.gallery.view.PickerActivity.class)
i.putExtra("IMAGES_LIMIT", 4)
i.putExtra("VIDEOS_LIMIT", 1)
i.putExtra("REQUEST_RESULT_CODE", 101)
app.android.foregroundActivity.startActivityForResult(i, 101);

But I am getting this error:

ERROR Error: Trying to link invalid 'this' to a Java object
JS: ERROR CONTEXT {
JS:   "view": {
JS:     "def": {
JS:       "nodeFlags": 33603585,
JS:       "rootNodeFlags": 33554433,
JS:       "nodeMatchedQueries": 0,
JS:       "flags": 0,
JS:       "nodes": [
JS:         {
JS:           "nodeIndex": 0,
JS:           "parent": null,
JS:           "renderParent": null,
JS:           "bindingIndex": 0,
JS:           "outputIndex": 0,
JS:           "checkIndex": 0,

In where I am doing mistake? Thanks in advance

1 Answer 1

1

Looks like you're not creating a new Intent instance, might be your problem.

So...

new android.content.Intent(...
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.