termux / termux/termux-api

actively trigger wifi scan

Open
#678 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
4.3k
Forks
920
PR merge metrics
No merged PRs in 30d

Description

Feature description

I'd like to have a termux-wifi-scan command to actively trigger the OS to start a wifi scan. This would make termux-wifi-scaninfo more powerful, as one could grant that the last scan happened in recent past. Currently, sometimes termux-wifi-scaninfo shows wifis I did not see for several minutes (up to 15 min).

Reference implementation

Have you checked if the feature is accessible through the Android API?

  • in the Android API there is the startScan() method. It is deprecated since API 28, though I know it is used by some Wifi scanners, e.g. WiFiAnalyzer.
  • I can only test it on Android 10 and for me it works. It seems like it is not yet removed from the Android API.

Do you know of other open-source apps that has a similar feature as the one you want? (Provide links)

I assume it is not very likely to add a feature based on a deprecated API call. Anyway, I think it is worth giving it a try.

Thanks in advance ;)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with Android's WifiManager.startScan() entry point and compare its use in WiFiAnalyzer's Scanner.update(). Check how termux-wifi-scaninfo is exposed, then determine whether a new termux-wifi-scan command can trigger a scan on supported Android versions. Done means the command initiates a scan and its compatibility or deprecation limitations are documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
cli, mobile
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.