Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

termux-telephony-cellinfo not working #307

Closed
Ampli-fier opened this issue Dec 2, 2019 · 2 comments
Closed

termux-telephony-cellinfo not working #307

Ampli-fier opened this issue Dec 2, 2019 · 2 comments

Comments

@Ampli-fier
Copy link

Problem description
The command termux-telephony-cellinfo is not showing any information.
Errors are logged to logcat.

Steps to reproduce

$ termux-telephony-cellinfo
[$

Expected behavior
Cell information is shown properly.

Additional information

  • termux-api v0.38

  • Location permission is granted

  • termux-info

$ termux-info
Packages CPU architecture:
aarch64
Subscribed repositories:
# sources.list
deb https://termux.org/packages/ stable main
# science-repo (sources.list.d/science.list)
deb https://dl.bintray.com/grimler/science-packages-24 science stable
# game-repo (sources.list.d/game.list)
deb https://dl.bintray.com/grimler/game-packages-24 games stable
Updatable packages:
All packages up to date
Android version:
9
Kernel build information:
Linux localhost 4.9.148-g02e4d6af1113-ab5555671 #0 SMP PREEMPT Fri May 10 20:41:11 UTC 2019 aarch64 Android
Device manufacturer:
Google
Device model:
Pixel 3
$
  • logcat
mm:46.637 D AndroidRuntime: >>>>>> START com.android.internal.os.RuntimeInit uid 10158 <<<<<<
mm:46.718 D AndroidRuntime: Calling main entry com.example.termuxam.Am
mm:46.736 E termux-api: Error in ResultReturner
mm:46.736 E termux-api: java.lang.NullPointerException: Attempt to invoke interface method 'java.util.Iterator java.util.List.iterator()' on a null object reference
mm:46.736 E termux-api:    at com.termux.api.TelephonyAPI$1.writeJson(TelephonyAPI.java:37)
mm:46.736 E termux-api:    at com.termux.api.util.ResultReturner$ResultJsonWriter.writeResult(ResultReturner.java:88)
mm:46.736 E termux-api:    at com.termux.api.util.ResultReturner.lambda$returnData$0(ResultReturner.java:133)
mm:46.736 E termux-api:    at com.termux.api.util.-$$Lambda$ResultReturner$oCU8JqHW5HLMrNZa40ThjAWcwzo.run(Unknown Source:8)
mm:46.736 E termux-api:    at java.lang.Thread.run(Thread.java:764)
mm:46.737 D AndroidRuntime: Shutting down VM
@ghost ghost added the bug report label Dec 2, 2019
@Duvio
Copy link

Duvio commented May 5, 2022

I have the same problem. Did you resolve it yet?

@agnostic-apollo
Copy link
Member

agnostic-apollo commented May 6, 2022

This should have been solved with 67954de. Install latest version and try again. Make sure to enable location if on Android 8+, otherwise will get empty result.

https://github.com/termux/termux-api/blob/v0.38/app/src/main/java/com/termux/api/TelephonyAPI.java#L37

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants