Android System Webview - java

I am looking into the AOSP source code to see how WebViews are implemented. As far as I know, with Android 6, WebView is now a separate application of its own (called Android System Webview). However, in the external/chromium-webview folder I only have the apk files.
I found frameworks/base/core/java/webkit/WebView.java, which seems to be the WebView implementation, but I don't quite understand if this is the real implementation or just a stub. Is it this one, or the source code on chromium website that actually is the Android System WebView?
Also, how is it that an Android app can use the Android System Webview app to create a Webview in itself? How are they connected?
Finally, in the folder where I have webview.apk, readme mentions libwebviewchromium.so. What is that?
Thanks very much in advance.

I guess chromium is a separate project. They are building the apk and putting it in AOSP.
You should refer here-https://www.chromium.org/developers/how-tos/build-instructions-android-webview
I ASSUME Web view is just a view...all the logic, parsing of html and other stuff is there in separate app...webview just binds to other app for all the logic...

Related

How to create a loopback camera through Android HAL?

1\ Regarding to Android Source Project hosted by source.android.com, Android supports multi-camera functionality. Also we have some information about how a camera driver really works in Android.
2\ As you know there is an old project called v4l2loopback that you can install and run on your Linux (it's simple if you have root access). For example you can also have fun with ffmpeg to stream a video as a dummy webcam device. (v4l2virtualdevice_android)
Qust\ What I'm really watching for is simple in logic and hard to develop. I want a solution that my Android application (that is provided as an APK) will be able to create a dummy camera and I can feed that from another source (not really important; maybe a video file). So user will be able to use original camera app, Instagram app (Live), etc ... to record the video.
I don't really know if it's necessary for device to be root or not. And if it's possible how can it be done using java or NDK?
You can do that if you replace the system camera HAL. It's quite possible if you build a custom ROM. Having root access on a known device is essentially same as having your custom ROM. But this doesn't help if your APK is installed (with root access) on a different device, even if the changes are minimal. Sure you can prepare logic that will work on many devices, but each will require separate consideration and testing.

Emulate Android in Swing

I want to be able to run my Android code/app on Windows/Mac/Linux/etc. but not use an emulator, as they are slow/cumbersome.
I want a real Java SE app, but to reuse my Android code.
My idea is to make an Android emulator using Swing, read the layout files and create the widgets in Swing and map between the 2 UI event models, life cycle, and library classes.
Question is, does such a thing exist already, I googled it, but could not find anything.
Otherwise I will start an open source project for it myself. Anyone interested in helping is more than welcome.
So I created an open source project "Swingdroid" that lets you run Android apps and Java swing desktop applications.
You don't need to use an emulator or change any code. It loads Android layout files and activities and renders them using Swing.
On GitHub here,
https://github.com/BotLibre/BotLibre/tree/master/swingdroid
I totally agree with #muratgu. But, if you just want to parse Android layouts (views) xml files and render them using Java Swing, this is possible and this has already been implemented, before deciding to make your own implementation, you'd better check the wysiwyg feature of UI editor in Android Studio.

Combining android and gwt?

I'd like to develop a hybrid app using mgwt-phonegap.
I found this link :
What I don't get is: Why is he putting the gwt-code into the android project's folder? Isn't it unecessary to use Android at all when you use mgwt and phonegap? I thought, that was the whole idea behind it?
What do you get from creating an android project and then putting your gwt code inside it?
Can you use gwt to convert a standard android app into a hybrid app for different platforms?
I did not read the tutorial you mention, but with phonegap you can create a native shell, which is basically a WebView with some hooks to call native stuff, In this shell you place your HTML/Javascript which in your case is the compiled code of a mgwt project. The android project you create it with phonegap, their site has a tutorial, I think you should read more about phonegap.

Android gui design tools or framework like bootstrap

I am a web developer, recently i have developed a android app using cordova.
But my application is slow, so i deside to developed the same app using andoid no native code. But the challenge is making same gui. i am new in android.
So my question is that what tools i use for gui design, and is there any framework like bootstrap? thanks in advance.
Maybe this might help: http://www.androidbootstrap.com/
Github link: https://github.com/AndroidBootstrap/android-bootstrap
Android app is also a browser app designed in xml, what kind of app you want to build if its an offline app you have design in xml but if it's online app (ex: playstore) you can use WebView it gives you a browser(with your webpage address hard coded in it) within an app and there you can open your mobile website.
Just like other apps do flipcart, jstdial, amazon etc.
Tools: Android Studio is best but for Start download Eclipse Atd bundle its comparatively light later you can switch to Android Studio.
Unfortunately there is no
and
www.androidbootstrap.com/
You have to do all your design in xml resource, where you can use tags like - style, selector, layer-list, item, shape etc. And these resources have to be controlled dynamically using java (in activity).
In Developers documentation of android (provided by Google) you will find details Style elements

Can I make an HTML5 game for Android?

Ok to be more specific... can I program an android app in Java that has something like a web view to which I can point to local files on the phone?
I'm thinking about making an android game and i'm wondering if it can be done with a little HTML5 and Javascript that is locally stored on the phone. I heard something about a web view in Java and that is why I am wondering if it could work.
Is this even possible?
As the other answers might be correct, there is a much simpler way:
If you know html5 programming, you can do a simple Android app that has one Activity containing one WebView. In that webview you load your index.html and there you go. You can basically do anything you would do on a normal web app.
PhoneGap and Appcelerator are for cross platform development and they provide access to the hardware (vibration, sensors etc) and they give you the possibility to build the native UI with html and javascript. For a pure WebApp they are not the correct frameworks/tools I think. I might be mistaken, but a WebGL Benchmark I wrote for PCs worked out of the box in the android browser and I justed used html5 and JavaScript.
Your answer is yes, your solution is phoneGap
http://phonegap.com/
yes definitely,
check out appcelerator.com, phonegap.com etc
u can probably go to google "cross platform mobile development"
there's a few neat html javascript frameworks

Categories

Resources