Skip to content

Releases: adroitandroid/Near

Kotlin Migration and new features

04 May 20:05
87b5cae
Compare
Choose a tag to compare

Kotlin Migration

Extremely helpful for Kotlin applications and almost no change for Java apps

Added ConnectivityOberver

Necessary because ConnectivityManager.CONNECTIVITY_ACTION is deprecated

Additional Features

Added the possibility to set the port for UDP and TCP, so you can find e.g. only devices that use the same port

Filters can be added to e.g. only find devices that contain a certain string

val nearDiscovery = NearDiscovery.Builder()
.setContext(this)
.setDiscoverableTimeoutMillis(DISCOVERABLE_TIMEOUT_MILLIS)
.setDiscoveryTimeoutMillis(DISCOVERY_TIMEOUT_MILLIS)
.setDiscoverablePingIntervalMillis(DISCOVERABLE_PING_INTERVAL_MILLIS)
.setDiscoveryListener(getNearDiscoveryListener(), Looper.getMainLooper())
.setPort(8989) // optional
.setFilter(Regex("filter")) // optional
.build()
nearDiscovery.makeDiscoverable("hostName", "filter" /* optional */)

This will listen on Port 8989 and will show only Hosts specified the filterText "filter"

  • If you set a Filter on nearDiscovery but not setting a filterText, the Host will not be found
  • The other way around neither
  • If you don't specify a filter and filterText then all Hosts will be found

Credits

This release is entirely thanks to @DatL4g

AndroidX migration

01 Oct 17:31
cf46992
Compare
Choose a tag to compare
  • updated gradle version
  • replaced deprecated support libs with androidx
  • updated other libs
  • set minSdk to 19
  • added annotations
  • updated gitignore

Bug fix

29 Jun 05:03
Compare
Choose a tag to compare

synchronization related

First version

23 Jun 10:25
Compare
Choose a tag to compare
updated readme

license, sample usage, getting started and limitations

First release

23 Jun 05:40
Compare
Choose a tag to compare
First release Pre-release
Pre-release
v1.0

initial README