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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alternative fix for Unity 5.6 that does not require the setZOrderOnTop fix. #212

Closed
wants to merge 1 commit into from
Closed

Conversation

nostek
Copy link
Contributor

@nostek nostek commented Jul 6, 2017

Creates a PopupWindow with 'layout' as child, instead of adding it to the activity.
This makes the Android version not require the setZOrderOnTop fix.

This is how Google Admob on Unity fixed it.
https://github.com/googleads/googleads-mobile-unity

Tested on Android 6.0.1

… the activity.

This makes the Android version not require the setZOrderOnTop fix.
@KojiNakamaru
Copy link
Member

Thank you very much. Unfortunately, the software keyboard seems not to be activated even if a text field is focused. Is it possible to solve this issue?

@nostek
Copy link
Contributor Author

nostek commented Jul 10, 2017

Ah, did not test for that.
I'll see if I can fix it when I'm back from holiday.

Apologies for not testing it thoroughly before making a pull request.

@antoniohof
Copy link

I just tested on the new Unity 2017 1.0 and the web view displays perfectly with the default unity android:name activity: com.unity3d.player.UnityPlayerActivity.

@KojiNakamaru
Copy link
Member

KojiNakamaru commented Jul 13, 2017

@antoniohof Thanks for the information. Though I haven't tried yet, Unity 5.6.1p4 also seems to fix the issue (and thus it might be reflected in 2017 1.0):

https://unity3d.com/unity/qa/patch-releases?version=5.6

(916119) - Android: Fixed a regression where Banner Ads are invisible, but still clickable.

I'll later add some note to README.md.

@nostek
Copy link
Contributor Author

nostek commented Aug 7, 2017

PopupWindow seems to not be working with keyboard input, so we can discard this.

@nostek nostek closed this Aug 7, 2017
@nostek nostek deleted the popupwindow branch August 7, 2017 14:33
@2df
Copy link

2df commented Jun 25, 2018

I have a question, when I open a webView in game,then I touch "home" and return game back, will game be waked up with webview(if I leave android:name activity: com.unity3d.player.UnityPlayerActivity in unity 5.6.5)?

@KojiNakamaru
Copy link
Member

The issue discussed here was only found in 5.6.0 and 5.6.1, so it should not affect 5.6.5. Therefore a web view should be shown up again when the game be waked up in the situation you describe.

@sky2005zx
Copy link

I use Unity 2017.4.11f1 and build sample project to Android device with release build, but the webview is
total blank, and if build with development build, it will show content correctly.

Is this a Bug? Or I did something wrong? Thanks.

@KojiNakamaru
Copy link
Member

I've confirmed the sample app built by Unity 2017.4.11f1 with release build works without any issue. You might install an incomplete apk as the first build for Android should have failed to adjust AndroidManifest.xml, as below:

image

@sky2005zx
Copy link

sky2005zx commented Sep 28, 2018

Thanks !! I Delete AndroidManifest and build again, and it work.

But there is another problem, my website has an autoplay html 5 video, it show in IOS, but in android, it is total black screen (But it show the play state and can heard the sound of video)

How to fix it ? Thx

(Sorry for my poor English)

@KojiNakamaru
Copy link
Member

Hmm, did you rebuild the app, as designated in the screenshot above? For video display, https://github.com/gree/unity-webview/tree/4cc849f6920547dd1f7946cc81aa5143b89354eb#hardwareaccelerated is normally required.

@boboshu
Copy link

boboshu commented Feb 21, 2019

same when playing h5 video it is black screen on android . ios is ok.but when set hardwareaccelerated true. android is ok. I tested Uniwebview3 addons, when the hardwareaccelerated is false android, it is not black screen. my unity version is unity2017.4.17f

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.

6 participants