A few questions about webRTC on android - android

I have a few questions about webRTC on android. I can say I'm new about android and webRTC but I can also say I made tooo much research about webRTC on android. But still have a few questions. (some of them because of I'm new, and some of them because of I'm okey but not fully)
I'm trying to make an android app which is going to communicate between web browser (first choice is chrome) and android device directly (p2p we can say). So I made too much research and I found webRTC is good for me. Do you advise me something other or is it okey you think? (also I am going to code a plugin for chrome).
Nearly every document says 'android is not directly support webRTC'. So I need something to provide me webRTC on android. What it is? Is it native android that I have to code? Is it native (NDK) library that I have to include my project? Or is it a java lib? Or should I go for cordova/crosswalk or sth like that? I researched all but didn't find something can help me. Yeah there are documents about it but not enough..
Some of documents says, I need chromium. But why and how? They show me lots of linux terminal commands and even there is no a line java or C or C++ code. Even some terminal commands and links that they give is not working.
I read/found/tried these things as a result of my research:
Apache cordova
Crosswalk
http://www.webrtc.org/
https://github.com/webrtc
http://webrtc.github.io/samples/
http://simonguest.com/2013/08/06/bui...t-for-android/
http://orcaman.blogspot.com.tr/2014/...tc-source.html
https://github.com/pchab/ProjectRTC
https://github.com/pchab/AndroidRTC
and something more..
in a nutshell I need help. Please give me your hand. Thank you. (because I'm really very helpless and tried to do my best)
Thank you.

As others have suggested, I recommend checking out g.co/webrtc. As I understand it, your goal is to make Android connect to a web browser using WebRTC. There are two (three) ways you can achieve that.
You can just use Chrome, Opera or Firefox for Android. All these browsers support WebRTC, and it allows you to use the same code for your web app, as for your Android app. With the new Add to homescreen support, as well as support for push notifications from web apps on Android, this could be a very good solution for you.
You can use the Android native WebRTC library, available from WebRTC.org. As mentioned in my article, I recommend using the pristine.io compiled library, available from MavenCentral.
If you can limit your application to Lollipop, you can use WebView, which support WebRTC now iirc. I don't know much about it though.
And the best resource for getting help is discuss-webrtc. It's a lot more active than StackOverflow.

Related

Portable Mobile/Tablet application proof of concept

I need to develop a portable application mainly for Windows 8.1 and iPad, but could be expanded for Android, WP and iOS later.
The application consists of calling web services to display data in grids and it contains CRUD operation, and it may save some local data for offline mode then synchronizes later when connectivity is up.
I'm torn between too many solutions, I need your advise for better solution.
1- Solution 1: Go Native for each OS (VS for Windows 8.1 [RT and pro] and xCode for iPad): this solution requires code duplication, logic and UI.
2- HTML5 with WebView app: I think this is a weak solution especially that we have local storage, checking for connectivity and calling ws ...
3- Using Xamarin: I think Xamarin does not support WinRT or Windows 8.1 to share logic code between iPad and Windows 8.1
4- Using Xamarin.Forms: Building the UI is tough and also it does not support Windows 8.1.
From your perspective, what is the best solution? please advices if you have any other proof of concept.
Many Thanks.
Most of the html/hibrid frameworks like Cordova (cordova.apache.org), Ionic (http://ionicframework.com/), etc, uses a native WebView on Android. Until Kitkat the performance of WebView is not production-ready and if you've a list with a lot of elements, the scroll experience is really bad.
If you want to do a simple proof of concept, prototype or whatever, I think that html frameworks are a good alternative. But if you are going to put your bussiness on top of one of this framworks, I would not recommend.
There is an alternative to embed a Chrome using Cordova & crosswalk (https://crosswalk-project.org/documentation/cordova.html) but you will end with an APK ~40Mb for a simple hello world.
Just my 2 cents. I don't see a point in using libraries that are unsupported across the platforms you plan to release and support on. Personally, I'd code natively for each platform. While this takes a lot of work, if you have to ask for direction on which path you want to take your application, then this type of project sounds more like a "you reap what you sow" application. Also, you'll be able to directly support each problem without having to wait for patches, but there are 2 sides to that coin as well. Your opportunity cost is missing future features the library will provide, if it's worth it to you.
If you aim at quality, going native is the only way... You can reduce the amount of work like Google is doing: writing the business logic and unit tests in Java, then converting it to ObjC with J2ObjC and to Javascript with GWT.
In your case, being that Java is a dumbed-down version of C#, you can easily find tools to convert to the latter, finding yourself with native business logic for every platform! That should account for 50%-70% of the codebase...
I think going with HTML5 with webapp view is better option.
Using Cordova (Phonegap) most of the native features are easily achievable in HTML webapp.
PhoneGap Platform Guide
Alot of other plugins are available for the advances features like BLE, NFC.
Calling webservice is really not an issue in HTML5.
Simple ajax is enough, however now a days many advanced frameworks are available which makes your work easy. One of the best among them is Angular JS(maintained by Google ).
Angular JS
For database you can access native database of the target OS or SQLite db of the mobile device.
You can check this link
Storage options
So developing a webapp can be a more efficient solution in your case. It can be best way for you as per my view point. However, you can do some R & D and can find the appropriate for you.

Android app development on PowerBuilder

Anyone know if its possible to develop android apps with PowerBuilder.
Haven't found much regarding this on Google, which might mean that it isn't, but still want to hear the opinion of ppl at stackoverflow.
thanks in advance
right now I think the only possibility is Appeon Mobile for PowerBuilder. This is a beta version and it is supporting iOS right now, but in several months it will be capable for building native android and Windows Phone app too.
http://www.appeon.com/list.do?fid-60-page-1.htm
I hardly waiting it also :)
Br. Gábor
One other possible solution I've considered but it is NOT a trivial solution. Look at IIS modules and handlers in the MSDN. Basically you can write a handler in PB.NET that will be used in IIS to create HTML5 that will run in just about any browser including mobile.
You then could assign a certain file type (e.g .powerbuilder ) which will be processed by your custom handler that was written in PB.NET.
Might be a good open source project.

Application android Hybrid

I have to develop an android application that use geolocation, and I am confused to choose between web framework mobile and native Android application, and if I must to choose a web frawework which one do you recommend to me?
Actually there are many kinds of framework : like JQuery mobile , Phonegap , titanium , Windev for mobilephones
Regarding the firs part of your question, I'd say this depends on a couple of factors:
1.) Previous experience: Do you already possess experience working with HTML/CSS + JQuery or do you possess experience working with Java? If your answer is yes to the first part: go for web framework development. If your answer is yes to the second part (Java): go for native app development, trust me, it's really easy to pick up if you have already worked with Java before and possess basic knowledge about inheritance and working with packages etc., also, start with the tutorials on developer.android.com If your answer is no to both parts of that question then I'd suggest you go with native app development since picking up Java is relatively easier compared to HTML/CSS+Javascript, in my opinion. If your answer is yes to both parts of the question (i.e you've worked with both Java and HTML/CSS+JS) then look at point 2.
2.) Personal Preference: Clearly, you don't have one right now so just go with what feels easier.
3.) For a geolocation app I'd say native app development is easier, I've been working on a geolocation based app for a while now and I felt that using the Google Maps API was pretty easy and you'll also find significant amounts of help from stackoverflow since everyone and their mothers have tried to make a geolocation-based app. I found the answers to most of my problems here on SO.
If you need more suggestions on this matter don't hesitate from asking!

Stylesheet for Android

We are making parts of our application in HTML5 in order to abstract out common functionality for Android and iPhone. When the user navigates to a WebView we want it to feel like we are still using native code.
For iOS we found iWebKit, it was easy to import and gave the web page that iPhone look and feel. But we found nothing good for Android.
I know the theme on certain Android devices could be different which complicates having a single stylesheet. But does anyone know of anything good? Btw, it does not have to be free.
Thanks.
Android webview performance is very poor.
I have been using jQuery Mobile Beta1 in android webview, now we decided to port back to native.
Native is still 300% faster and stable, where javacript <--> java interface is broken in Android 2.3+ gingerbread, communication between webview and context failure.
Ticket here: http://code.google.com/p/android/issues/detail?id=12987
I suggest to stick with Native :)
Have you looked at sencha? It might prove helpful.

How to write android code in titanium

I had been working on android since a little long. Now I am wondering about titanium. Is it possible to write android (java) code in titanium app since the app is build in titanium? If yes then how? Actually I am having problem dealing with push notification for android in titanium. So I got a solution to build complete app in titanium and then if possible use android code in app to deal with push notification. How? Please do response as quickly as possible. Thanks in advance.
To answer your question directly, you will need to develop a native Android extension to call Java code via JavaScript in a Titanium application.
Rai
You should be checking out the docs Here tells you all you need to know
Hope it helps
Frank
yes it is possible but remember that the titanium tools lag behind the official android ones. Documentation is poor and often wrong, code is laggy and the resulting .apk are much bigger.
Why are you thinking of using Titanium? For cross-compatibility?
If you are thinking about that you have multiple possible ways:
1) Build a minimum common denominator, like titanium, but better: Write a core application for both android and iPhone so that it will be fast and light on memory, with a modified broswer to show your content. This way the interfaces will be much easier and you'll have to write the content just once.
Still you will be able to access low level hardware, like GPS, compass, gyroscope.... easily without consuming too much battery (unlike with titanium) as needed.
2) Find an existing minimum common denominator: Javascript work both on iPhone and Android.
3) There are many other options (Adobe air, python, custom scripting, mobile web site, ...) but I think that the cons outweigh greatly the pros.

Categories

Resources