web view or other simple UI, how to display over OpenGL surface in native activity via jni 2.3+

1,229 views
Skip to first unread message

NoAngel

unread,
Jan 21, 2013, 2:56:12 AM1/21/13
to andro...@googlegroups.com
I need to display , for example , licenses for open source libraries in my game in webview. My game wrote using mostly c++ and some Java called via jni. I need display WebView in full screen foreground while get opengl animation on background(invisible, but not stopped). on win32, it can be easily made via child windows, on ios I can use views with viewcontroller, it was very easy too. But now I need to implement the same function for android. How can it be done best possible method(the most simple way)?

NoAngel

unread,
Jan 21, 2013, 2:58:09 AM1/21/13
to andro...@googlegroups.com
P.S. I need also a view to display some UI over opengl view, for example show textbox, editbox, popup message.

NoAngel

unread,
Jan 24, 2013, 5:27:38 AM1/24/13
to andro...@googlegroups.com
Uh oh.. it's just done also partially, for WebView.
Did it the same way, as for MediaPlayer - override native activity, call webview activity via jni from native. And using startActivityForResult to make it return URL user clicked. ez but(!) on other platforms I have showview(bool) to show/hide webview, and on Android, we have, wtf... nothing webview opens, stopping all my background processing, which is veeery bad for game. coz I need to do special things for and only for Android!
now imagine - u making a game, which uses webview, and every fucking request user see how it's closed and opens new webview to go next web scene... (((

NoAngel

unread,
Jan 24, 2013, 5:33:10 AM1/24/13
to andro...@googlegroups.com
p.s. thank god, it doesn't call onDestroy() for native activity when I display webview via startActivityForResult(on startActivity it does), but anyway - its unusable for my needs in current implementation.

Nigel Brown

unread,
Nov 7, 2013, 6:54:17 AM11/7/13
to andro...@googlegroups.com
Did you ever find a solution to use some Java UI over a native-activity OpenGL surface?

Cheers

Nigel

Philippe Simons

unread,
Nov 7, 2013, 10:24:02 AM11/7/13
to android-ndk


--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk...@googlegroups.com.

To post to this group, send email to andro...@googlegroups.com.
Visit this group at http://groups.google.com/group/android-ndk.

For more options, visit https://groups.google.com/groups/opt_out.

Philippe Simons

unread,
Nov 7, 2013, 10:26:44 AM11/7/13
to android-ndk
if you want to compose your NativeActivity Surface with other Views (TextView, Button, etc) with a layout... that is not possible by design.

use a standard Activty with JNI binding.
Reply all
Reply to author
Forward
0 new messages