Questions tagged [telephonymanager]

Telephony class for Android devices

A class that provides access to information about the telephony services on an Android device

781 questions
5
votes
1 answer

How to detect answered or rejected state in outgoing call

i try to write a program for android .I want to make a call with my program and after that recognize the call status. With Flowing Function I can recognize the hang out status and for answering status it doesn’t work.I try this function but it…
4
votes
1 answer

Getting country code

I am implementing In App Purchase.In the in app product list,I have configured few products for country A and few products for country B. So my application should show only those products configured for country A for a user in country A and…
4
votes
2 answers

How to not fire PhoneStateListener.CALL_STATE_RINGING if already talking and a second caller is calling

I am programming an app, that automatically answers a call. The problem is, that it should not answer one if I am already in a call and someone is ringing. Is there a way to achieve that? According to the doc, if I check the status with…
Force
  • 6,312
  • 7
  • 54
  • 85
4
votes
2 answers

Why is getNetworkOperator not reliable for CDMA?

Can anyone say why the documentation for the getNetworkOperator function of TelephonyManager states that this can return unreliable result for CDMA ? getNetworkOperator documentation Availability: Only when user is registered to a network. Result…
Muzikant
  • 8,070
  • 5
  • 54
  • 88
4
votes
3 answers

Flutter Telephony not recieving sms in real hardware except emulator

I am using telephony dependencies for receive_sms. It is working fine in the emulator and I receive every message sent, but it is not working on a real hardware phone. import 'package:flutter/material.dart'; import 'dart:async'; import…
sid heart
  • 1,140
  • 1
  • 9
  • 38
4
votes
1 answer

How to distinguish the screen on/off status while incoming call?

My app uses the TelephonyManager.ACTION_PHONE_STATE_CHANGED for some actions. But I want a different action while the phone rang when the user was present (screen was on) and different action when the user was not present (screen was off). I tried…
jacek
  • 947
  • 1
  • 11
  • 20
4
votes
1 answer

How to Answer or reject incoming calls programmatically in Android 9+?

I am making an app that programmatically accepts an incoming call without being the default calling application. It has been easier to achieve in Android 9 and below with tm.acceptRingingCall() and tm.endCall. Unfortunately these methods have been…
Adnan Arshad
  • 370
  • 3
  • 15
4
votes
3 answers

No IMEI for Android Developers in Android 10

As Android is serious about security and trying to make new android versions more secure, its becoming tough for developers to keep up-to date with new security features and find old methods alternatives to make their app compatible with old…
Zaeem Sattar
  • 990
  • 2
  • 12
  • 30
4
votes
2 answers

Incoming number is null after ending the call in android PIE 9

I have been working on this problem since weeks. I am making an app which picks the incoming number and shows it in a dialog box after the call is ended. Everything is working fine below android PIE 9.0. The number is always null in android PIE. I…
4
votes
2 answers

How do I get the latest call logs in Android Studio?

I have a code that works below. But I can't limit it. I just want to get the last 20 call logs. But that's how I see all-time search logs. It should only be the last call logs and I only need to see 20 pieces. Any help, I'd appreciate it. My…
İsa C.
  • 329
  • 5
  • 16
4
votes
1 answer

Android - Navigating through USSD menu using pre-determined inputs sent via requests

I am planning to create an Android App that will automate sending a users response to a USSD Menu. At a click of a button, the app will send the initial code, followed by the rest of the menu inputs. For example, the initial number is *143#,…
Razgriz
  • 7,179
  • 17
  • 78
  • 150
4
votes
1 answer

Get incoming call number programmatically on android

I am trying to get incoming call info using broadcast receivers on android studio. following are the methods i tried:
AruN
  • 171
  • 4
  • 15
4
votes
0 answers

Access Cell tower Objects using Telephony package in react native

I am trying to make geolocation request with API call (in react native) https://www.googleapis.com/geolocation/v1/geolocate?key=YOUR_API_KEY. This API takes following inputs in request body. { "homeMobileCountryCode": 310, …
4
votes
1 answer

Firebase data upload crashing Android application

I am collecting signal data and uploading it to a database. I have several functions and made a few test functions before trying to implement the rest. It crashes when I upload with the classes I want to use but not with the test cases. Here is the…
4
votes
0 answers

Android: CellInfo gives me the same value for CID, MNC, MCC, LAC and signal strength

I'm trying to get the information of the cell tower connected to the phone in the Android studio. This is my code: telephonyManager = (TelephonyManager)getSystemService(Context.TELEPHONY_SERVICE); List cellInfos =…
Osama El-Ghonimy
  • 335
  • 2
  • 12