Webrtc in Android webview - android

We have developed webapplication on Webbased Video / audio communication, in the backend, it uses webrtc + html5,
Now we are trying to make it native, and approach is
-- Developed a WebView,
-- Launch an URL in the webview, so it will be more of native app . just a embededding webview as a shell inside the native app,
-- Now My question if i am able to launch Video Communicator successfully inside Browser then in the same device, should it launch in the Native application ( which is using WebView as a shell)

Well you could go native/hybrid, on Android for example, you could use Crosswalk/Angular/Ionic, I've tested a video chat app prototype with this method and it worked pretty well.
Crosswalk runs Google's Blink engine over Androids WebView, this is awesome for older android versions and phones that aren't super new because.
1. Gives the latest HTML features including WebRTC to about 85% of all android phones.
2. Performance is great, it's hard to tell between hybrid or native, the Crosswalk/Angular/Ionic stack is very smooth.
I've seen a couple iOS hybrid solutions as well out there, just haven't got around to trying it yet.

Just responded to a similar question on Stack Overflow:: Android WebView does not support WebRTC APIs at this point. Work is underway on Java an Objective-C bindings, though that may not be what you need.

Related

Using Chrome component as WebView app container

I have issue: in standard browser on some Android 4.2-4.4 devices my html page in some reasons (which I don't understand yet) looks broken as like as part of css just lost. But in Chrome app they are always looks good. So is there option to use Chrome app as main container for my webview application?
So is there option to use Chrome app as main container for my webview application?
WebView is using Chromium on Android 4.4+.
You cannot embed Chrome in your app, other than to the extent that WebView does.
IIRC, there are third-party libraries for embedding alternative Web rendering engines in an app. I seem to recall there being a standalone Chromium build, and Mozilla was working on allowing Gecko to be used as a library. I have not checked on the status of these in quite some time. You would also then be responsible for security updates for those Web rendering engines, and the libraries may substantially increase the size of your app.

Ttitanium webview and HTML5 application cache

I am using Titanium to create a application for Android. The app uses webview to load external HTML5 webpages. The webpage uses a manifest to cache the page and some assets. This works fine on desktop browsers and third party app browsers in Android (Chrome).
When I view the page in a webview in the Titanium build app, it seems that the manifest is not used, the page just loads everything from the server. The same problem occurs when I use the build in browser of my phone (HTC one X).
What I am trying to accomplish is that the pages are offline available, so that internet is not required tot view cached pages. Is there a fix for this problem, or should I go look in another direction to solve my problem?
the manifest file:
CACHE MANIFEST
# version 1
leerlingen.html
jquery.js
style.css
handler.js
NETWORK:
*
First: Titanium provides much more than a WebView. If you planned to display only web pages you maybe should have a look at PhoneGap / Cordova which might fit your needs in a better way.
As you've noticed not all browsers support HTML5 Caching feature as expected. I can't say if it doesn't work for Android in general or only for your specific version because WebKit usually does support it but it depends of the used WebKit version. And this could be different.
EDIT: It seems that (in native android) this feature can be enabled as written here: Application cache in HTML5 doesn't work in Android PhoneGap application. This is currently not possible in Titanium (there might be inofficial tweaks i don't know but from http://docs.appcelerator.com this is not possible).
Personally i'd prefer another solution. Cache data by myself and display it if there is no network connection. But this depends on what you try to achieve. Having few content which doesn't change often this would make sense. Having dynamically changing data (like twitter stream for instance) this would be difficult. Also it depends on your users and where they want to access your app.
And there is an open question: When you want to use all the caching features why do you want to create an app? Creating a simple mobile webpage would do the same job. When creating an app i wouldn't use the Caching Features of HTML 5. You should keep all the static resources in your app and simply load data from the network. This can be achieved by both Titanium and PhoneGap / Cordova. Titanium is more useful for a native UI and some native Features while PhoneGap / Cordova would be more appropriate for HTML5 based layout.
Just in case someone else is running in the same problems that i was facing, here is what i've done. HTML5's application cache does not seem to work in the build-in browser of Android and with that the webviews. In Titanium there seems to be no way to control the webview as to enable the application cache.
The work around for me was to use Titanium and it's httpClient function (Titanium.Network.HTTPClient) to request the files (HTML, CSS, javascript) and store it in the local app filesystem (Titanium.Filesystem).

How to achieve pagination in Android using jQuery mobile

I have seen some demos about the jQuery wizard plugin on websites. But all of these are based on the web, and run in the browser.
I want to use this function in my Android application, does anyone has experience with that?
Check out PhoneGap to convert a web app to an Android native app. See also some of our demos, videos and tutorials. Many of them demonstrate native Android apps built with jQuery Mobile.

Convert Mobile Web into Native Apllication Using WebView/phoneGap

I am gonna develop a mobile application for multiple devices, say iPhone, iPad and Android Devices like Samsung Galaxy, Samsung Tab and Samsung Galaxy Nexus,
The application is about listing set of information from webservice to list in the application, So I decided to go for Mobile Web app using jquery mobile,
I want to publish the app in Appstore and Android Market, So I want to wrap the Mobile web in to a Native app, I thought an idea of implementing it in a UIWebView in iOS and WebView in Android,
Another option I found out is phoneGap,which provide an SDk to wrap an Web app into a Native iOS or Android App.
Can you people suggest me , Is it better to go with WebView in your native application, or is it really required to use phoneGap, Whether apple will approve my Application if I am using Mobile Web app in a UIWebView, Kindly Suggest.
Note: In my application there is no real need of Using any native functionality of iOS like, Camera, Contacts etc, I just wanna have a list with information fetched from the Webservice.
If you don't need any of the native features phonegap/callback gives you, do not use it. It's a bloated project that will probably add a ton of features you don't need, if you only need a wrapped web application.
Just use a regular webview, enable JS, caching etc and load your HTML into it.
Use phonegap. http://phonegap.com/
If u use it you can use the phonegap build service to generate apps for all platforms via it. you will only have to worry about the js, html part of the app, like you said.
Or if you dont want to use the phonegap build, still creating your own apps with phonegap is way easier as you dont have to write ANY native code.
There were some issues in Phonegap before because of which Apple was rejecting Phonegap apps previously. Thats fixed now, so thats no problem. :)

How do I use webview to embed the web app in a native Android App?

I have a fully-working web app that is accessible using Android's browser.
The annoying part is the url bar uses a lot of the screen. Is there a way to make this web app a native Android app? I've read that webview can be used to embed a web site within the Android App.
Unfortunately, I only know web programming languages and have no Java experience. Will I still be able to do this on my own?
You certainly will need some learning in java, you can start with reading the following :
Webview documentation
A very detailled tutorial (quite hard if you haven't any java basics)
A basic tutorial on webview usage.
Have you looked at phonegap. It comes with a standalone app with a WebView embedded in it and with native android functionality support. You just need to provide your html/javascript app to it and you're done.
You can use a web app called MIT App Inventor
and get it done in less than 10 minutes, it's very easy, intuitive and requires no programming skills at all.
all you need to do is create a new project,
drag and drop a WebViewer component, on the right set the home url,
and your done! just connect to an android phone via USB to install the app
and you can even download the .apk to your computer, sign it and publish it on Google Play

Categories

Resources