telephony_kit 0.5.0
telephony_kit: ^0.5.0 copied to clipboard
Phone calls, dialer role, in-call control, SIM, network and call log APIs for Flutter on Android, using JNI bindings generated by jnigen. No method channels.
0.5.0 #
- Full contact management:
getContactsandgetContactreturnContactDetailswith name parts, phones, emails, addresses, company, job title, nickname, websites, note, birthday, photo and favorite (contacts without a phone number are included).addContact,updateContact,deleteContact,deleteContactsandsetContactStarredchange the address book. New modelsContactDetails,ContactEmail,ContactAddressand permission nameTelephonyPermission.writeContacts(WRITE_CONTACTS). No new bindings were needed. The example Contacts tab can now open a contact, add, edit, favorite and delete. - Agent skill and docs updated with the new contacts API.
0.4.0 #
-
Agent support:
AGENTS.mdfor contributors and an agent skill inskills/telephony-kit/for apps that use the package. -
Which SIM a call uses:
PhoneCall.phoneAccount(id, carrier label, slot;displayNamesuch asSIM 2 · Vodafone).PhoneAccount.slotIndexis filled on Android 11+. The example shows it on the in-call screen and uses slots on the keypad SIM selector. -
Reject with a message:
PhoneCall.reject(message: ...)texts the caller (Telecom sends it, no SMS permission needed);reject()still works.PhoneCall.cannedTextResponses(the user's replies from the phone settings) andTelephonyKit.quickReplies(defaults, changeable). Example: Reply button on the incoming screen. -
Emergency numbers:
isEmergencyNumber(number). Call screening never blocks or silences emergency numbers (reasonemergency). The example keypad labels them. -
Post-dial digits: a wait (
;) in the dialed number sends aPostDialWaitevent; answer withPhoneCall.continuePostDial(proceed).PhoneCall.postDialRemaining. Pauses (,) need nothing. Example: a "Send remaining digits?" dialog; long press*for,and#for;. -
Disconnect cause:
PhoneCall.disconnectCause(DisconnectCausewithcode,label,description,reason,displayText,isFailure), still readable for the last 20 calls after removal, and a newCallDisconnectedevent sent just beforeCallRemoved. Breaking: an exhaustiveswitchoverCallEventneeds aCallDisconnectedcase. The example shows failures such as "Busy" or "Radio off". -
Proximity sensor: the screen turns off near the ear while a call is active or dialing on the earpiece or a wired headset (not while ringing, on speaker or Bluetooth).
proximitySensorEnabled(default true),isProximityLockHeld. The package now declaresWAKE_LOCK. -
Missed call notifications: declare
TelephonyKitMissedCallReceiverforandroid.telecom.action.SHOW_MISSED_CALLS_NOTIFICATION(exported, withandroid:permission="android.permission.MODIFY_PHONE_STATE"so only Telecom can send it; see the example manifest). As the default dialer the app then shows the missed call notification (count, last caller, Call back button) instead of the system.missedCallNotificationsEnabled,clearMissedCallNotification();markMissedCallsRead()clears it too. -
SIM choice for outgoing calls: while a call is in
CallState.selectPhoneAccount(multi SIM, no default SIM), readPhoneCall.selectablePhoneAccountsand callPhoneCall.selectPhoneAccount(id, setDefault: ...). NewPhoneAccountmodel (id, label, slot) andgetPhoneAccountDetails(). The example shows a SIM picker. -
takeDialNumber()reads the number of the dial intent (tel:link) that opened the app. The example shows it on the keypad instead of crashing on an unknown Flutter route. -
searchCallLogfillsCallLogEntry.idandisNew(deleting single entries works). -
searchContactsfinds partial numbers anywhere in a number (650finds+1 650-555-6789). -
canBlockNumbersis only true for the default dialer or SMS app. -
sendUssdfails after a timeout (30 seconds by default) when the network does not reply. -
Conference changes are reported on
callEvents;swapCallsonly resumes the held call and lets Telecom hold the active one. -
Bindings regenerated; overload suffixes changed in the private bindings.
-
Example: in-call screen shows over pushed pages, conferences show as "Conference (n)", Messages shows an empty state.
0.3.0 #
- Incoming call notification with answer and decline buttons that shows full
screen on the lock screen, and an ongoing call notification with hang up.
showCallNotificationsturns them off. - Call screening:
TelephonyKitCallScreeningServiceapplies block rules (numbers, prefixes, callers not in contacts, hidden numbers) even when the app is closed. Configure throughTelephonyKit.screening; watchscreenedCalls.requestCallScreeningRolefor non-dialer apps. - System block list:
getBlockedNumbers,blockNumber,unblockNumber,isNumberBlocked,canBlockNumbers. - Multi-call and conference:
swapCalls, and onPhoneCallmerge,conferenceWith,swap,splitFromConference,children,parent. - Audio routes:
supportedAudioRoutes,setAudioRoute,bluetoothDevices,selectBluetoothDevice. networkEventsstream (signal level, service state, 2G to 5G, device call state), plussignalLevelandnetworkGeneration.- Call log changes:
deleteCallLogEntries,deleteCallLogForNumber,markMissedCallsRead.CallLogEntryhasidandisNew. voicemailNumber,callVoicemail, andsendUssdfor codes like*100#.- SMS:
sendSmsandsearchSms. - Example: blocking page, messages page, live network, USSD, audio route and keypad sheets, swap and merge, and long press actions on recent calls.
- The example manifest now lets the system play the ringtone
(
IN_CALL_SERVICE_RINGINGfalse).
0.2.0 #
searchCallLog: filter the call log by name or number, call type and date range. Number search ignores formatting and matches local and international forms.searchContacts: search contacts by name or number, with all their numbers, photo and favorite flag.lookupNumber: find the contact saved for a number, for caller names.TelephonyPermission.readContacts.- Example: search on Recents, a missed calls filter, a Contacts tab, and caller names on the in-call screen.
0.1.0 #
- Initial release, Android only.
- Place calls (with SIM choice) and open the system dialer.
- Check and request the default dialer role.
- In-call control through
TelephonyKitInCallService: call events stream, answer, reject, hang up, hold, DTMF, mute and speaker. - Network, SIM and phone details.
- Read the call log.
- All Android access goes through JNI bindings generated by jnigen.