{"id":21893337,"url":"https://github.com/isupatches/android-wisefy","last_synced_at":"2025-04-06T07:14:51.148Z","repository":{"id":42861385,"uuid":"57158628","full_name":"isuPatches/android-wisefy","owner":"isuPatches","description":"Wrapper around WifiManager and ConnectivityManager for Android","archived":false,"fork":false,"pushed_at":"2024-09-21T05:08:53.000Z","size":3029,"stargazers_count":313,"open_issues_count":14,"forks_count":38,"subscribers_count":9,"default_branch":"develop","last_synced_at":"2025-03-30T05:09:42.329Z","etag":null,"topics":["android","connectivity-manager","wifi","wifi-manager"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/isuPatches.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-04-26T20:09:48.000Z","updated_at":"2025-03-18T03:08:47.000Z","dependencies_parsed_at":"2024-06-27T04:04:18.972Z","dependency_job_id":null,"html_url":"https://github.com/isuPatches/android-wisefy","commit_stats":null,"previous_names":["isupatches/wisefy"],"tags_count":31,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/isuPatches%2Fandroid-wisefy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/isuPatches%2Fandroid-wisefy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/isuPatches%2Fandroid-wisefy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/isuPatches%2Fandroid-wisefy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/isuPatches","download_url":"https://codeload.github.com/isuPatches/android-wisefy/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247445681,"owners_count":20939961,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","connectivity-manager","wifi","wifi-manager"],"created_at":"2024-11-28T13:13:34.054Z","updated_at":"2025-04-06T07:14:51.132Z","avatar_url":"https://github.com/isuPatches.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Wisefy\n\n\u003cimg src=\"Banner.png\" width=\"40%\" height=\"40%\" /\u003e\n\nA Wifi configuration and util library built in Kotlin for Android.\n\n\u003e Developed by Patches 04/24/2016 - present  \n\u003e Logo/icon created by mansya (2018)  \n\u003e \n\u003e Supports Android SDK levels 23-34\n\n[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-WiseFy-brightgreen.svg?style=flat)](https://android-arsenal.com/details/1/6011) [![Android Weekly](https://img.shields.io/badge/Android%20Weekly-%23230-blue.svg)](http://androidweekly.net/issues/issue-230)\n\n[![CircleCI](https://dl.circleci.com/status-badge/img/gh/isuPatches/android-wisefy/tree/develop.svg?style=svg)](https://dl.circleci.com/status-badge/redirect/gh/isuPatches/android-wisefy/tree/develop)\n\n- [Installation](#installation)\n- [5.0 Rewrite](#50-rewrite)\n  - [Highlights](#highlights)\n  - [New Structure](#new-structure)\n  - [Packaging \u0026 Naming Conventions](#packaging-and-naming-conventions)\n  - [Deprecations](#deprecations)\n  - [Known Android Q Problems](#known-android-q-problems)\n- [Documentation](#documentation)\n  - [Reset](#reset)\n  - [Links](#links)\n- [FAQ](#faq)\n- [For Contributors](#for-contributors)\n- [License](#license)\n\n## Installation\n\nFor the 5.x versions of Wisefy, a new Bill of Materials (BOM for short) has been implemented.  This is similar to the Compose or Firebase BOMs where the platform is used but then it is possible to pick and choose the sub-dependencies to pull in.\n\nAdding the Wisefy BOM would look something like:\n\n```kotlin\nimplementation(platform(libs.isupatches.wisefy.bom))\n```\n\nif using Gradle version catalogs, or:\n\n```kotlin\nimplementation(platofrm(\"com.isupatches.android.wisefy:wisefy-bom:5.0.0-RC3\"))\n```\n\nif used directly. Once the platform is installed, it is possible to import just the portions of the library desired.\n\n```kotlin\nimplementation(libs.isupatches.wisefy.accesspoints)\nimplementation(libs.isupatches.wisefy.addnetwork)\nimplementation(libs.isupatches.wisefy.core)\nimplementation(libs.isupatches.wisefy.ktx)\nimplementation(libs.isupatches.wisefy.networkconnection)\nimplementation(libs.isupatches.wisefy.networkinfo)\nimplementation(libs.isupatches.wisefy.removenetwork)\nimplementation(libs.isupatches.wisefy.savednetworks)\nimplementation(libs.isupatches.wisefy.signal)\nimplementation(libs.isupatches.wisefy.wifi)\nimplementation(libs.isupatches.wisefy.wisefy)\n```\n\nHere are the descriptions of what functionality each artifact provides:\n\n- `:accesspoints` For getting and searching for nearby networks\n- `:addnetwork` For adding a Wifi network\n- `:core` For base Wisefy functionality\n- `:networkconnection` For connecting and disconnecting from networks\n- `:networkinfo` For information about the device's current network and current connectivity status\n- `:removenetwork` For removing a Wifi network\n- `:savednetworks` For getting and searching for saved networks\n- `:signal` For calculating a signal level and comparing signal levels\n- `:wifi` For enabling and disabling Wifi\n\n## 5.0 Rewrite\n\nThe 5.0 version of WiseFy works to rectify the problems that caused it to be overly challenging as a single developer \nto keep up with the ever-changing Wifi APIs for new Android operating systems, especially with a lot of functionality \nbecoming privatized.  It also strives to simplify the API and removes redundancy within the APIs that caused additional\noverhead for maintenance.\n\nI hope you enjoy the rewrite and please create an issue if you see anything odd or have questions!\n\n### Highlights\n\n- Android 10 - 14 now supported (Q, R, S, Tiramisu and Upside Down Cake) are now supported\n- Compiled with Java 21\n- Updated to Kotlin 2.x and AGP 8.x\n- New Bill of Materials for packaging\n- Rewritten with extensibility and future Android OS's in-mind\n    * Future versions of the Android OS will be easier to support with the new delegate/adapter system\n    * Improved modularity where APIs for OS versions are contained in their own API / API implementation files\n- Async operations updated to internally leverage Coroutines and a new exception handler\n- Returns are now Wisefy classes opposed to a class from the OS, making it easier to add new variants in the future \n  through sealed classes\n- Updated names for callbacks\n- Kotlin first mentality (but willing to support Java as first class too!)\n- WPA3 networks are now supported\n- `wisefysample` renamed to `app`\n- BSSID support is now added\n- More modular artifacts are available now \n  - Less bloat if there are things you're not going to use\n  - Able to iterate and update portions of the library without the overhead of the entire project\n- `gradle.lockfile`s and Gradle ranges are enabled for more control over versioning\n  - [Locking dependency versions](https://docs.gradle.org/current/userguide/dependency_locking.html)\n  - [Declaring Versions and Ranges](https://docs.gradle.org/current/userguide/single_versions.html)\n- Sample app re-written\n  - Down with SharedPreferences, onward to DataStore\n  - Written in Compose complete with previews\n  - Niceties like progress bars added\n  - Better input validation\n\n### New Structure\n\n- Wisefy public API -\u003e Wisefy implementation -\u003e Delegate to determine which adapter to use -\u003e \n  Adapter converts request for usage by the Android OS -\u003e Android OS APIs are used and the adapter returns information\n  as a Wisefy result\n\n### Packaging and Naming Conventions\n\nTypes of classes:\n\n- `Query` - Indicates a read only operation where nothing is modified or written\n- `Request` - Indicates an action where some state is modified or a value is written\n- `Result` - Indicates the return from an action or query\n- `Data` - Indicates a complex return for a result that includes several different properties, fields, and functions\n\nTypes of property values:\n\n- `value` - A field within a `Result` object for a `Data` class (a Wisefy based class)\n- `rawValue` - A field for a OS level class or object (not a Wisefy based class) within a `Data` object\n\nSuffixes:\n\n- Api (top-level of a feature package) -\u003e Contains the definitions of synchronous APIs available for the feature\n- ApiAsync (top-level of a feature package) -\u003e Contains the definitions of asynchronous APIs available for the feature\n- Delegate -\u003e Determines which adapter to use based on the Android device's SDK level\n- Adapter -\u003e Middleware that converts requests and responses between the API and Delegate layers \n- Api (within os package context) -\u003e Houses the definitions of Android OS level APIs that Adapter classes may use\n- ApiImpl (within os package context) -\u003e Houses the implementation for executing Android OS level APIs\n\nPackage structure for each section is as follows:\n\n- Feature (accesspoints, addnetwork, etc.) -\u003e Location of Wisefy Specific delegate -\u003e supporting sub-directories\n  \n*Supporting sub-directories can include*\n\n- callbacks (public) -\u003e Location of callback interfaces for returns from async calls\n- entities (public) -\u003e Location of data classes for queries, requests, responses, and data\n- os (internal) - Purely on organizational directory\n  - adapters (internal) -\u003e Location of the classes that convert requests and responses between the Delegate and Android \n    OS level APIs\n  - converters (internal) -\u003e Location of helpers to convert one data class to another\n  - apis (internal) -\u003e Location of the API interfaces to talk to the Android OS\n  - impls (internal) -\u003e Location of the implementation for an API that talks to the Android OS\n\n### Deprecations\n\n- `fun connectToNetwork(request: ConnectToNetworkRequest): ConnectToNetworkResult` \n- `fun connectToNetwork(request: ConnectToNetworkRequest, callbacks: ConnectToNetworkCallbacks?)`\n- `fun disconnectFromCurrentNetwork(request: DisconnectFromCurrentNetworkRequest): DisconnectFromCurrentNetworkResult`\n- `fun disconnectFromCurrentNetwork(request: DisconnectFromCurrentNetworkRequest, callbacks: DisconnectFromCurrentNetworkCallbacks?)`\n\n### Known Android Q Problems\n\n- Adding, removing, and getting saved network functionality is not present. \n  Android Q / SDK 29 was in a weird half-baked state between the old WifiManager APIs and the new WifiSuggestion APIs...Android 30 seems to have full support, but Android 29 really drops the ball for saved network functionality.\n\n## Documentation\n\n### Reset\n\nTo keep the documentation clean and because of the amount of architectural changes for the 5.x release, the \ndocumentation was stripped and then completely re-written.\n\n## Links\n\nFor auto-generated [Dokka](https://kotlin.github.io/dokka) markdown files based on the KDocs please see \n[here](/dokka/index.md).\n\nFor more high-level examples based on different functionality please see [here](/documentation/index.md).\n\n## FAQ\n\nYou may find a list of frequently asked questions [here](/documentation/FAQ.md).\n\n## For Contributors\n\nWant to help? Have an idea for a cool feature or want to fix a bug for the community? See \n[CONTRIBUTING](CONTRIBUTING.md) for how you can make impactful changes for Wisefy.\n\n## License\nCopyright 2022 Patches Barrett\n\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in\ncompliance with the License. You may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under the License\nis distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express\nor implied. See the License for the specific language governing permissions and limitations under\nthe License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fisupatches%2Fandroid-wisefy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fisupatches%2Fandroid-wisefy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fisupatches%2Fandroid-wisefy/lists"}