J jefflynn1974 Member Licensed User Longtime User Mar 15, 2016 #1 I would like to run my app after dialing but before the call is going out. Is it possible?
somed3v3loper Well-Known Member Licensed User Longtime User Mar 15, 2016 #2 I am not sure I understood your problem but you might want to to use intent filter Add this to your manifest : Code: AddPermission("android.permission.READ_PHONE_STATE") AddReceiverText(YourServiceName, <intent-filter> <action android:name="android.intent.action.PHONE_STATE" /> </intent-filter>) And add this inside service_start Code: If StartingIntent.HasExtra("state") Then If StartingIntent.GetExtra("state") ="IDLE" Then Log("Call has ended") End If End If If that is not what you wanted , you might want to modify the code and or check for other extras . It is called twice and I do not know why . Upvote 0
I am not sure I understood your problem but you might want to to use intent filter Add this to your manifest : Code: AddPermission("android.permission.READ_PHONE_STATE") AddReceiverText(YourServiceName, <intent-filter> <action android:name="android.intent.action.PHONE_STATE" /> </intent-filter>) And add this inside service_start Code: If StartingIntent.HasExtra("state") Then If StartingIntent.GetExtra("state") ="IDLE" Then Log("Call has ended") End If End If If that is not what you wanted , you might want to modify the code and or check for other extras . It is called twice and I do not know why .
J jefflynn1974 Member Licensed User Longtime User Mar 15, 2016 #3 Thanks for the answer, but that is not exactly what I need. I may have written the original post ambigiously. I would like to interrupt the outgoing call after the user has pressed the dial button so that I can display a message box to give the user a choice. If the user selects 'Yes' the app dials the called number. Upvote 0
Thanks for the answer, but that is not exactly what I need. I may have written the original post ambigiously. I would like to interrupt the outgoing call after the user has pressed the dial button so that I can display a message box to give the user a choice. If the user selects 'Yes' the app dials the called number.
DonManfred Expert Licensed User Longtime User Mar 15, 2016 #4 As far as i know you can not intercept an outgoing call or overlap the call-dialog Upvote 0
J jefflynn1974 Member Licensed User Longtime User Mar 15, 2016 #5 I can catch the outgoing call and abort it with the SetResultdata(null). But the call process in that case is already created with a false number but not interrupted. Upvote 0
I can catch the outgoing call and abort it with the SetResultdata(null). But the call process in that case is already created with a false number but not interrupted.