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
0
votes
1 answer

Android - How to set default ringtone first time itself?

I am developing simple application using ringtone manager. I am able to set particular ringtone for incoming number. But the problem is my ringtone works fine when the incoming number called second time. I need to override the default ringtone…
sachi
  • 2,122
  • 7
  • 30
  • 46
0
votes
1 answer

Unable to get broadcast of PhoneStateListener on Android 4.0 device

With a receiver and I'm getting broadcast of PhoneStateListener on 2.3 devices like (offhook, idle, Ringing) but when i run the same code with 4.0 device it unable to get broadcast the state of phone. Can Anyone tell how to get broadcast on 4.0 with…
Hulk
  • 2,565
  • 16
  • 24
0
votes
1 answer

Changing activities on end phone call

I would like to know how to change activities on an end of a phone call using the TelephonyManager in Android. Anybody have a tutorial or can provide code?
0
votes
1 answer

issue with TelephonyManager, classNotFoundException

I am trying to create an app that can block an incoming call. I am getting ClassNotFoundException for TelephonyManager.Following is the code I am using. What is that I am doing wrong here? BroadcastReceiver import java.lang.reflect.Method; import…
Atif Farrukh
  • 2,219
  • 2
  • 25
  • 47
0
votes
1 answer

Android setting CID / LAC

Is there any implemented solutions for setting LAC/SAC or CID manually ? From Telephony api I see getting LAC CID (TelephonyManager getLAC(), getCID()) is possible but do not see setting them. I checked may be it is possible on RIL layer, but was…
Gorkem
  • 701
  • 8
  • 22
0
votes
1 answer

Sim Info from android devices

I want to know the sim information like phone number,Registered name..etc from android devices throgh programatically.I go through this but did not get any success. Can anyone Please provide some help... Thanks in advance !!
LuminiousAndroid
  • 1,557
  • 4
  • 18
  • 28
0
votes
1 answer

What API/Class do I use to check for outgoing calls? - Android

I can't seem to find a good class / API that can tell me when my phone is making a phone call. I know that I can detect when a phone call is being received by using TelephonyManager, but how do I detect if the user is calling someone? Below is the…
fouadalnoor
  • 197
  • 2
  • 5
  • 14
0
votes
1 answer

Android SMS Not Sending Internationally

I live in Turkey. I can send sms to local numbers with this method: public void sendSMS(String phoneNumber, String message) { Log.i("NO", phoneNumber); PendingIntent sentPI = PendingIntent.getBroadcast(this, 0, new Intent( …
mtekeli
  • 705
  • 1
  • 7
  • 17
0
votes
0 answers

Bring current call to foreground

Suppose an Android user has a call in progress and then they hit 'home' and starts my app (leaving the call in progress in the background). In my app I detect the call to be in progress using TelephonyManager.CALL_STATE_IDLE but then I want to get…
Peter Smallwood
  • 470
  • 5
  • 16
0
votes
1 answer

unable to end call in android verstion 2.2.6

i trying to end call using below method to e private void getTeleService(Context context) { TelephonyManager tm = (TelephonyManager) context .getSystemService(Context.TELEPHONY_SERVICE); try { Class c =…
Prashant Kadam
  • 1,207
  • 4
  • 18
  • 30
0
votes
2 answers

how to get international dialing code based on SIM provider?

i am developing the application in which user mobile no and international country code should be set automatically on the basis of SIM card provider. i.e if i install this application in first page country code and my phone no should be filled…
Juned
  • 6,290
  • 7
  • 45
  • 93
0
votes
1 answer

create a thread over a toat message

I have the following code: String state= bundle.getString(TelephonyManager.EXTRA_STATE); if (state.equalsIgnoreCase(TelephonyManager.EXTRA_INCOMING_NUMBER) { Toast toast= new…
user1222905
  • 533
  • 2
  • 17
  • 36
-1
votes
1 answer

Detect better call states on Android with RINGING, OFFHOOK and IDLE

A week ago, for a week I tried to have an app I'm making completely independent detecting call states. I'm on Lollipop 5.1, so I can't use PRECISE_CALL_STATE that exists from Marshmallow upwards. I'm restricted to the usual CALL_STATE_RINGING,…
Edw590
  • 447
  • 1
  • 6
  • 23
-1
votes
1 answer

Display incoming call in Android/MainActivity

I am new to Android(3 months old). I want to read an incoming call and display it through MainActivity. I have extended PhoneStateListener and am able to detect the incoming call/number. Now my question is how do I display this number in the front…
-1
votes
1 answer

Intent.ACTION_CALL how to add `,` sign comma

How to add a , comma sign into the phone call intent? 004216378497,,,,,,,,,2 my code is now like : Intent intent = new Intent(Intent.ACTION_CALL); intent.setData(Uri.parse("tel:" + phoneNumber)); context.startActivity(intent);
Csabi
  • 3,097
  • 17
  • 59
  • 107