I have been looking around for a guide on how to implement socket in android development but could not find any. I am currently recalling my API on activity created to ensure that data is updated for my app.
Can anyone assist with a guide to help achieve real time update with socket on android.
There is a powerful library called SOCKET.IO that you could use for this purpose. It supports multiple languages for both backend and client applications. Please check this link for more info and also here is an android example.
Related
Good evening,
i am trying to build an app that connects with an arduino uno with BLE. It is not the center of my project and i had to learn Android programming in a short amount of time. That is why i am mainly using the BluetoothLeGatt app as a reference. My question may seem obvious for some of you.
I've managed to connect to my device but i do not understand how to read/receive notifications.
I understand the link between the functions used : boradcastUpdate, onCharacteristicChanged, onCharacteristicRead... but do not understand how the process starts(e.g how to launch these functions). Am i supposed to call an action myself ? Is there a problem with my emiter ?
I find the documentation of Android unclear and have spent a few hours searching for solutions before coming here.
Thank you for your answers
The documentation about Bluetooth GATT is quite clear about how to setup a basic project and its basic elements. You shouldn't have any problems to read/write on any characteristics your Arduino announce just by adapting a sample project like this.
Basically all you need is work with BluetoothGatt class getting a specific BluetoothGattCharacteristic of a service, and write into it like this after you've done the scanning and connecting process to your Arduino BLE peripheral.
I want to create a java server application which receives data from an Android client and also transmit notification to client. Actually i did not know much about server apps. I am quite familiar with servlets and mysql, is there any tutorials based on these??
So any suggestion how to build it or any tutorials for it?? please help me!
What you are probably looking for is Google App Engine a SaaS by Google. While there are many alternatives this is probably the best route you can take for implementing a Java based backend. Follow these tutorials* and you'll be good to go. Keep in mind the GAE is a bit complicated and will take some time to get on your feet.
https://cloud.google.com/appengine/docs/java
More tutorials on GAE can be found by a nice google search!
Is there a java api that allows you to use Netstream and netconnection functions from adobe? I'm working on my android app and I am trying to add a video chat feature on the app. Since the rest of the app is already coded in java it doesn't seem like I can attach a swf file to one of the activities. So I'm looking for alternative solutions to to connect with a web based flash video chat website from the app.
There is the JUV RTMP tool which is Java API to access RTMP servers. It also support audio/video streaming but you will need to provide the codec code.
It is a paid product, but at least works fine. I could never find a good open source solution for this.
I need an android application to communicate with a java web server using sockets, but can't seem to find any information regarding this. I have only been able to find information about java to java and android to android.
When I first tried doing this, I used the basic knock example taken from Lesson: All About Sockets, most likely written before the android OS existed, and adapted the server side to run on an android. That way I didn't have to make an user interface and could just focus on the communication. The code is here: EchoClient, KnockKnockServer, and KnockKnockClient.
The problems I initially ran into included:
Making sure that both sides knew which port to use.
Making sure I had set the permissions on the Android side to use the internet.
Making sure the client knew the ip of the server.
I posted my version of this code here. It worked one year, and then I had to fiddle with it again when I used it for my class this year. My students got it working, though. You'll get a security flag when you go to the site, since I don't want to pay for an officially registered certificate, but that is a rant for another day :-)
Here is an example how to use sockets in Android. With web server you should do the same. If you want to work with http protocol here is another link.
How to implement internet radio using java?
Is there any Java APIs for this?
I want to make a internet radio using Android / java. But I am not getting any APIs how to connect or how to receive the channel information for streaming the audio.
Please help me how to create that same and provide some code/API for that.
Cidero is a Internet Radio server implemented in Java. This should get you started.
Update: The project seems to be down. I've found this github repo with a "cidero" project which seems to be the same but I'm not sure whether they are related: http://repo.or.cz/w/learning-java-upnp.git/tree/HEAD:/cidero
Stumbled on this question through the related-questions side bar... Noticed that the cidero link was out of date. I just suggested an answer on a similar thread for use of Android's MediaPlayer object; How to play online radio in android