Hello!
I have Samsung A5 (2017) with Android 7.0 and I have the app with next
BroadcastReceiver:
<receiver
android:name=".CallReceiver"
android:enabled="true"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.PHONE_STATE" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.NEW_OUTGOING_CALL" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
</intent-filter>
</receiver>
After the rebooting of my device I have tried to make some outgoing calls
and in the logcat I have seen next (I have described there some problems):
04-19 14:26:32.918 E/CallReceiver: onReceive android.intent.action.
NEW_OUTGOING_CALL
04-19 14:26:34.571 E/CallReceiver: onReceive android.intent.action.
PHONE_STATE
04-19 14:26:34.665 E/CallReceiver: CURRENT STATE IDLE
^^^^^ Why idle event? Why not offhook?
04-19 14:26:35.880 E/CallReceiver: onReceive android.intent.action.
PHONE_STATE
04-19 14:26:35.969 E/CallReceiver: CURRENT STATE OFFHOOK
04-19 14:26:36.980 E/CallReceiver: onReceive android.intent.action.
PHONE_STATE
04-19 14:26:37.064 E/CallReceiver: CURRENT STATE IDLE
<---- Where android.intent.action.NEW_OUTGOING_CALL event is?
04-19 14:26:38.742 E/CallReceiver: onReceive android.intent.action.
PHONE_STATE
04-19 14:26:38.856 E/CallReceiver: CURRENT STATE OFFHOOK
04-19 14:26:39.273 E/CallReceiver: onReceive android.intent.action.
PHONE_STATE
04-19 14:26:39.367 E/CallReceiver: CURRENT STATE IDLE
<---- Where android.intent.action.NEW_OUTGOING_CALL event is?
04-19 14:26:40.812 E/CallReceiver: onReceive android.intent.action.
PHONE_STATE
04-19 14:26:40.891 E/CallReceiver: CURRENT STATE OFFHOOK
04-19 14:26:41.094 E/CallReceiver: onReceive android.intent.action.
PHONE_STATE
04-19 14:26:41.199 E/CallReceiver: CURRENT STATE IDLE
After some time it starts working in the correct way.
Could you explain me why so, please?
--
You received this message because you are subscribed to the Google Groups
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit
https://groups.google.com/d/msgid/android-developers/06ffbc6b-1f24-490f-903c-7490fb634c30%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.