Skip to content

Releases: alkathirikhalid/connection

Added Call Support

26 Nov 19:32
50908f4
Compare
Choose a tag to compare

Makes asynchronous / non blocking http request with easy in a single line. To make a call simply do 2 things out of the box (using AAR File, for JAR file internet permission declaration is required):

Call.execute(taskId,task,method,url,contentTypeRequest,contentTypeResponse,requestBody)


And make your Class / Activity / Fragment / Model / Repository whatever architecture you have implements Task where

onTaskCompleted(int task, int httpCode, Object result) returns the response


Thats it, 2 steps. It is also possible to make synchronous / blocking http request by simply cascaded the calls on Task completed for the consecutive calls.

Optimised to support java 11 and gradle 7

20 Nov 03:59
Compare
Choose a tag to compare
  1. Optimised to support java 11 by declaration
  2. Optimised to support gradle 7 by fixing known issue with jitpack jitpack/jitpack.io#4772
  3. Optimised released by following semantic release convention https://semver.org/
  4. Optimised AAR file size to 17 KB

To use the library directly simple copy connection.aar file into your lib folder and add below into your project / module (Not application):
implementation fileTree(dir: "libs", include: ["*.aar"])
Then sync gradle

To use the library via dependency declaration simply declare below into your project / module (Not application):
implementation 'com.github.alkathirikhalid:connection:v2.0.0'
Then declare below in settings.gradle
maven { url 'https://jitpack.io' }

The library will handle permission, initialisation and de-initialisation processes automatically

Upgraded to Support up to Android API 31

19 Nov 09:41
Compare
Choose a tag to compare

Connection v1.05 support Android API 16 up to the latest Android API 31

  • Upgraded build gradle from 3.5.3 to 3.5.4
  • Replaced deprecated jcenter with mavenCentral repo
  • Clean up reduce size from about 50 KB to 20 KB

You may add it in your project either:

  • implementation 'com.github.alkathirikhalid:connection:v1.05'

or add connection.aar file in lib folder

  • implementation fileTree(dir: "libs", include: ["*.aar"])

Known problems with Gradle 7 error

A problem occurred evaluating root project 'Your App'.

Build was configured to prefer settings repositories over project repositories but repository 'Google' was added by build file 'build.gradle'

Fix, in settings.gradle add add jitpack repo

dependencyResolutionManagement { repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) repositories { google() mavenCentral() maven { url 'https://jitpack.io' } jcenter() // Warning: this repository is going to shut down soon } } rootProject.name = "The Test" include ':app'

Connection utility.

16 Dec 13:39
Compare
Choose a tag to compare

Upgrade to Androidx, API 29, Google Maven and Gradle 3.5

Real Time Connection Updates

18 Sep 15:25
Compare
Choose a tag to compare

Connection utility.

New enhanced features added to Connection Utility to provide real time connection updates.

You can now have a ConnectionActivity in place of Activity or ConnectionAppCompactActivity in place of AppCompactActivity to have connectivity updates in real time.

The utility will handle the system broadcast and permissions.

Connection

19 Feb 07:51
Compare
Choose a tag to compare

Connection utility.

Monitor network connections like Wi-Fi, GPRS, UMTS, etc for API 16 and above, this class attempt to fail over to another network when connectivity to a network is lost by checking isConnectedOrConnecting, it provides a way that allows applications to query the coarse-grained or fine-grained state of the available networks by checking isTypeMobile or isTypeWifi. It also provides a way that allows applications to request and check networks for their fast data traffic by checking isConnectedConnectionFast or isConnectedConnectionSlow.

It is safer to check isConnectedConnectionSlow first or only rather than isConnectedConnectionFast first or combined, to allow forward compatibility in the event faster mobile connection are introduce in the future that are above 20 plus Mbps.

The class should be used as Connection.isConnectedConnectionSlow(context);.