ASP.NET SignalR is a new library for ASP.NET developers that makes it incredibly simple to add real-time web functionality to your applications. What is "real-time web" functionality? It's the ability to have your server-side code push content to the connected clients as it happens, in real-time.
Pushing data from the server to the client (not just browser clients) has always been a tough problem. SignalR makes it dead easy and handles all the heavy lifting for you.
This library can be used from both regular Java or Android applications.
maven:
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
Step 2. Add the dependency
<dependency>
<groupId>com.github.mreram</groupId>
<artifactId>java-client</artifactId>
<version>1.0.4</version>
</dependency>
gradle:
Add it in your root build.gradle at the end of repositories:
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
Step 2. Add the dependency
compile 'com.github.mreram:java-client:1.0.4'
See the documentation
See the contribution guidelines
git clone git@github.com:SignalR/java-client.git (or https if you use https)
Open Android Studio, click "Import Non-Android Studio Project" and select the cloned directory
Build the project.
The signalr-client-sdk.jar will be generated inside the /signalr-client-sdk/build/libs folder
The signalr-client-sdk-android.aar will be generated inside the /signalr-client-sdk-android/build/outputs/aar folder
Run the signalr-client-tests project as a JUnit test.
Add the signalr-client-sdk.jar and gson library gradle dependencyto the project.
Add the signalr-client-sdk.jar, signalr-client-sdk-android.jar gson library as a gradle dependency to the project.
In the code, before using the library, initialize the platform to use android-specific libraries and compatibility with older Android versions: - Platform.loadPlatformComponent(new AndroidPlatformComponent());