Merge branch 'dev' into call-page
This commit is contained in:
commit
c9abdc3bc7
31
.gitea/workflows/apk.yaml
Normal file
31
.gitea/workflows/apk.yaml
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
on:
|
||||||
|
push:
|
||||||
|
paths:
|
||||||
|
- dialer/**
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: debian
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v1
|
||||||
|
with:
|
||||||
|
subpath: dialer/
|
||||||
|
- uses: docker://git.gmoker.com/icing/flutter:main
|
||||||
|
- uses: actions/upload-artifact@v1
|
||||||
|
with:
|
||||||
|
name: icing-dialer-${{ gitea.ref_name }}-${{ gitea.run_id }}.apk
|
||||||
|
path: build/app/outputs/flutter-apk/app-release.apk
|
||||||
|
|
||||||
|
build-stealth:
|
||||||
|
runs-on: debian
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v1
|
||||||
|
with:
|
||||||
|
subpath: dialer/
|
||||||
|
- uses: docker://git.gmoker.com/icing/flutter:main
|
||||||
|
with:
|
||||||
|
args: "build apk --dart-define=STEALTH=true"
|
||||||
|
- uses: actions/upload-artifact@v1
|
||||||
|
with:
|
||||||
|
name: icing-dialer-stealth-${{ gitea.ref_name }}-${{ gitea.run_id }}.apk
|
||||||
|
path: build/app/outputs/flutter-apk/app-release.apk
|
@ -6,11 +6,10 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
deploy:
|
deploy:
|
||||||
runs-on: debian
|
runs-on: debian
|
||||||
defaults:
|
|
||||||
run:
|
|
||||||
working-directory: website
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v1
|
||||||
|
with:
|
||||||
|
subpath: website/
|
||||||
- name: setup env
|
- name: setup env
|
||||||
run: |
|
run: |
|
||||||
. ./.env || true
|
. ./.env || true
|
||||||
@ -29,10 +28,8 @@ jobs:
|
|||||||
- uses: actions/kaniko@v1
|
- uses: actions/kaniko@v1
|
||||||
with:
|
with:
|
||||||
password: "${{ secrets.PKGRW }}"
|
password: "${{ secrets.PKGRW }}"
|
||||||
dockerfile: website/Dockerfile
|
|
||||||
|
|
||||||
- uses: actions/k8sdeploy@v1
|
- uses: actions/k8sdeploy@v1
|
||||||
with:
|
with:
|
||||||
kubeconfig: "${{ secrets.K8S }}"
|
kubeconfig: "${{ secrets.K8S }}"
|
||||||
registry_password: "${{ secrets.PKGRW }}"
|
registry_password: "${{ secrets.PKGRW }}"
|
||||||
workdir: website
|
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
# Icing
|
# Icing
|
||||||
|
|
||||||
|
## Encrypting phone calls on an analog audio level
|
||||||
|
|
||||||
An Epitech Innovation Project
|
An Epitech Innovation Project
|
||||||
|
|
||||||
*By*
|
*By*
|
||||||
@ -8,6 +10,12 @@ An Epitech Innovation Project
|
|||||||
---
|
---
|
||||||
|
|
||||||
The **docs** folder contains documentation about:
|
The **docs** folder contains documentation about:
|
||||||
|
|
||||||
|
#### Epitech
|
||||||
|
- The Beta Test Plan
|
||||||
|
- The Delivrables
|
||||||
|
|
||||||
|
#### Icing
|
||||||
- The project
|
- The project
|
||||||
- A user manual
|
- A user manual
|
||||||
- Our automations
|
- Our automations
|
||||||
|
1
dialer/android/.gitignore
vendored
1
dialer/android/.gitignore
vendored
@ -4,6 +4,7 @@ gradle-wrapper.jar
|
|||||||
/gradlew
|
/gradlew
|
||||||
/gradlew.bat
|
/gradlew.bat
|
||||||
/local.properties
|
/local.properties
|
||||||
|
/gradle.properties
|
||||||
GeneratedPluginRegistrant.java
|
GeneratedPluginRegistrant.java
|
||||||
gradle.properties
|
gradle.properties
|
||||||
|
|
||||||
|
@ -5,13 +5,17 @@
|
|||||||
<uses-permission android:name="android.permission.SEND_SMS" />
|
<uses-permission android:name="android.permission.SEND_SMS" />
|
||||||
<uses-permission android:name="android.permission.READ_BLOCKED_NUMBERS" />
|
<uses-permission android:name="android.permission.READ_BLOCKED_NUMBERS" />
|
||||||
<uses-permission android:name="android.permission.WRITE_BLOCKED_NUMBERS" />
|
<uses-permission android:name="android.permission.WRITE_BLOCKED_NUMBERS" />
|
||||||
|
<uses-permission android:name="android.permission.READ_CALL_LOG"/>
|
||||||
|
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
|
||||||
|
|
||||||
|
|
||||||
<application
|
<application
|
||||||
android:label="Icing Dialer"
|
android:label="Icing Dialer"
|
||||||
android:name="${applicationName}"
|
android:name="${applicationName}"
|
||||||
android:icon="@mipmap/ic_launcher"
|
android:icon="@mipmap/ic_launcher"
|
||||||
android:enableOnBackInvokedCallback="true">
|
android:enableOnBackInvokedCallback="true">
|
||||||
<activity
|
<activity
|
||||||
android:name=".MainActivity"
|
android:name=".activities.MainActivity"
|
||||||
android:exported="true"
|
android:exported="true"
|
||||||
android:launchMode="singleTop"
|
android:launchMode="singleTop"
|
||||||
android:taskAffinity=""
|
android:taskAffinity=""
|
||||||
|
@ -1,19 +0,0 @@
|
|||||||
package com.icing.dialer
|
|
||||||
|
|
||||||
import android.os.Bundle
|
|
||||||
import io.flutter.embedding.android.FlutterActivity
|
|
||||||
import io.flutter.embedding.engine.FlutterEngine
|
|
||||||
import io.flutter.plugin.common.MethodChannel
|
|
||||||
import com.icing.dialer.KeystoreHelper
|
|
||||||
|
|
||||||
class MainActivity: FlutterActivity() {
|
|
||||||
private val CHANNEL = "com.example.keystore"
|
|
||||||
|
|
||||||
override fun configureFlutterEngine(flutterEngine: FlutterEngine) {
|
|
||||||
super.configureFlutterEngine(flutterEngine)
|
|
||||||
MethodChannel(flutterEngine.dartExecutor.binaryMessenger, CHANNEL).setMethodCallHandler { call, result ->
|
|
||||||
// Delegate method calls to KeystoreHelper
|
|
||||||
KeystoreHelper(call, result).handleMethodCall()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -0,0 +1,94 @@
|
|||||||
|
package com.icing.dialer.activities
|
||||||
|
|
||||||
|
import android.database.Cursor
|
||||||
|
import android.os.Bundle
|
||||||
|
import android.provider.CallLog
|
||||||
|
import io.flutter.embedding.android.FlutterActivity
|
||||||
|
import io.flutter.embedding.engine.FlutterEngine
|
||||||
|
import io.flutter.plugin.common.MethodCall
|
||||||
|
import io.flutter.plugin.common.MethodChannel
|
||||||
|
import com.icing.dialer.KeystoreHelper
|
||||||
|
import com.icing.dialer.services.CallService
|
||||||
|
|
||||||
|
class MainActivity: FlutterActivity() {
|
||||||
|
// Existing channel for keystore operations.
|
||||||
|
private val KEYSTORE_CHANNEL = "com.example.keystore"
|
||||||
|
// New channel for call log access.
|
||||||
|
private val CALLLOG_CHANNEL = "com.example.calllog"
|
||||||
|
|
||||||
|
private val CALL_CHANNEL = "call_service"
|
||||||
|
|
||||||
|
override fun configureFlutterEngine(flutterEngine: FlutterEngine) {
|
||||||
|
super.configureFlutterEngine(flutterEngine)
|
||||||
|
|
||||||
|
// Call service channel
|
||||||
|
MethodChannel(flutterEngine.dartExecutor.binaryMessenger, CALL_CHANNEL).setMethodCallHandler { call, result ->
|
||||||
|
when (call.method) {
|
||||||
|
"makeGsmCall" -> {
|
||||||
|
val phoneNumber = call.argument<String>("phoneNumber")
|
||||||
|
if (phoneNumber != null) {
|
||||||
|
CallService.makeGsmCall(this, phoneNumber)
|
||||||
|
result.success("Calling $phoneNumber")
|
||||||
|
} else {
|
||||||
|
result.error("INVALID_PHONE_NUMBER", "Phone number is required", null)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
"hangUpCall" -> {
|
||||||
|
CallService.hangUpCall(this)
|
||||||
|
result.success("Call ended")
|
||||||
|
}
|
||||||
|
else -> result.notImplemented()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Set up the keystore channel.
|
||||||
|
MethodChannel(flutterEngine.dartExecutor.binaryMessenger, KEYSTORE_CHANNEL)
|
||||||
|
.setMethodCallHandler { call, result ->
|
||||||
|
// Delegate method calls to KeystoreHelper.
|
||||||
|
KeystoreHelper(call, result).handleMethodCall()
|
||||||
|
}
|
||||||
|
|
||||||
|
// Set up the call log channel.
|
||||||
|
MethodChannel(flutterEngine.dartExecutor.binaryMessenger, CALLLOG_CHANNEL)
|
||||||
|
.setMethodCallHandler { call, result ->
|
||||||
|
if (call.method == "getCallLogs") {
|
||||||
|
val callLogs = getCallLogs()
|
||||||
|
result.success(callLogs)
|
||||||
|
} else {
|
||||||
|
result.notImplemented()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Queries the Android call log and returns a list of maps.
|
||||||
|
* Each map contains keys: "number", "type", "date", and "duration".
|
||||||
|
*/
|
||||||
|
private fun getCallLogs(): List<Map<String, Any?>> {
|
||||||
|
val logsList = mutableListOf<Map<String, Any?>>()
|
||||||
|
val cursor: Cursor? = contentResolver.query(
|
||||||
|
CallLog.Calls.CONTENT_URI,
|
||||||
|
null,
|
||||||
|
null,
|
||||||
|
null,
|
||||||
|
CallLog.Calls.DATE + " DESC"
|
||||||
|
)
|
||||||
|
if (cursor != null) {
|
||||||
|
while (cursor.moveToNext()) {
|
||||||
|
val number = cursor.getString(cursor.getColumnIndexOrThrow(CallLog.Calls.NUMBER))
|
||||||
|
val type = cursor.getInt(cursor.getColumnIndexOrThrow(CallLog.Calls.TYPE))
|
||||||
|
val date = cursor.getLong(cursor.getColumnIndexOrThrow(CallLog.Calls.DATE))
|
||||||
|
val duration = cursor.getLong(cursor.getColumnIndexOrThrow(CallLog.Calls.DURATION))
|
||||||
|
|
||||||
|
val map = HashMap<String, Any?>()
|
||||||
|
map["number"] = number
|
||||||
|
map["type"] = type // Typically: 1 for incoming, 2 for outgoing, 3 for missed.
|
||||||
|
map["date"] = date
|
||||||
|
map["duration"] = duration
|
||||||
|
logsList.add(map)
|
||||||
|
}
|
||||||
|
cursor.close()
|
||||||
|
}
|
||||||
|
return logsList
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,30 @@
|
|||||||
|
package com.icing.dialer.services
|
||||||
|
|
||||||
|
import android.content.Context
|
||||||
|
import android.content.Intent
|
||||||
|
import android.net.Uri
|
||||||
|
import android.telecom.TelecomManager
|
||||||
|
import android.os.Build
|
||||||
|
import android.util.Log
|
||||||
|
|
||||||
|
object CallService {
|
||||||
|
|
||||||
|
fun makeGsmCall(context: Context, phoneNumber: String) {
|
||||||
|
try {
|
||||||
|
val intent = Intent(Intent.ACTION_CALL)
|
||||||
|
intent.data = Uri.parse("tel:$phoneNumber")
|
||||||
|
context.startActivity(intent)
|
||||||
|
} catch (e: Exception) {
|
||||||
|
Log.e("CallService", "Error making GSM call: ${e.message}")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fun hangUpCall(context: Context) {
|
||||||
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
|
||||||
|
val telecomManager = context.getSystemService(Context.TELECOM_SERVICE) as TelecomManager
|
||||||
|
telecomManager.endCall()
|
||||||
|
} else {
|
||||||
|
Log.e("CallService", "Hangup call is only supported on Android P or later.")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -2,4 +2,9 @@
|
|||||||
|
|
||||||
IMG=git.gmoker.com/icing/flutter:main
|
IMG=git.gmoker.com/icing/flutter:main
|
||||||
|
|
||||||
docker run --rm -v "$PWD:/app/" "$IMG" build apk
|
if [ "$1" == '-s' ]; then
|
||||||
|
OPT+=(--dart-define=STEALTH=true)
|
||||||
|
fi
|
||||||
|
|
||||||
|
set -x
|
||||||
|
docker run --rm -v "$PWD:/app/" "$IMG" build apk "${OPT[@]}"
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
// lib/pages/composition_page.dart
|
|
||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_contacts/flutter_contacts.dart';
|
import 'package:flutter_contacts/flutter_contacts.dart';
|
||||||
import 'package:url_launcher/url_launcher.dart';
|
import 'package:url_launcher/url_launcher.dart';
|
||||||
import '../../services/contact_service.dart';
|
import '../../services/contact_service.dart';
|
||||||
import '../../services/obfuscate_service.dart'; // Import ObfuscateService
|
import '../../services/obfuscate_service.dart'; // Import ObfuscateService
|
||||||
|
import '../../services/call_service.dart'; // Import the CallService
|
||||||
import '../contacts/widgets/add_contact_button.dart';
|
import '../contacts/widgets/add_contact_button.dart';
|
||||||
|
|
||||||
class CompositionPage extends StatefulWidget {
|
class CompositionPage extends StatefulWidget {
|
||||||
@ -23,6 +22,9 @@ class _CompositionPageState extends State<CompositionPage> {
|
|||||||
// Instantiate the ObfuscateService
|
// Instantiate the ObfuscateService
|
||||||
final ObfuscateService _obfuscateService = ObfuscateService();
|
final ObfuscateService _obfuscateService = ObfuscateService();
|
||||||
|
|
||||||
|
// Instantiate the CallService
|
||||||
|
final CallService _callService = CallService();
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
@ -71,13 +73,15 @@ class _CompositionPageState extends State<CompositionPage> {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// Function to call a contact's number
|
// Function to call a contact's number using the CallService
|
||||||
void _launchPhoneDialer(String phoneNumber) async {
|
void _makeCall(String phoneNumber) async {
|
||||||
final uri = Uri(scheme: 'tel', path: phoneNumber);
|
try {
|
||||||
if (await canLaunchUrl(uri)) {
|
await _callService.makeGsmCall(phoneNumber);
|
||||||
await launchUrl(uri);
|
setState(() {
|
||||||
} else {
|
dialedNumber = phoneNumber;
|
||||||
debugPrint('Could not launch $phoneNumber');
|
});
|
||||||
|
} catch (e) {
|
||||||
|
debugPrint("Error making call: $e");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -128,13 +132,13 @@ class _CompositionPageState extends State<CompositionPage> {
|
|||||||
trailing: Row(
|
trailing: Row(
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
children: [
|
||||||
// Call button
|
// Call button (Now using CallService)
|
||||||
IconButton(
|
IconButton(
|
||||||
icon: Icon(Icons.phone,
|
icon: Icon(Icons.phone,
|
||||||
color: Colors.green[300],
|
color: Colors.green[300],
|
||||||
size: 20),
|
size: 20),
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
_launchPhoneDialer(phoneNumber);
|
_makeCall(phoneNumber); // Make a call using CallService
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
// Message button
|
// Message button
|
||||||
|
@ -6,6 +6,7 @@ import 'package:dialer/widgets/username_color_generator.dart';
|
|||||||
import '../../../services/block_service.dart';
|
import '../../../services/block_service.dart';
|
||||||
import '../../../services/contact_service.dart';
|
import '../../../services/contact_service.dart';
|
||||||
import '../../../features/call/call_page.dart';
|
import '../../../features/call/call_page.dart';
|
||||||
|
import '../../../services/call_service.dart'; // Import CallService
|
||||||
|
|
||||||
class ContactModal extends StatefulWidget {
|
class ContactModal extends StatefulWidget {
|
||||||
final Contact contact;
|
final Contact contact;
|
||||||
@ -29,6 +30,7 @@ class _ContactModalState extends State<ContactModal> {
|
|||||||
late String phoneNumber;
|
late String phoneNumber;
|
||||||
bool isBlocked = false;
|
bool isBlocked = false;
|
||||||
final ObfuscateService _obfuscateService = ObfuscateService();
|
final ObfuscateService _obfuscateService = ObfuscateService();
|
||||||
|
final CallService _callService = CallService(); // Instantiate CallService
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
@ -259,9 +261,9 @@ class _ContactModalState extends State<ContactModal> {
|
|||||||
_obfuscateService.obfuscateData(phoneNumber),
|
_obfuscateService.obfuscateData(phoneNumber),
|
||||||
style: const TextStyle(color: Colors.white),
|
style: const TextStyle(color: Colors.white),
|
||||||
),
|
),
|
||||||
onTap: () {
|
onTap: () async {
|
||||||
if (widget.contact.phones.isNotEmpty) {
|
if (widget.contact.phones.isNotEmpty) {
|
||||||
_launchPhoneDialer(phoneNumber);
|
await _callService.makeGsmCall(phoneNumber);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLongPress: () {
|
onLongPress: () {
|
||||||
@ -342,12 +344,11 @@ class _ContactModalState extends State<ContactModal> {
|
|||||||
icon: Icon(
|
icon: Icon(
|
||||||
isBlocked ? Icons.block : Icons.block_flipped),
|
isBlocked ? Icons.block : Icons.block_flipped),
|
||||||
label: Text(isBlocked ? 'Unblock' : 'Block'),
|
label: Text(isBlocked ? 'Unblock' : 'Block'),
|
||||||
),
|
|
||||||
),
|
),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
||||||
const SizedBox(height: 16),
|
const SizedBox(height: 16),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
@ -1,13 +1,17 @@
|
|||||||
|
import 'dart:async';
|
||||||
import 'package:dialer/services/obfuscate_service.dart';
|
import 'package:dialer/services/obfuscate_service.dart';
|
||||||
import 'package:dialer/widgets/color_darkener.dart';
|
import 'package:dialer/widgets/color_darkener.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter/services.dart';
|
||||||
import 'package:flutter_contacts/flutter_contacts.dart';
|
import 'package:flutter_contacts/flutter_contacts.dart';
|
||||||
import 'package:intl/intl.dart';
|
import 'package:intl/intl.dart';
|
||||||
|
import 'package:permission_handler/permission_handler.dart';
|
||||||
import 'package:url_launcher/url_launcher.dart';
|
import 'package:url_launcher/url_launcher.dart';
|
||||||
import 'package:dialer/features/contacts/contact_state.dart';
|
import 'package:dialer/features/contacts/contact_state.dart';
|
||||||
import 'package:dialer/widgets/username_color_generator.dart';
|
import 'package:dialer/widgets/username_color_generator.dart';
|
||||||
import '../../services/block_service.dart';
|
import '../../services/block_service.dart';
|
||||||
import '../contacts/widgets/contact_modal.dart';
|
import '../contacts/widgets/contact_modal.dart';
|
||||||
|
import '../../services/call_service.dart';
|
||||||
|
|
||||||
class History {
|
class History {
|
||||||
final Contact contact;
|
final Contact contact;
|
||||||
@ -37,8 +41,11 @@ class _HistoryPageState extends State<HistoryPage>
|
|||||||
List<History> histories = [];
|
List<History> histories = [];
|
||||||
bool loading = true;
|
bool loading = true;
|
||||||
int? _expandedIndex;
|
int? _expandedIndex;
|
||||||
|
|
||||||
final ObfuscateService _obfuscateService = ObfuscateService();
|
final ObfuscateService _obfuscateService = ObfuscateService();
|
||||||
|
final CallService _callService = CallService();
|
||||||
|
|
||||||
|
// Create a MethodChannel instance.
|
||||||
|
static const MethodChannel _channel = MethodChannel('com.example.calllog');
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void didChangeDependencies() {
|
void didChangeDependencies() {
|
||||||
@ -51,19 +58,16 @@ class _HistoryPageState extends State<HistoryPage>
|
|||||||
Future<void> _refreshContacts() async {
|
Future<void> _refreshContacts() async {
|
||||||
final contactState = ContactState.of(context);
|
final contactState = ContactState.of(context);
|
||||||
try {
|
try {
|
||||||
// Refresh contacts or fetch them again
|
|
||||||
await contactState.fetchContacts();
|
await contactState.fetchContacts();
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
print('Error refreshing contacts: $e');
|
print('Error refreshing contacts: $e');
|
||||||
ScaffoldMessenger.of(context).showSnackBar(
|
ScaffoldMessenger.of(context)
|
||||||
SnackBar(content: Text('Failed to refresh contacts')),
|
.showSnackBar(SnackBar(content: Text('Failed to refresh contacts')));
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void _toggleFavorite(Contact contact) async {
|
void _toggleFavorite(Contact contact) async {
|
||||||
try {
|
try {
|
||||||
// Ensure you have the necessary permissions to fetch contact details
|
|
||||||
if (await FlutterContacts.requestPermission()) {
|
if (await FlutterContacts.requestPermission()) {
|
||||||
Contact? fullContact = await FlutterContacts.getContact(contact.id,
|
Contact? fullContact = await FlutterContacts.getContact(contact.id,
|
||||||
withProperties: true,
|
withProperties: true,
|
||||||
@ -75,22 +79,68 @@ class _HistoryPageState extends State<HistoryPage>
|
|||||||
fullContact.isStarred = !fullContact.isStarred;
|
fullContact.isStarred = !fullContact.isStarred;
|
||||||
await FlutterContacts.updateContact(fullContact);
|
await FlutterContacts.updateContact(fullContact);
|
||||||
}
|
}
|
||||||
await _refreshContacts(); // Refresh the contact list
|
await _refreshContacts();
|
||||||
} else {
|
} else {
|
||||||
print("Could not fetch contact details");
|
print("Could not fetch contact details");
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
print("Error updating favorite status: $e");
|
print("Error updating favorite status: $e");
|
||||||
ScaffoldMessenger.of(context).showSnackBar(
|
ScaffoldMessenger.of(context).showSnackBar(
|
||||||
SnackBar(content: Text('Failed to update contact favorite status')),
|
SnackBar(content: Text('Failed to update favorite status')));
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Helper: Remove all non-digit characters for simple matching.
|
||||||
|
String sanitizeNumber(String number) {
|
||||||
|
return number.replaceAll(RegExp(r'\D'), '');
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Helper: Find a contact from our list by matching phone numbers.
|
||||||
|
Contact? findContactForNumber(String number, List<Contact> contacts) {
|
||||||
|
final sanitized = sanitizeNumber(number);
|
||||||
|
for (var contact in contacts) {
|
||||||
|
for (var phone in contact.phones) {
|
||||||
|
if (sanitizeNumber(phone.number) == sanitized) {
|
||||||
|
return contact;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Request permission for reading call logs.
|
||||||
|
Future<bool> _requestCallLogPermission() async {
|
||||||
|
var status = await Permission.phone.status;
|
||||||
|
if (!status.isGranted) {
|
||||||
|
status = await Permission.phone.request();
|
||||||
|
}
|
||||||
|
return status.isGranted;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Build histories from the native call log using the method channel.
|
||||||
Future<void> _buildHistories() async {
|
Future<void> _buildHistories() async {
|
||||||
|
// Request permission.
|
||||||
|
bool hasPermission = await _requestCallLogPermission();
|
||||||
|
if (!hasPermission) {
|
||||||
|
ScaffoldMessenger.of(context).showSnackBar(
|
||||||
|
const SnackBar(content: Text('Call log permission not granted')));
|
||||||
|
setState(() {
|
||||||
|
loading = false;
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Retrieve call logs from native code.
|
||||||
|
List<dynamic> nativeLogs = [];
|
||||||
|
try {
|
||||||
|
nativeLogs = await _channel.invokeMethod('getCallLogs');
|
||||||
|
} on PlatformException catch (e) {
|
||||||
|
print("Error fetching call logs: ${e.message}");
|
||||||
|
}
|
||||||
|
|
||||||
|
// Ensure contacts are loaded.
|
||||||
final contactState = ContactState.of(context);
|
final contactState = ContactState.of(context);
|
||||||
if (contactState.loading) {
|
if (contactState.loading) {
|
||||||
// Wait for contacts to be loaded
|
|
||||||
await Future.doWhile(() async {
|
await Future.doWhile(() async {
|
||||||
await Future.delayed(const Duration(milliseconds: 100));
|
await Future.delayed(const Duration(milliseconds: 100));
|
||||||
return contactState.loading;
|
return contactState.loading;
|
||||||
@ -98,30 +148,67 @@ class _HistoryPageState extends State<HistoryPage>
|
|||||||
}
|
}
|
||||||
List<Contact> contacts = contactState.contacts;
|
List<Contact> contacts = contactState.contacts;
|
||||||
|
|
||||||
if (contacts.isEmpty) {
|
List<History> callHistories = [];
|
||||||
setState(() {
|
// Process each log entry.
|
||||||
loading = false;
|
for (var entry in nativeLogs) {
|
||||||
});
|
// Each entry is a Map with keys: number, type, date, duration.
|
||||||
return;
|
final String number = entry['number'] ?? '';
|
||||||
|
if (number.isEmpty) continue;
|
||||||
|
|
||||||
|
// Convert timestamp to DateTime.
|
||||||
|
DateTime callDate =
|
||||||
|
DateTime.fromMillisecondsSinceEpoch(entry['date'] ?? 0);
|
||||||
|
|
||||||
|
int typeInt = entry['type'] ?? 0;
|
||||||
|
int duration = entry['duration'] ?? 0;
|
||||||
|
String callType;
|
||||||
|
String callStatus;
|
||||||
|
|
||||||
|
// Map integer values to call type/status.
|
||||||
|
// Commonly: 1 = incoming, 2 = outgoing, 3 = missed.
|
||||||
|
switch (typeInt) {
|
||||||
|
case 1:
|
||||||
|
callType = "incoming";
|
||||||
|
callStatus = (duration == 0) ? "missed" : "answered";
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
callType = "outgoing";
|
||||||
|
callStatus = "answered";
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
callType = "incoming";
|
||||||
|
callStatus = "missed";
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
callType = "unknown";
|
||||||
|
callStatus = "unknown";
|
||||||
|
}
|
||||||
|
|
||||||
|
// Try to find a matching contact.
|
||||||
|
Contact? matchedContact = findContactForNumber(number, contacts);
|
||||||
|
if (matchedContact == null) {
|
||||||
|
// Create a dummy contact if not found.
|
||||||
|
matchedContact = Contact(
|
||||||
|
id: "dummy-$number",
|
||||||
|
displayName: number,
|
||||||
|
phones: [Phone(number)],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
callHistories
|
||||||
|
.add(History(matchedContact, callDate, callType, callStatus, 1));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Sort histories by most recent.
|
||||||
|
callHistories.sort((a, b) => b.date.compareTo(a.date));
|
||||||
|
|
||||||
setState(() {
|
setState(() {
|
||||||
histories = List.generate(
|
histories = callHistories;
|
||||||
contacts.length >= 10 ? 10 : contacts.length,
|
|
||||||
(index) => History(
|
|
||||||
contacts[index],
|
|
||||||
DateTime.now().subtract(Duration(hours: (index + 1) * 2)),
|
|
||||||
index % 2 == 0 ? 'outgoing' : 'incoming',
|
|
||||||
index % 3 == 0 ? 'missed' : 'answered',
|
|
||||||
index % 3 + 1,
|
|
||||||
),
|
|
||||||
);
|
|
||||||
loading = false;
|
loading = false;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
List _buildGroupedList(List<History> historyList) {
|
List _buildGroupedList(List<History> historyList) {
|
||||||
// Sort histories by date (most recent first)
|
|
||||||
historyList.sort((a, b) => b.date.compareTo(a.date));
|
historyList.sort((a, b) => b.date.compareTo(a.date));
|
||||||
|
|
||||||
final now = DateTime.now();
|
final now = DateTime.now();
|
||||||
@ -144,7 +231,6 @@ class _HistoryPageState extends State<HistoryPage>
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Combine them with headers
|
|
||||||
final items = <dynamic>[];
|
final items = <dynamic>[];
|
||||||
if (todayHistories.isNotEmpty) {
|
if (todayHistories.isNotEmpty) {
|
||||||
items.add('Today');
|
items.add('Today');
|
||||||
@ -162,6 +248,28 @@ class _HistoryPageState extends State<HistoryPage>
|
|||||||
return items;
|
return items;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Returns an icon reflecting call type and status.
|
||||||
|
Icon _getCallIcon(History history) {
|
||||||
|
IconData iconData;
|
||||||
|
Color iconColor;
|
||||||
|
if (history.callType == 'incoming') {
|
||||||
|
if (history.callStatus == 'missed') {
|
||||||
|
iconData = Icons.call_missed;
|
||||||
|
iconColor = Colors.red;
|
||||||
|
} else {
|
||||||
|
iconData = Icons.call_received;
|
||||||
|
iconColor = Colors.green;
|
||||||
|
}
|
||||||
|
} else if (history.callType == 'outgoing') {
|
||||||
|
iconData = Icons.call_made;
|
||||||
|
iconColor = Colors.green;
|
||||||
|
} else {
|
||||||
|
iconData = Icons.phone;
|
||||||
|
iconColor = Colors.white;
|
||||||
|
}
|
||||||
|
return Icon(iconData, color: iconColor);
|
||||||
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final contactState = ContactState.of(context);
|
final contactState = ContactState.of(context);
|
||||||
@ -169,9 +277,7 @@ class _HistoryPageState extends State<HistoryPage>
|
|||||||
if (loading || contactState.loading) {
|
if (loading || contactState.loading) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
backgroundColor: Colors.black,
|
backgroundColor: Colors.black,
|
||||||
body: const Center(
|
body: const Center(child: CircularProgressIndicator()),
|
||||||
child: CircularProgressIndicator(),
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -187,7 +293,6 @@ class _HistoryPageState extends State<HistoryPage>
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Filter missed calls
|
|
||||||
List<History> missedCalls =
|
List<History> missedCalls =
|
||||||
histories.where((h) => h.callStatus == 'missed').toList();
|
histories.where((h) => h.callStatus == 'missed').toList();
|
||||||
|
|
||||||
@ -213,9 +318,7 @@ class _HistoryPageState extends State<HistoryPage>
|
|||||||
),
|
),
|
||||||
body: TabBarView(
|
body: TabBarView(
|
||||||
children: [
|
children: [
|
||||||
// All Calls
|
|
||||||
_buildListView(allItems),
|
_buildListView(allItems),
|
||||||
// Missed Calls
|
|
||||||
_buildListView(missedItems),
|
_buildListView(missedItems),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
@ -228,9 +331,7 @@ class _HistoryPageState extends State<HistoryPage>
|
|||||||
itemCount: items.length,
|
itemCount: items.length,
|
||||||
itemBuilder: (context, index) {
|
itemBuilder: (context, index) {
|
||||||
final item = items[index];
|
final item = items[index];
|
||||||
|
|
||||||
if (item is String) {
|
if (item is String) {
|
||||||
// This is a header item
|
|
||||||
return Container(
|
return Container(
|
||||||
padding: const EdgeInsets.symmetric(vertical: 8, horizontal: 16),
|
padding: const EdgeInsets.symmetric(vertical: 8, horizontal: 16),
|
||||||
color: Colors.grey[900],
|
color: Colors.grey[900],
|
||||||
@ -246,16 +347,12 @@ class _HistoryPageState extends State<HistoryPage>
|
|||||||
final history = item;
|
final history = item;
|
||||||
final contact = history.contact;
|
final contact = history.contact;
|
||||||
final isExpanded = _expandedIndex == index;
|
final isExpanded = _expandedIndex == index;
|
||||||
|
|
||||||
// Generate the avatar color
|
|
||||||
Color avatarColor = generateColorFromName(contact.displayName);
|
Color avatarColor = generateColorFromName(contact.displayName);
|
||||||
|
|
||||||
return Column(
|
return Column(
|
||||||
children: [
|
children: [
|
||||||
ListTile(
|
ListTile(
|
||||||
leading: GestureDetector(
|
leading: GestureDetector(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
// When the profile picture is tapped, show the ContactModal
|
|
||||||
showModalBottomSheet(
|
showModalBottomSheet(
|
||||||
context: context,
|
context: context,
|
||||||
isScrollControlled: true,
|
isScrollControlled: true,
|
||||||
@ -306,12 +403,14 @@ class _HistoryPageState extends State<HistoryPage>
|
|||||||
style: const TextStyle(color: Colors.white),
|
style: const TextStyle(color: Colors.white),
|
||||||
),
|
),
|
||||||
subtitle: Text(
|
subtitle: Text(
|
||||||
'${history.callType} - ${history.callStatus} - ${DateFormat('MMM dd, hh:mm a').format(history.date)}',
|
DateFormat('MMM dd, hh:mm a').format(history.date),
|
||||||
style: const TextStyle(color: Colors.grey),
|
style: const TextStyle(color: Colors.grey),
|
||||||
),
|
),
|
||||||
trailing: Row(
|
trailing: Row(
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
children: [
|
||||||
|
_getCallIcon(history),
|
||||||
|
const SizedBox(width: 8),
|
||||||
Text(
|
Text(
|
||||||
'${history.attempts}x',
|
'${history.attempts}x',
|
||||||
style: const TextStyle(color: Colors.white),
|
style: const TextStyle(color: Colors.white),
|
||||||
@ -320,16 +419,7 @@ class _HistoryPageState extends State<HistoryPage>
|
|||||||
icon: const Icon(Icons.phone, color: Colors.green),
|
icon: const Icon(Icons.phone, color: Colors.green),
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
if (contact.phones.isNotEmpty) {
|
if (contact.phones.isNotEmpty) {
|
||||||
final Uri callUri = Uri(
|
_callService.makeGsmCall(contact.phones.first.number);
|
||||||
scheme: 'tel', path: contact.phones.first.number);
|
|
||||||
if (await canLaunchUrl(callUri)) {
|
|
||||||
await launchUrl(callUri);
|
|
||||||
} else {
|
|
||||||
ScaffoldMessenger.of(context).showSnackBar(
|
|
||||||
const SnackBar(
|
|
||||||
content: Text('Could not launch call')),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
ScaffoldMessenger.of(context).showSnackBar(
|
ScaffoldMessenger.of(context).showSnackBar(
|
||||||
const SnackBar(
|
const SnackBar(
|
||||||
@ -414,7 +504,6 @@ class _HistoryPageState extends State<HistoryPage>
|
|||||||
);
|
);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isBlocked) {
|
if (isBlocked) {
|
||||||
await BlockService().unblockNumber(phoneNumber);
|
await BlockService().unblockNumber(phoneNumber);
|
||||||
ScaffoldMessenger.of(context).showSnackBar(
|
ScaffoldMessenger.of(context).showSnackBar(
|
||||||
@ -428,7 +517,7 @@ class _HistoryPageState extends State<HistoryPage>
|
|||||||
content: Text('$phoneNumber blocked')),
|
content: Text('$phoneNumber blocked')),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
setState(() {}); // Refresh the button state
|
setState(() {});
|
||||||
},
|
},
|
||||||
icon: Icon(
|
icon: Icon(
|
||||||
isBlocked ? Icons.lock_open : Icons.block,
|
isBlocked ? Icons.lock_open : Icons.block,
|
||||||
@ -444,7 +533,6 @@ class _HistoryPageState extends State<HistoryPage>
|
|||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
return const SizedBox.shrink();
|
return const SizedBox.shrink();
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
@ -473,7 +561,7 @@ class CallDetailsPage extends StatelessWidget {
|
|||||||
padding: const EdgeInsets.all(16.0),
|
padding: const EdgeInsets.all(16.0),
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
// Display Contact Name and Thumbnail
|
// Display Contact Name and Thumbnail.
|
||||||
Row(
|
Row(
|
||||||
children: [
|
children: [
|
||||||
(contact.thumbnail != null && contact.thumbnail!.isNotEmpty)
|
(contact.thumbnail != null && contact.thumbnail!.isNotEmpty)
|
||||||
@ -504,8 +592,7 @@ class CallDetailsPage extends StatelessWidget {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
const SizedBox(height: 24),
|
const SizedBox(height: 24),
|
||||||
|
// Display call details.
|
||||||
// Display call type, status, date, attempts
|
|
||||||
DetailRow(
|
DetailRow(
|
||||||
label: 'Call Type:',
|
label: 'Call Type:',
|
||||||
value: history.callType,
|
value: history.callType,
|
||||||
@ -522,10 +609,7 @@ class CallDetailsPage extends StatelessWidget {
|
|||||||
label: 'Attempts:',
|
label: 'Attempts:',
|
||||||
value: '${history.attempts}',
|
value: '${history.attempts}',
|
||||||
),
|
),
|
||||||
|
|
||||||
const SizedBox(height: 24),
|
const SizedBox(height: 24),
|
||||||
|
|
||||||
// If you have more details like duration, contact number, etc.
|
|
||||||
if (contact.phones.isNotEmpty)
|
if (contact.phones.isNotEmpty)
|
||||||
DetailRow(
|
DetailRow(
|
||||||
label: 'Number:',
|
label: 'Number:',
|
||||||
|
@ -8,6 +8,7 @@ import 'package:flutter_contacts/flutter_contacts.dart';
|
|||||||
import 'package:dialer/features/settings/settings.dart';
|
import 'package:dialer/features/settings/settings.dart';
|
||||||
import '../../services/contact_service.dart';
|
import '../../services/contact_service.dart';
|
||||||
import 'package:dialer/features/voicemail/voicemail_page.dart';
|
import 'package:dialer/features/voicemail/voicemail_page.dart';
|
||||||
|
import '../contacts/widgets/contact_modal.dart';
|
||||||
|
|
||||||
|
|
||||||
class _MyHomePageState extends State<MyHomePage>
|
class _MyHomePageState extends State<MyHomePage>
|
||||||
@ -17,6 +18,8 @@ class _MyHomePageState extends State<MyHomePage>
|
|||||||
List<Contact> _contactSuggestions = [];
|
List<Contact> _contactSuggestions = [];
|
||||||
final ContactService _contactService = ContactService();
|
final ContactService _contactService = ContactService();
|
||||||
final ObfuscateService _obfuscateService = ObfuscateService();
|
final ObfuscateService _obfuscateService = ObfuscateService();
|
||||||
|
final TextEditingController _searchController = TextEditingController();
|
||||||
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
@ -32,12 +35,15 @@ class _MyHomePageState extends State<MyHomePage>
|
|||||||
setState(() {});
|
setState(() {});
|
||||||
}
|
}
|
||||||
|
|
||||||
void _onSearchChanged(String query) {
|
void _clearSearch() {
|
||||||
print("Search query: $query");
|
_searchController.clear();
|
||||||
|
_onSearchChanged('');
|
||||||
|
}
|
||||||
|
|
||||||
|
void _onSearchChanged(String query) {
|
||||||
setState(() {
|
setState(() {
|
||||||
if (query.isEmpty) {
|
if (query.isEmpty) {
|
||||||
_contactSuggestions = List.from(_allContacts);
|
_contactSuggestions = List.from(_allContacts); // Reset suggestions
|
||||||
} else {
|
} else {
|
||||||
_contactSuggestions = _allContacts.where((contact) {
|
_contactSuggestions = _allContacts.where((contact) {
|
||||||
return contact.displayName
|
return contact.displayName
|
||||||
@ -50,6 +56,7 @@ class _MyHomePageState extends State<MyHomePage>
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
void dispose() {
|
void dispose() {
|
||||||
|
_searchController.dispose();
|
||||||
_tabController.removeListener(_handleTabIndex);
|
_tabController.removeListener(_handleTabIndex);
|
||||||
_tabController.dispose();
|
_tabController.dispose();
|
||||||
super.dispose();
|
super.dispose();
|
||||||
@ -59,6 +66,34 @@ class _MyHomePageState extends State<MyHomePage>
|
|||||||
setState(() {});
|
setState(() {});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void _toggleFavorite(Contact contact) async {
|
||||||
|
try {
|
||||||
|
if (await FlutterContacts.requestPermission()) {
|
||||||
|
Contact? fullContact = await FlutterContacts.getContact(contact.id,
|
||||||
|
withProperties: true,
|
||||||
|
withAccounts: true,
|
||||||
|
withPhoto: true,
|
||||||
|
withThumbnail: true);
|
||||||
|
|
||||||
|
if (fullContact != null) {
|
||||||
|
fullContact.isStarred = !fullContact.isStarred;
|
||||||
|
await FlutterContacts.updateContact(fullContact);
|
||||||
|
setState(() {
|
||||||
|
// Updating the contact list after toggling the favorite
|
||||||
|
_fetchContacts();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
print("Could not fetch contact details");
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
print("Error updating favorite status: $e");
|
||||||
|
ScaffoldMessenger.of(context).showSnackBar(
|
||||||
|
SnackBar(content: Text('Failed to update contact favorite status')),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
@ -80,63 +115,109 @@ class _MyHomePageState extends State<MyHomePage>
|
|||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: const Color.fromARGB(255, 30, 30, 30),
|
color: const Color.fromARGB(255, 30, 30, 30),
|
||||||
borderRadius: BorderRadius.circular(12.0),
|
borderRadius: BorderRadius.circular(12.0),
|
||||||
border: Border(
|
border: Border.all(color: Colors.grey.shade800, width: 1),
|
||||||
top: BorderSide(color: Colors.grey.shade800, width: 1),
|
|
||||||
left: BorderSide(color: Colors.grey.shade800, width: 1),
|
|
||||||
right: BorderSide(color: Colors.grey.shade800, width: 1),
|
|
||||||
bottom:
|
|
||||||
BorderSide(color: Colors.grey.shade800, width: 2),
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
child: SearchAnchor(
|
child: SearchAnchor(
|
||||||
builder:
|
builder:
|
||||||
(BuildContext context, SearchController controller) {
|
(BuildContext context, SearchController controller) {
|
||||||
return SearchBar(
|
return GestureDetector(
|
||||||
controller: controller,
|
|
||||||
padding:
|
|
||||||
WidgetStateProperty.all<EdgeInsetsGeometry>(
|
|
||||||
const EdgeInsets.only(
|
|
||||||
top: 6.0,
|
|
||||||
bottom: 6.0,
|
|
||||||
left: 16.0,
|
|
||||||
right: 16.0,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
onTap: () {
|
onTap: () {
|
||||||
controller.openView();
|
controller.openView(); // Open the search view
|
||||||
_onSearchChanged('');
|
|
||||||
},
|
},
|
||||||
backgroundColor: WidgetStateProperty.all(
|
child: Container(
|
||||||
const Color.fromARGB(255, 30, 30, 30)),
|
decoration: BoxDecoration(
|
||||||
hintText: 'Search contacts',
|
color: const Color.fromARGB(255, 30, 30, 30),
|
||||||
hintStyle: WidgetStateProperty.all(
|
|
||||||
const TextStyle(color: Colors.grey, fontSize: 16.0),
|
|
||||||
),
|
|
||||||
leading: const Icon(
|
|
||||||
Icons.search,
|
|
||||||
color: Colors.grey,
|
|
||||||
size: 24.0,
|
|
||||||
),
|
|
||||||
shape:
|
|
||||||
WidgetStateProperty.all<RoundedRectangleBorder>(
|
|
||||||
RoundedRectangleBorder(
|
|
||||||
borderRadius: BorderRadius.circular(12.0),
|
borderRadius: BorderRadius.circular(12.0),
|
||||||
|
border: Border.all(
|
||||||
|
color: Colors.grey.shade800, width: 1),
|
||||||
|
),
|
||||||
|
padding: const EdgeInsets.symmetric(
|
||||||
|
vertical: 12.0, horizontal: 16.0),
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
const Icon(Icons.search,
|
||||||
|
color: Colors.grey, size: 24.0),
|
||||||
|
const SizedBox(width: 8.0),
|
||||||
|
Text(
|
||||||
|
_searchController.text.isEmpty
|
||||||
|
? 'Search contacts'
|
||||||
|
: _searchController.text,
|
||||||
|
style: const TextStyle(
|
||||||
|
color: Colors.grey, fontSize: 16.0),
|
||||||
|
),
|
||||||
|
const Spacer(),
|
||||||
|
if (_searchController.text.isNotEmpty)
|
||||||
|
GestureDetector(
|
||||||
|
onTap: _clearSearch,
|
||||||
|
child: const Icon(
|
||||||
|
Icons.clear,
|
||||||
|
color: Colors.grey,
|
||||||
|
size: 24.0,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
viewOnChanged: (query) {
|
viewOnChanged: (query) {
|
||||||
_onSearchChanged(query);
|
_onSearchChanged(query); // Update immediately
|
||||||
},
|
},
|
||||||
suggestionsBuilder:
|
suggestionsBuilder:
|
||||||
(BuildContext context, SearchController controller) {
|
(BuildContext context, SearchController controller) {
|
||||||
return _contactSuggestions.map((contact) {
|
return _contactSuggestions.map((contact) {
|
||||||
return ListTile(
|
return ListTile(
|
||||||
key: ValueKey(contact.id),
|
key: ValueKey(contact.id),
|
||||||
title: Text(_obfuscateService.obfuscateData(contact.displayName),
|
title: Text(_obfuscateService.obfuscateData(contact.displayName),
|
||||||
style: const TextStyle(color: Colors.white)),
|
style: const TextStyle(color: Colors.white)),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
|
// Clear the search text input
|
||||||
|
controller.text = '';
|
||||||
|
|
||||||
|
// Close the search view
|
||||||
controller.closeView(contact.displayName);
|
controller.closeView(contact.displayName);
|
||||||
|
|
||||||
|
// Show the ContactModal when a contact is tapped
|
||||||
|
showModalBottomSheet(
|
||||||
|
context: context,
|
||||||
|
isScrollControlled: true,
|
||||||
|
backgroundColor: Colors.transparent,
|
||||||
|
builder: (context) {
|
||||||
|
return ContactModal(
|
||||||
|
contact: contact,
|
||||||
|
onEdit: () async {
|
||||||
|
if (await FlutterContacts
|
||||||
|
.requestPermission()) {
|
||||||
|
final updatedContact =
|
||||||
|
await FlutterContacts
|
||||||
|
.openExternalEdit(contact.id);
|
||||||
|
if (updatedContact != null) {
|
||||||
|
_fetchContacts();
|
||||||
|
Navigator.of(context).pop();
|
||||||
|
ScaffoldMessenger.of(context)
|
||||||
|
.showSnackBar(
|
||||||
|
SnackBar(
|
||||||
|
content: Text(
|
||||||
|
'${contact.displayName} updated successfully!'),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
ScaffoldMessenger.of(context)
|
||||||
|
.showSnackBar(
|
||||||
|
SnackBar(
|
||||||
|
content: Text(
|
||||||
|
'Edit canceled or failed.'),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onToggleFavorite: () =>
|
||||||
|
_toggleFavorite(contact),
|
||||||
|
isFavorite: contact.isStarred,
|
||||||
|
);
|
||||||
|
},
|
||||||
|
);
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}).toList();
|
}).toList();
|
||||||
|
26
dialer/lib/services/call_service.dart
Normal file
26
dialer/lib/services/call_service.dart
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
import 'package:flutter/services.dart';
|
||||||
|
|
||||||
|
// Service to manage call-related operations
|
||||||
|
class CallService {
|
||||||
|
static const MethodChannel _channel = MethodChannel('call_service');
|
||||||
|
|
||||||
|
// Function to make a GSM call
|
||||||
|
Future<void> makeGsmCall(String phoneNumber) async {
|
||||||
|
try {
|
||||||
|
await _channel.invokeMethod('makeGsmCall', {"phoneNumber": phoneNumber});
|
||||||
|
} catch (e) {
|
||||||
|
print("Error making call: $e");
|
||||||
|
rethrow;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Function to hang up the current call
|
||||||
|
Future<void> hangUpCall() async {
|
||||||
|
try {
|
||||||
|
await _channel.invokeMethod('hangUpCall');
|
||||||
|
} catch (e) {
|
||||||
|
print("Error hanging up call: $e");
|
||||||
|
rethrow;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -56,6 +56,8 @@ dependencies:
|
|||||||
uuid: ^4.5.1
|
uuid: ^4.5.1
|
||||||
provider: ^6.1.2
|
provider: ^6.1.2
|
||||||
|
|
||||||
|
intl: any
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
flutter_test:
|
flutter_test:
|
||||||
sdk: flutter
|
sdk: flutter
|
||||||
|
@ -2,4 +2,9 @@
|
|||||||
|
|
||||||
IMG=git.gmoker.com/icing/flutter:main
|
IMG=git.gmoker.com/icing/flutter:main
|
||||||
|
|
||||||
docker run --rm -p 5037:5037 -v "$PWD:/app/" "$IMG" run
|
if [ "$1" == '-s' ]; then
|
||||||
|
OPT+=(--dart-define=STEALTH=true)
|
||||||
|
fi
|
||||||
|
|
||||||
|
set -x
|
||||||
|
docker run --rm -p 5037:5037 -v "$PWD:/app/" "$IMG" run "${OPTS[@]}"
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
echo "Running Icing Dialer in STEALTH mode..."
|
echo "Running Icing Dialer in STEALTH mode..."
|
||||||
flutter run --dart-define=STEALTH=true
|
flutter run --dart-define=STEALTH=true
|
||||||
|
@ -1,90 +0,0 @@
|
|||||||
---
|
|
||||||
marp: true
|
|
||||||
_class: lead
|
|
||||||
paginate: true
|
|
||||||
---
|
|
||||||
<!-- theme: uncover -->
|
|
||||||
<!-- class: invert -->
|
|
||||||
|
|
||||||
# Icing
|
|
||||||
|
|
||||||
#### Epitech Inovative Project
|
|
||||||
|
|
||||||
##### https://git.gmoker.com/icing
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
**Florian** Griffon
|
|
||||||
|
|
||||||
**Bartosz** Michalak
|
|
||||||
|
|
||||||
**Ange** Duhayon
|
|
||||||
|
|
||||||
**Alexis** Danlos
|
|
||||||
|
|
||||||
**Stéphane** Corbière
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
# :phone: :man:
|
|
||||||
|
|
|
||||||
|
|
|
||||||
:smiling_imp:
|
|
||||||
|
|
|
||||||
|
|
|
||||||
# :phone: :woman:
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
# :phone: :man:
|
|
||||||
**|** | **|**
|
|
||||||
**|** | **|**
|
|
||||||
**|** | **|** :imp:
|
|
||||||
**|** | **|**
|
|
||||||
**|** | **|**
|
|
||||||
# :phone: :woman:
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Un client téléphonique comme un autre
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## L'utilisateur est le maître de sa sécurité
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### Partage de contacts par QR codes
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Intégration harmonieuse d'un chiffrement automatique
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### Protection d'appel téléphoniques =
|
|
||||||
|
|
||||||
##### :white_check_mark: Conservation de vie privée
|
|
||||||
##### :white_check_mark: Protection de données sensibles
|
|
||||||
##### :white_check_mark: Protection d'authentification
|
|
||||||
##### :white_check_mark: Protection de la messagerie
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## **Icing Dialer**
|
|
||||||
|
|
||||||
### =
|
|
||||||
|
|
||||||
### **Icing protocol**
|
|
||||||
|
|
||||||
**+**
|
|
||||||
|
|
||||||
### **Dialer**
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Icing est un **outil**, pas un produit
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
# Merci
|
|
BIN
docs/Pitch.pdf
BIN
docs/Pitch.pdf
Binary file not shown.
7831
docs/Projet Icing GONOGO.pdf
Normal file
7831
docs/Projet Icing GONOGO.pdf
Normal file
File diff suppressed because it is too large
Load Diff
245
docs/beta_test_plan.md
Normal file
245
docs/beta_test_plan.md
Normal file
@ -0,0 +1,245 @@
|
|||||||
|
# Beta Test Plan
|
||||||
|
|
||||||
|
## Core Functionalities
|
||||||
|
|
||||||
|
---
|
||||||
|
### Action Plan review:
|
||||||
|
|
||||||
|
In our previous Action Plan, we listed the following functionnal specifications:
|
||||||
|
- Phone call encryption between two known pairs, that exchanged keys in person. *Mandatory*
|
||||||
|
- Phone dialer that is discret and functional, and should not disturb a normal use (clear phone call). *Mandatory*
|
||||||
|
- Phone call encryption between two unknown pairs, with key exchange on the go. Optional.
|
||||||
|
- SMS encryption between two known pairs (in person key exchange). Optional.
|
||||||
|
|
||||||
|
We now retain only the two first functional specifications.
|
||||||
|
|
||||||
|
### Core Functionalities
|
||||||
|
|
||||||
|
Based on this review, here are all the core functionnalities we set:
|
||||||
|
|
||||||
|
#### Icing protocol
|
||||||
|
- Advanced protocol documentation, paving the way for a full RFC.
|
||||||
|
|
||||||
|
The protocol definition will include as completed:
|
||||||
|
- Peer ping
|
||||||
|
- Ephemeral key gestion
|
||||||
|
- Perfect Forward Secrecy
|
||||||
|
- Handshakes
|
||||||
|
- Real-time data-stream encryption (and decryption)
|
||||||
|
- Encrypted stream compression
|
||||||
|
- Transmission over audio stream
|
||||||
|
- Minimal error correction in audio-based transmission
|
||||||
|
- Error handling and user prevention
|
||||||
|
|
||||||
|
And should include prototype or scratches functionalities, among which:
|
||||||
|
- Embedded silent data transmission (silently transmit light data during an encrypted phone call)
|
||||||
|
- On-the-fly key exchange (does not require prior key exchange, sacrifying some security)
|
||||||
|
- Strong error correction
|
||||||
|
|
||||||
|
#### The Icing dialer (based on Icing kotlin library, an Icing protocol implementation)
|
||||||
|
|
||||||
|
The Icing dialer should be a fully transparent and almost undistinguishable smartphone dialer.
|
||||||
|
Any Icing-unaware user should be able to use the dialer smoothly to make calls to anyone.
|
||||||
|
The dialer should propose a full set of functionnalities to handle its Icing protocol implementation.
|
||||||
|
|
||||||
|
Here is the list of all the functionnalities our dialer will integrate:
|
||||||
|
|
||||||
|
- Call
|
||||||
|
- Ringtone on incoming call
|
||||||
|
- Incoming and ongoing call notification
|
||||||
|
- Complete dialer with all numbers, star *, pound #
|
||||||
|
- Mute button
|
||||||
|
- Speaker button
|
||||||
|
- Normal call
|
||||||
|
- DTMF transmission
|
||||||
|
- SIM choice on call
|
||||||
|
|
||||||
|
- Encrypted Call
|
||||||
|
- Encrypted call if pair public key is known
|
||||||
|
- Encrypted DTMF transmission
|
||||||
|
- Data rate indicator
|
||||||
|
- Data error indicator
|
||||||
|
- Disable encryption button
|
||||||
|
|
||||||
|
- Call history
|
||||||
|
- Call details (timedate, duration, ring number)
|
||||||
|
- Missed calls filter
|
||||||
|
- Outgoing calls filter
|
||||||
|
- Incoming calls filter
|
||||||
|
- Call back function
|
||||||
|
- Contact modal on history tap
|
||||||
|
- Block call number
|
||||||
|
|
||||||
|
- Contacts
|
||||||
|
- Sorted contact listing
|
||||||
|
- Contact creation / editing buttons
|
||||||
|
- Contact sharing via QR code / VCF
|
||||||
|
- Contact search bar (application wide)
|
||||||
|
- Favorite contacts
|
||||||
|
- Contact preview (picture, number, public key...)
|
||||||
|
|
||||||
|
- Visual voicemail
|
||||||
|
- Play / Pause
|
||||||
|
- Notification
|
||||||
|
- Quick link to call, text, block, share number...
|
||||||
|
|
||||||
|
- Miscellanous
|
||||||
|
- Settings menu
|
||||||
|
- Version number
|
||||||
|
- Storage of user public keys
|
||||||
|
- Blocklist gestion (list / add / del / search)
|
||||||
|
- Default SIM choice
|
||||||
|
|
||||||
|
- Asymetric Keys
|
||||||
|
- Secure storage
|
||||||
|
- Generation at startup if missing
|
||||||
|
- Full key management (list / add / del / search / share)
|
||||||
|
- Secure generation (Android Keystore generation)
|
||||||
|
- Insecure generation (RAM generation)
|
||||||
|
- Exportation on creation (implies insecure generation)
|
||||||
|
- Importation
|
||||||
|
- Trust shift (shift trust from contacts)
|
||||||
|
|
||||||
|
|
||||||
|
## Beta Testing Scenarios
|
||||||
|
- Clear call from Icing dialer to another dialer (Google, Apple...)
|
||||||
|
- Clear call from Icing dialer to another Icing dialer
|
||||||
|
- Clear call from Icing dialer to an icing pubkey-known contact but without Icing dialer
|
||||||
|
- Encrypted call from Icing dialer to a known contact with Icing dialer
|
||||||
|
- Encrypted call from Icing dialer to an unknown contact with Icing dialer
|
||||||
|
- Create / Edit / Save contact with(out) public key
|
||||||
|
- Share contact as QR code / Vcard
|
||||||
|
- Import contact from QR code / Vcard
|
||||||
|
- Listen to voicemail
|
||||||
|
- Record encrypted call and check the encryption
|
||||||
|
- Change default SIM
|
||||||
|
|
||||||
|
## User Journeys
|
||||||
|
|
||||||
|
Mathilda, 34 years-old, connects to her PayPal account from a new device.
|
||||||
|
To authenticate herself, PayPal sends her a code on her voicemail.
|
||||||
|
Mathilda being aware of the risks of this technology, she has set up strong Icing authentication with her network provider by registering a pair of her Icing public keys.
|
||||||
|
When she calls her voicemail, Icing protocol is triggered and checks for her key authentication ;
|
||||||
|
it will fail if the caller does not pocesses the required Icing keys.
|
||||||
|
Mathilda is thus the only one granted access, and she can retreive her PayPal code securely.
|
||||||
|
|
||||||
|
Jeff, 70 years-old, calls his bank after he had a problem on his bank app.
|
||||||
|
The remote bank advisor asks him to authenticate, making him type his password on the phone dialer.
|
||||||
|
By using the Icing protocol, not only would Jeff and the bank be assured that the informations are transmitted safely,
|
||||||
|
but also that the call is coming from Jeff's phone and not an impersonator.
|
||||||
|
|
||||||
|
Elise is a 42 years-old extreme reporter.
|
||||||
|
After interviewing Russians opposition's leader, the FSB is looking to interview her.
|
||||||
|
She tries to stay discreet and hidden, but those measures constrains her to barely receive cellular network.
|
||||||
|
She suspects her phone line to be monitored, so the best she can do to call safely, is to use her Icing dialer.
|
||||||
|
|
||||||
|
Paul, a 22 years-old developer working for a big company, decides to go to China for vacations.
|
||||||
|
But everything goes wrong! The company's product he works on, is failling in the middle of the day and no one is
|
||||||
|
qualified to fix it. Paul doesn't have WiFi and his phone plan only covers voice calls in China.
|
||||||
|
With Icing dialer, he can call his collegues and help fix the
|
||||||
|
problem, safe from potential Chinese spies.
|
||||||
|
|
||||||
|
## Evaluation Criteria
|
||||||
|
### Protocol and lib
|
||||||
|
1. Security
|
||||||
|
- Encryption Strength: Ensure that the encryption algorithms used (AES-256, ECC)
|
||||||
|
are up-to-date and secure.
|
||||||
|
- Key Management: Evaluate the mechanism for generating, distributing, and
|
||||||
|
storing encryption keys (P-256 keys, ECDH).
|
||||||
|
- Forward Secrecy: Confirm that the protocol supports forward secrecy, meaning
|
||||||
|
that session keys are discarded after use to prevent future decryption of
|
||||||
|
past communication, and that future sessions are salted with a pseudo-random salt
|
||||||
|
resulting or derived from the past calls.
|
||||||
|
- End-to-End Encryption Integrity: Verify that no clear data is exposed
|
||||||
|
outside the encryption boundary (client-side only).
|
||||||
|
- Replay Protection: Ensure that the protocol includes strong mechanisms to prevent replay
|
||||||
|
attacks.
|
||||||
|
|
||||||
|
2. Performance
|
||||||
|
- Latency: Measure the round-trip time (RTT) for call setup and audio quality
|
||||||
|
during the call. The system should aim for the lowes latency possible.
|
||||||
|
- Bandwidth Efficiency: Evaluate the protocol’s ability to optimize bandwidth
|
||||||
|
usage while maintaining acceptable audio quality.
|
||||||
|
- Audio Quality: Assess the audio quality during calls, including clarity,
|
||||||
|
consistency, and minimal distortion.
|
||||||
|
|
||||||
|
3. Usability
|
||||||
|
- Ease of Integration: Evaluate how easy it is to integrate the library into an
|
||||||
|
Android application, including the availability of well-documented APIs and
|
||||||
|
clear examples.
|
||||||
|
- Seamless User Experience: Check for smooth call initiation, handling of
|
||||||
|
dropped calls, and reconnection strategies. The app should handle background
|
||||||
|
operation gracefully.
|
||||||
|
- UI/UX Design: Assess the user interface (UI) of the Android dialer for intuitiveness,
|
||||||
|
accessibility, and if it could be a drop-in replacement for the original dialer.
|
||||||
|
- Error Handling and Recovery: Evaluate how the system handles unexpected
|
||||||
|
errors (e.g., network issues, connection drops) and recovers from them.
|
||||||
|
|
||||||
|
4. Interoperability
|
||||||
|
- Support for Multiple Protocols: Verify if the protocol can
|
||||||
|
integrate with existing standards (e.g., SIP, WebRTC) for interoperability
|
||||||
|
with other services.
|
||||||
|
- Cross-device Compatibility: Ensure that calls encryption can be initiated and received
|
||||||
|
across different devices, operating systems, and network conditions.
|
||||||
|
- Backward Compatibility: Test whether the protocol is backward compatible.
|
||||||
|
|
||||||
|
5. Privacy
|
||||||
|
- Data Storage: Evaluate how the system stores any data (user details, identities).
|
||||||
|
Ensure that sensitive information is encrypted.
|
||||||
|
- Data Minimization: Ensure that only the minimum necessary data is used
|
||||||
|
for the protocol to function.
|
||||||
|
- No Call Metadata Storage: Ensure that no metadata (e.g., call logs, duration,
|
||||||
|
timestamps) is stored unless necessary, and, if stored, it should be
|
||||||
|
encrypted.
|
||||||
|
|
||||||
|
6. Maintainability
|
||||||
|
- Code Quality: Review the library for clarity, readability, and
|
||||||
|
maintainability of the code. It should be modular and well-documented.
|
||||||
|
- Documentation: Ensure that the protocol and library come with thorough
|
||||||
|
documentation, including how-to guides and troubleshooting resources.
|
||||||
|
- Active Development and Community: Check the active development of the
|
||||||
|
protocol and library (open-source contributions, GitHub repository activity).
|
||||||
|
|
||||||
|
### Dialer
|
||||||
|
1. User Interface
|
||||||
|
- Design and Layout: Ensure that the dialer interface is simple, intuitive, and
|
||||||
|
easy to navigate. Buttons should be appropriately sized, and layout should
|
||||||
|
prioritize accessibility.
|
||||||
|
- Dialer Search and History: Ensure there’s an efficient contact search,
|
||||||
|
history logging, and favorites integration.
|
||||||
|
- Visual Feedback: Verify that the app most usefull buttons provides visual feedback for actions,
|
||||||
|
such as dialling, calls available interactions for example.
|
||||||
|
|
||||||
|
2. Call Management
|
||||||
|
- Call Initiation: Test the ease of initiating a call from contact list, recent
|
||||||
|
call logs, contact search or direct number input.
|
||||||
|
- Incoming Call Handling: Verify the visual and audio prompts when receiving
|
||||||
|
calls, including notifications for missed calls.
|
||||||
|
- Call Hold/Transfer/Forward: Ensure the dialer supports call hold, transfer,
|
||||||
|
and forwarding features.
|
||||||
|
- Audio Controls: Check whether the app allows users to adjust speaker volume,
|
||||||
|
mute, and switch between earpiece/speakerphone.
|
||||||
|
|
||||||
|
3. Integration with System Features
|
||||||
|
- Permissions: Ensure the app requests and manages necessary permissions
|
||||||
|
(microphone, camera for scanning QR codes, contacts, call history, local storage).
|
||||||
|
- Integration with Contacts: Ensure that the app seamlessly integrates with the
|
||||||
|
Android contacts and syncs correctly with the address book.
|
||||||
|
- Notifications: Ensure that call notifications and ringtone works even when the app is in
|
||||||
|
the background or the phone is locked.
|
||||||
|
|
||||||
|
4. Resource Management
|
||||||
|
- Resource Efficiency: Ensure the app doesn’t excessively consume CPU or memory
|
||||||
|
while operating, during idle times or on call.
|
||||||
|
|
||||||
|
5. Security and Privacy
|
||||||
|
- App Encryption: Ensure that any stored and sensitive data is
|
||||||
|
encrypted, or protected.
|
||||||
|
- Secure Call Handling: Verify that calls are handled securely through the
|
||||||
|
encrypted voice protocol.
|
||||||
|
- Minimal Permissions: The app should ask for the least amount of permissions
|
||||||
|
necessary to function.
|
||||||
|
|
||||||
|
6. Reliability
|
||||||
|
- Crash Resistance: Test for the app’s stability, ensuring it doesn't crash or
|
||||||
|
freeze during use.
|
@ -1,6 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
IMG=docker.io/marpteam/marp-cli:latest
|
|
||||||
|
|
||||||
docker run --rm -v "$PWD:/home/marp/app/" --entrypoint marp-cli.js "$IMG" \
|
|
||||||
./Pitch.md --pdf
|
|
62
docs/non-functional_delivrables.md
Normal file
62
docs/non-functional_delivrables.md
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
# Project Deliverables
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Common
|
||||||
|
|
||||||
|
### Develop and retain a user community
|
||||||
|
|
||||||
|
We plan to create a user community where users can share their experiences with the project and provide feedback on some social platforms such as Telegram, Discord, or Matrix.
|
||||||
|
|
||||||
|
The goal is to promote our project in different open-source and security and privacy-focused communities to gather experienced users capable of interesting feedbacks.
|
||||||
|
|
||||||
|
As we do not focus on selling a product to anyone, but rather to develop an open-source protocol, user retention is not a priority, and it will be more of a KPI of the project's pertinence than a goal; this means we will focus on listening and taking into account good feedback rather than publishing funny posts on social media.
|
||||||
|
|
||||||
|
### Work on user experience
|
||||||
|
|
||||||
|
We will work on making the dialer user-friendly and easy to use.
|
||||||
|
|
||||||
|
We are confident in our current UX development path, and user feedback will be taken into account.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Specifications
|
||||||
|
|
||||||
|
### Enhance credibility and grow project's reputation
|
||||||
|
|
||||||
|
- **Transparent Development:**
|
||||||
|
Maintain a public roadmap and changelog to document every update and decision during the project's lifecycle.
|
||||||
|
|
||||||
|
- **Security Audits:**
|
||||||
|
We will rely on our automatic tests and community experts to have organic and constant auditing.
|
||||||
|
|
||||||
|
- **Community Engagement:**
|
||||||
|
Actively involve our user community in discussions, bug reports, and feature requests. Regularly update the community on progress and upcoming changes.
|
||||||
|
|
||||||
|
- **Open Source Best Practices:**
|
||||||
|
Adhere to industry-standard coding practices, thorough documentation, and continuous integration/deployment pipelines to ensure high-quality, maintainable code.
|
||||||
|
|
||||||
|
- **Visibility in Key Forums:**
|
||||||
|
Present and share our work in open-source, cybersecurity, and privacy-focused conferences and events to enhance credibility and attract constructive feedback.
|
||||||
|
|
||||||
|
### optimize relationships with the target audience
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Establish strategic partnership
|
||||||
|
|
||||||
|
- **Academic Collaborations:**
|
||||||
|
Partner with academic institutions for research initiatives and validation of our protocol, leveraging their expertise for further improvements.
|
||||||
|
|
||||||
|
- **Industry Alliances:**
|
||||||
|
Seek partnerships with established players in the open-source software industry to benefit from their wide community coverage, such as AOSP / GrapheneOS / LineageOS.
|
||||||
|
|
||||||
|
- **Integration Opportunities:**
|
||||||
|
Explore collaborations with mobile operating systems (e.g., AOSP) and VoIP providers to integrate Icing into existing communication infrastructures.
|
||||||
|
|
||||||
|
- **Joint Innovation Projects:**
|
||||||
|
Engage in co-development efforts that align with our mission, ensuring that both parties contribute to and benefit from technological advancements.
|
||||||
|
|
||||||
|
- **Funding and Support:**
|
||||||
|
Identify and pursue grants, sponsorships, and research funding that align with the project's objectives, ensuring sustainable development.
|
||||||
|
|
@ -2,4 +2,4 @@
|
|||||||
|
|
||||||
branch="$(git describe --contains --all HEAD)"
|
branch="$(git describe --contains --all HEAD)"
|
||||||
|
|
||||||
xdg-open "https://$branch.g-eip-700-tls-7-1-eip-stephane.corbiere.icing.k8s.gmoker.com"
|
xdg-open "https://$branch.monorepo.icing.k8s.gmoker.com"
|
||||||
|
Loading…
Reference in New Issue
Block a user