Compare commits

..

2 Commits

Author SHA1 Message Date
da0c5d1991 feat: call page UI
Some checks failed
/ mirror (push) Waiting to run
/ build (push) Has been cancelled
/ build-stealth (push) Has been cancelled
2025-03-14 15:57:47 +02:00
3129e51eb4 Add CallPage for initiating calls with contact details (#37)
Demo call page avec les features de base:
- Haut parleur
- Couper/activer micro
- keypad
- raccrocher
- Display Icing state (toucher pour switch l'état)

S'active en faisant un appui long sur le bouton d'appel depuis les détails du contact.
Compatible avec l'obfuscation des contacts.

Co-authored-by: AlexisDanlos <91090088+AlexisDanlos@users.noreply.github.com>
Reviewed-on: #37
Co-authored-by: alexis <alexis.danlos@epitech.eu>
Co-committed-by: alexis <alexis.danlos@epitech.eu>
2025-03-14 15:54:26 +02:00
2 changed files with 13 additions and 5 deletions

View File

@ -151,11 +151,7 @@ class MainActivity : FlutterActivity() {
private fun getCallLogs(): List<Map<String, Any?>> { private fun getCallLogs(): List<Map<String, Any?>> {
val logsList = mutableListOf<Map<String, Any?>>() val logsList = mutableListOf<Map<String, Any?>>()
val cursor: Cursor? = contentResolver.query( val cursor: Cursor? = contentResolver.query(
CallLog.Calls.CONTENT_URI, CallLog.Calls.CONTENT_URI, null, null, null, CallLog.Calls.DATE + " DESC"
null,
null,
null,
CallLog.Calls.DATE + " DESC"
) )
cursor?.use { cursor?.use {
while (it.moveToNext()) { while (it.moveToNext()) {

View File

@ -265,6 +265,18 @@ class _ContactModalState extends State<ContactModal> {
await _callService.makeGsmCall(context, phoneNumber: phoneNumber); await _callService.makeGsmCall(context, phoneNumber: phoneNumber);
} }
}, },
onLongPress: () {
// Navigate to the beautiful calling page demo
Navigator.push(
context,
MaterialPageRoute(
builder: (_) => CallPage(
displayName: widget.contact.displayName,
thumbnail: widget.contact.thumbnail,
),
),
);
},
), ),
ListTile( ListTile(
leading: const Icon(Icons.message, color: Colors.blue), leading: const Icon(Icons.message, color: Colors.blue),