WebRTC native java/ android - java

I am able to build the libjingle library and also build the AppRTCDemo App on Android. I am able to connect to peers and share audio and video successfully. Now I want to extend it to send data (say Text "HelloWorld"). I want to integrate DataChannel into it so that I can also send data through it.
I have few questions:
Is it possible to use DataChannel with native webrtc? I mean what I am trying to do is it supported ?
Is there any sample application or example that could solve this problem for me ?
Looking forwards for you support!

Yes it is supported. For more info about the exact interfaces take a look at
<libjingle-src>/talk/app/webrtc/java/src/org/webrtc/PeerConnection.java
<libjingle-src>/talk/app/webrtc/java/src/org/webrtc/DataChannel.java
As far as I know there isn't any examples

Related

Futronic fingerprint reader FS80H, 2 readers in the same PC, how can i differentiate them

I have Java application using Futronic FS80H.
Working successfully with one device.
But now i have 2 of them plugged in the same PC.
I want one to enroll, and the other must only read.
But i can't find a way to diferentiate them.
I'm using the SDK Worked Example for Windows, available at https://www.futronic-tech.com/download.php, and building my software upon that.
Can someone help me?
I got in touch with tech support via the email inquiry#futronic-tech.com.
Team futronic were very kind and supportive and helped me to accomplish the taks.
There's everything available in their dll api, and they sent me access to their ftp with Java code example to handle multiple FS80 readers plugged in the same PC.
I would like to thank team Futronic.

External RFID reader on Android with JMRTD

Context
I have a Minix x88i Android computer (not relevant, but it's without internal NFC tech), connected to an external RFID reader (the ACR1252u from ACS). ACS provides an API for Android so I can communicate with my reader through my application. That works.
Goal
My goal is to be able to read ISO 14443 Type A cards ((Dutch) ID-cards and passports (aka ePassports)), and get the result in my application. The key to access these tags is the MRZ (Machine Readable Zone) visible on the ePassports, which can be hard-coded for now.
Problem
I'm a bit stuck on what my next step should be. I found the JMRTD API to help me access the ePassports, but I don't know how to use it after importing it in my application (mostly because I don't have a 'Tag' or 'Card' object or something). Applications I found using this either make use of importing javax.smartcardio.* or android.nfc.*, which both won't work in my Android application for a device without internal NFC.
Do I need to use JMRTD? No, if there are other libraries which do the same that I don't know about, please let me know!
You could help me by guiding me in the right direction on how to use JMRTD (or something else) for an Android application on a device without internal NFC, in combination with the ACR reader. A popular reader from them is the ACR122, if you have experience with that the chance is high that it will also apply for my reader! Or maybe you know of a project that does the same, so I can use that as a code example.
If I need to provide more information, please let me know. Thanks in advance!
Solved by extending the CardService class from SCUBA (dependecy from JMRTD) in my own class. Next I could create a PassportService from JMRTD, open it, select the application, perform authentication and read the data.

Sending and Receivng SMS with Java COMM API

I stumbled upon this guide on how to use it, but being the beginner that I am, it confused me on how to use it until I saw the answer in this guide.
However, I noticed that one of the five files is already named SMSClient and the step two in the second guide duplicates that file so I skipped it and headed for step three which was confusing since I got an error in this line:
SMSClient smsc = SMSClient(0);
I placed all the five java files plus the SendSMS.java file in the (default package) package of the src package, however Eclipse could not seem to find the SMSClient.java file.
Sorry if this is a very basic question, I've yet to have any lessons with Java at all and I'm feeling my way through these. Any help will be very much appreciated, may it be clarifications regarding the codes above or a better alternative to sending/receiving text messages. Thank you.
I advice you to use one of these alternative because they are supported and used by many developers:
A better alternative for SMS Send/Receive is Logica Open SMPP from HERE.. It's an open source API based on JAVA providing you with all you need in SMS technology. The website also has an SMC Simulator for testing which is very helpful..
Another alternative is Kannel: Open Source WAP and SMS Gateway from Here it's an open source API based on Linux which you can easily configure and you can use web services to send and receive SMS or SQLBox to send and receive through DB Transactions.. I personally use Kannel
Check the Documentation of Kannel from Here

Is it possible to record audio from client to server in PHP- or JAVA-based online web application?

I am building an online web application which offers clients to test their language skills.
The application consists of series of different test the clients can freely do. One of these tests is one where the client sees a sentence on the web-page and then is required to speak the sentence to a microphone. The idea would be to record the audio stream, send it to server and save it there to a file.
Is this possible using PHP, Java, or something similar to them?
Thank you for any help :)
I know you asked for PHP, I'm guessing that's your language of choice, but have you considered using html5 to record your audio? Note: browser support is still lacking but it might be worth looking into depending on your requirements.
Check out this tutorial; it uses the GETUSERMEDIA API to access you camera and microphone hardware.
Update: Here is another good tutorial on the subject.
The only realistic solutions for solving the problem are with flash, as suggested by another answer, or a java applet. In a year or two that will hopefully change and you'll be able to use javascript and HTML5, but this is now.
I would say this is a problem better and more easily solved with flash, but for java, You need to write a java applet to do the recording. Here are some hints to get you started:
http://docs.oracle.com/javase/tutorial/deployment/applet/
http://www.java2s.com/Tutorial/Java/0120__Development/CapturingAudiowithJavaSoundAPI.htm
http://www.jsresources.org/
You do not need java speech API or JMF, just java sound. You might WANT JMF to compress the audio file to make uploading go faster, but you can get this working without. Note that you may need to "sign" your applet in order to record audio in a browser.
If you are averse to flash, you could also use haxe to write your flash code.
Not 100% what you're looking for but I think it'll at least give you some ideas.
How to record streaming audio to the server
It is possible to solve this problem using Flash and Java both. You can use Flash component to record sound and send it in chunks to server side which can be implemented using java.
Pros to create sound recorder in Flash are many.
Flash is widely installed plugin in Browser
Java Applet gives warning before running it which many times turns off users.
Numerically checked, most media applications are created using Flash thereby providing you nice support.
Java Applets are used where thick client has to fit into browser and must also be secure. You will still find many real time treading applications are written in java applets.
Here are couple of tutorials to create Sound Recorder in Flash
http://active.tutsplus.com/tutorials/actionscript/create-a-useful-audio-recorder-app-in-actionscript-3/
Adobe record sound and save
This collected stream of sound can be stored in chunks on client side and can be synced with backend server(any server side language shall be fine.).
Implementing your server in Java has advantage. If tomorrow need arises, you can stream the same sound using Red5 server which is implemented in Java.
See more here: http://www.red5.org/
There is an audio recording SDK for this which is written in PHP, Flash and HTML5. http://recordmp3online.com
I am actually the author of that SDK (full disclosure)

How to setup Connectivity between the web component and java app

I am confused about the approach for application that am writing. I have developed the application jar and will be distributing via java webstart.
Now i need to putup a website supporting my app.
doubts i have
1)Can i pass this username and password to the jar that i will be launching?
2)Can the webcomponent calculate the time for which the app was launched.
Basically i need to understand how will the webcomponents and my java app interact with each other in terms of any data required to pass to the app and any info retreaving from the app and putting on the web.
Thanks
Krisp
I want to pass arguments like username to the JNLP and then want to pass it to the main class.
Is there any direct way to do so rather than use database?
since JNLP is just an xml file. I could not find a direct way to do so.
Can i anybody refer me some working code example.
Database is probably your best bet for sharing data between both apps. Other options are web services, sockets, RMI, etc.. You will probably need to look into all, on the surface initially, to know what suits you best.
As for the Calculation of the time in my java app i can use currentTimeMillis() to calculate the time for which my app is running.
But senarios like app getting crashed or forced termination of the app it will not get saved.
Any Hints for communication in terms of data between the web and Application jar?
Thanks
Krisp

Categories