Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable barebones Xwalk compatibility #96

Closed
wants to merge 2 commits into from
Closed

Enable barebones Xwalk compatibility #96

wants to merge 2 commits into from

Conversation

dcousens
Copy link

@dcousens dcousens commented May 9, 2017

What shows:

  • Camera overlay

What doesn't show:

  • WebView overlay

This isn't ready to merge, as setAlpha(0.0f) completely destroys this packages original premise... but it is a start for maybe someone else to take over and or use as an "almost there" solution.

For me, it gives enough headroom (combined with an informational "toast") to inform them they can "tap-to-exit", and allow me to promptly migrate away from Crosswalk...

The WebView HTML overlay is actually there, and can be interacted with... it just isn't showing.

I don't know why - @bitjson if you can see why, please fix 馃拑

@dcousens dcousens mentioned this pull request May 9, 2017
}

vv.setBackgroundColor(Color.TRANSPARENT);
vv.setAlpha(0.0f);
Copy link
Author

@dcousens dcousens May 9, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

setBackgroundColor here does nothing [for me]; but I left it in to show what would be ideal.

Copy link
Author

@dcousens dcousens May 9, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nolanlawson any tips?
setAlpha allows us to see the camera view, but it is not ideal as we only want BackgroundColor transparency so we can interact with vv.

vv = (View) getView.invoke(webView);
} catch (Exception e) {
e.printStackTrace();
return;
Copy link
Author

@dcousens dcousens May 9, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Error should probably go back through the callback...

@dcousens
Copy link
Author

dcousens commented May 9, 2017

ping @gildebrand @dPary

@dcousens dcousens changed the title Enable barebones xwalk compatibility Enable barebones Xwalk compatibility May 9, 2017
@dcousens
Copy link
Author

dcousens commented May 9, 2017

8a43420 has been added purely for using this branch in a test deployment, it can be removed if this PR is progressed

@ghost
Copy link

ghost commented Aug 11, 2017

I'm not familiar with the cordova development. To be honest it stinks and sucks,
I was able to test on android latest emulator, and made the following changes:

I have removed this setBackground stuff. You don't need to tweak with setBackground stuff.
Anyway every suggested idea was not working.

It would be beneficial also, if there would be some standalone example which works in android studio.
To import this project to android studio is a nightmare. Sources here and there.

It's a partial solution, because i don't see any buttons on the screen. Just a full camera screen.

private void show(final CallbackContext callbackContext) {
        this.cordova.getActivity().runOnUiThread(new Runnable() {
            @Override
            public void run() {
                mBarcodeView.bringToFront();
                showing = true;
                getStatus(callbackContext);
            }
        });
    }
    private void hide(final CallbackContext callbackContext) {
        webView.getView().bringToFront();
        getStatus(callbackContext);
    }

@dcousens dcousens closed this Mar 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant