{"id":13989318,"url":"https://github.com/mvdan/accesspoint","last_synced_at":"2025-07-22T10:31:57.358Z","repository":{"id":31717568,"uuid":"35283387","full_name":"mvdan/accesspoint","owner":"mvdan","description":"Manage wireless access points in Android (abandoned)","archived":true,"fork":false,"pushed_at":"2018-06-03T09:39:37.000Z","size":205,"stargazers_count":73,"open_issues_count":0,"forks_count":17,"subscribers_count":9,"default_branch":"master","last_synced_at":"2024-08-09T13:15:44.809Z","etag":null,"topics":["access-point","android","java","tethering","wireless"],"latest_commit_sha":null,"homepage":"","language":"Java","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/mvdan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-05-08T14:20:56.000Z","updated_at":"2023-01-28T18:50:41.000Z","dependencies_parsed_at":"2022-07-22T04:32:01.351Z","dependency_job_id":null,"html_url":"https://github.com/mvdan/accesspoint","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mvdan%2Faccesspoint","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mvdan%2Faccesspoint/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mvdan%2Faccesspoint/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mvdan%2Faccesspoint/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mvdan","download_url":"https://codeload.github.com/mvdan/accesspoint/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227079204,"owners_count":17727977,"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":["access-point","android","java","tethering","wireless"],"created_at":"2024-08-09T13:01:36.245Z","updated_at":"2024-11-29T08:30:53.776Z","avatar_url":"https://github.com/mvdan.png","language":"Java","readme":"# accesspoint\n\n[![Build Status](https://travis-ci.org/mvdan/accesspoint.svg?branch=master)](https://travis-ci.org/mvdan/accesspoint)\n\nManage wireless access points on Android 2.2 or later.\n\nNote that this project is **abandoned** since its method doesn't work on Android\n7.1 or later. Have a look at these newer alternatives that have been tested to\nwork on Android 8.0:\n\n* https://github.com/shinilms/direct-net-share\n* https://github.com/geekywoman/direct-net-share\n* https://github.com/aegis1980/WifiHotSpot\n\n### Quick start\n\n```gradle\nrepositories {\n\tjcenter()\n}\n\ndependencies {\n\tcompile 'cc.mvdan.accesspoint:library:0.2.0'\n}\n```\n\n```java\nimport cc.mvdan.accesspoint.WifiApControl;\n\nWifiManager wifiManager = (WifiManager) getSystemService(Context.WIFI_SERVICE);\nWifiApControl apControl = WifiApControl.getInstance(context);\n\nboolean enabled = apControl.isEnabled();\nint state = apControl.getState();\n\nWifiConfiguration config = apControl.getConfiguration();\nInet4Address addr4 = apControl.getInet4Address();\nInet6Address addr6 = apControl.getInet6Address();\n\n// These are cached and may no longer be connected, see\n// WifiApControl.getReachableClients(int, ReachableClientListener)\nList\u003cWifiApControl.Client\u003e clients = apControl.getClients()\n\n// Wifi must be disabled to enable the access point\nwifiManager.setWifiEnabled(false);\napControl.enable();\n\napControl.disable();\nwifiManager.setWifiEnabled(true);\n```\n\nRemember to ask for `WRITE_SETTINGS` on 6.0+! The example app has a\nsample implementation of that. The library will not do this for you, as\nit involves UI interaction that should be handled and customizable by\nyour app.\n\n### Features\n\n * Enabling and disabling your AP\n * Configuring your AP via `WifiConfiguration`\n * Getting your device's IP address in your AP network\n * Getting the list of clients connected to your AP\n\n### Permissions\n\nYou will need the following:\n\n```xml\n\u003cuses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\" /\u003e\n\u003cuses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/\u003e\n\u003cuses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\" /\u003e\n\u003cuses-permission android:name=\"android.permission.INTERNET\"/\u003e\n\u003cuses-permission android:name=\"android.permission.WRITE_SETTINGS\"/\u003e\n```\n\n### How does it work?\n\nEnabling, disabling and configuring of wireless Access Points are all\nunaccessible in the SDK behind hidden methods in `WifiManager`. Reflection is\nused to get access to those methods.\n\nGetting your own IP address is done by getting the IP address that is\nassociated with the wireless network interface.\n\nGetting the list of clients consists of parsing `/proc/net/arp` and parsing\neach line to see what devices are neighbours in our wireless network.\n\nAn extra method is available to get the list of reachable clients, since the\narp table is cached for up to a few minutes. The method asynchronously tests\nthe reachability of each client.\n\n### License\n\nPublished under the Apache2 license.\n","funding_links":[],"categories":["Java"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmvdan%2Faccesspoint","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmvdan%2Faccesspoint","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmvdan%2Faccesspoint/lists"}