Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 34 additions & 8 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -66,19 +66,45 @@
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="lnurlc" />
</intent-filter>
<!-- LaChispa specific scheme -->
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="lachispa" />
</intent-filter>
</activity>
<!-- LaChispa specific scheme -->
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="lachispa" />
</intent-filter>
<!-- NFC: capturar tags cuando la app está en foreground -->
<intent-filter>
<action android:name="android.nfc.action.NDEF_DISCOVERED"/>
<category android:name="android.intent.category.DEFAULT"/>
<data android:mimeType="text/plain"/>
</intent-filter>
<intent-filter>
<action android:name="android.nfc.action.TECH_DISCOVERED"/>
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
</activity>
<!-- Meta-data para TECH_DISCOVERED -->
<meta-data
android:name="android.nfc.action.TECH_DISCOVERED"
android:resource="@xml/nfc_tech_filter"/>
<!-- Don't delete the meta-data below.
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
<meta-data
android:name="flutterEmbedding"
android:value="2" />
<!-- HCE Service for flutter_nfc_hce -->
<service
android:name="com.novice.flutter_nfc_hce.KHostApduService"
android:exported="true"
android:permission="android.permission.BIND_NFC_SERVICE">
<intent-filter>
<action android:name="android.nfc.cardemulation.action.HOST_APDU_SERVICE" />
</intent-filter>
<meta-data
android:name="android.nfc.cardemulation.host_apdu_service"
android:resource="@xml/apduservice" />
</service>
</application>
<!-- Required to query activities that can process text, see:
https://developer.android.com/training/package-visibility and
Expand Down
5 changes: 5 additions & 0 deletions android/app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<resources>
<string name="app_name">LaChispa</string>
<string name="hce_service_description">LaChispa HCE Service</string>
<string name="hce_aid_group">LaChispa AID Group</string>
</resources>
7 changes: 7 additions & 0 deletions android/app/src/main/res/xml/apduservice.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<host-apdu-service xmlns:android="http://schemas.android.com/apk/res/android"
android:description="@string/hce_service_description"
android:requireDeviceUnlock="true">
<aid-group android:description="@string/hce_aid_group" android:category="other">
<aid-filter android:name="D2760000850101" />
</aid-group>
</host-apdu-service>
8 changes: 8 additions & 0 deletions android/app/src/main/res/xml/nfc_tech_filter.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<resources xmlns:xliff="urn:ibm:xmlns:xml:ns:xliff">
<tech-list>
<tech>android.nfc.tech.IsoDep</tech>
</tech-list>
<tech-list>
<tech>android.nfc.tech.Ndef</tech>
</tech-list>
</resources>
11 changes: 11 additions & 0 deletions lib/l10n/app_de.arb
Original file line number Diff line number Diff line change
Expand Up @@ -370,12 +370,23 @@
"nfc_unavailable_message": "NFC auf diesem Gerät nicht verfügbar",
"nfc_scanning_title": "Mit NFC einziehen",
"nfc_scanning_message": "Halten Sie die Boltcard an das Telefon",
"nfc_hce_message": "Halten Sie das Gerät des Zahlers an",
"nfc_charging_message": "Wird belastet...",
"nfc_invalid_tag_message": "Ungültiges Tag oder keine Boltcard",
"nfc_charge_error_prefix": "NFC-Fehler beim Einziehen: ",
"nfc_charge_unknown_error": "Unbekannter Fehler beim Einziehen",
"share_ready_message": "Bereit zum Teilen",
"lnurl_copied_message": "LNURL in die Zwischenablage kopiert",
"nfc_mode_title": "NFC-Modus",
"nfc_mode_boltcard": "BoltCard abbuchen",
"nfc_mode_boltcard_subtitle": "Karte lesen und Rechnung einziehen",
"nfc_mode_hce": "HCE emulieren",
"nfc_mode_hce_subtitle": "Telefon als Karte",
"nfc_tag_not_compatible": "Tag nicht kompatibel",
"nfc_not_boltcard": "Keine Boltcard",
"nfc_incomplete_data": "Unvollständige Daten",
"nfc_invalid_response": "Ungültige Antwort",
"nfc_network_error": "Netzwerkfehler",
"qr_scanner_title": "QR scannen",
"qr_scanner_instructions": "Kamera auf den QR-Code richten\num Rechnung oder Adresse zu scannen"
}
11 changes: 11 additions & 0 deletions lib/l10n/app_en.arb
Original file line number Diff line number Diff line change
Expand Up @@ -385,12 +385,23 @@
"nfc_unavailable_message": "NFC not available on this device",
"nfc_scanning_title": "Charge with NFC",
"nfc_scanning_message": "Tap the Boltcard against the phone",
"nfc_hce_message": "Tap the payer's device",
"nfc_charging_message": "Charging...",
"nfc_invalid_tag_message": "Invalid tag or not a Boltcard",
"nfc_charge_error_prefix": "NFC charge error: ",
"nfc_charge_unknown_error": "Unknown error during charge",
"share_ready_message": "Ready to share",
"lnurl_copied_message": "LNURL copied to clipboard",
"nfc_mode_title": "NFC Mode",
"nfc_mode_boltcard": "Charge BoltCard",
"nfc_mode_boltcard_subtitle": "Read card and charge invoice",
"nfc_mode_hce": "Emulate HCE",
"nfc_mode_hce_subtitle": "Phone as card",
"nfc_tag_not_compatible": "Tag not compatible",
"nfc_not_boltcard": "Not a Boltcard",
"nfc_incomplete_data": "Incomplete data",
"nfc_invalid_response": "Invalid response",
"nfc_network_error": "Network error",
"qr_scanner_title": "Scan QR",
"qr_scanner_instructions": "Point the camera at the QR code\nto scan the invoice or address"
}
11 changes: 11 additions & 0 deletions lib/l10n/app_es.arb
Original file line number Diff line number Diff line change
Expand Up @@ -370,12 +370,23 @@
"nfc_unavailable_message": "NFC no disponible en este dispositivo",
"nfc_scanning_title": "Cobrar con NFC",
"nfc_scanning_message": "Acerca la Boltcard al teléfono",
"nfc_hce_message": "Acerca el dispositivo pagador",
"nfc_charging_message": "Cobrando...",
"nfc_invalid_tag_message": "Tag inválido o no es una Boltcard",
"nfc_charge_error_prefix": "Error en cobro NFC: ",
"nfc_charge_unknown_error": "Error desconocido al cobrar",
"share_ready_message": "Listo para compartir",
"lnurl_copied_message": "LNURL copiado al portapapeles",
"nfc_mode_title": "Modo NFC",
"nfc_mode_boltcard": "Cobrar BoltCard",
"nfc_mode_boltcard_subtitle": "Leer tarjeta y cobrar factura",
"nfc_mode_hce": "Emular HCE",
"nfc_mode_hce_subtitle": "Teléfono como tarjeta",
"nfc_tag_not_compatible": "Tag no compatible",
"nfc_not_boltcard": "No es Boltcard",
"nfc_incomplete_data": "Datos incompletos",
"nfc_invalid_response": "Respuesta inválida",
"nfc_network_error": "Error de red",
"qr_scanner_title": "Escanear QR",
"qr_scanner_instructions": "Apunta la cámara al código QR\npara escanear la factura o dirección"
}
11 changes: 11 additions & 0 deletions lib/l10n/app_fr.arb
Original file line number Diff line number Diff line change
Expand Up @@ -370,12 +370,23 @@
"nfc_unavailable_message": "NFC non disponible sur cet appareil",
"nfc_scanning_title": "Encaisser avec NFC",
"nfc_scanning_message": "Approchez la Boltcard du téléphone",
"nfc_hce_message": "Approchez l'appareil du payeur",
"nfc_charging_message": "Encaissement en cours...",
"nfc_invalid_tag_message": "Tag invalide ou pas de Boltcard",
"nfc_charge_error_prefix": "Erreur d'encaissement NFC : ",
"nfc_charge_unknown_error": "Erreur inconnue lors de l'encaissement",
"share_ready_message": "Prêt à partager",
"lnurl_copied_message": "LNURL copié dans le presse-papiers",
"nfc_mode_title": "Mode NFC",
"nfc_mode_boltcard": "Débiter BoltCard",
"nfc_mode_boltcard_subtitle": "Lire la carte et débiter la facture",
"nfc_mode_hce": "Émuler HCE",
"nfc_mode_hce_subtitle": "Téléphone comme carte",
"nfc_tag_not_compatible": "Tag non compatible",
"nfc_not_boltcard": "Pas une Boltcard",
"nfc_incomplete_data": "Données incomplètes",
"nfc_invalid_response": "Réponse invalide",
"nfc_network_error": "Erreur réseau",
"qr_scanner_title": "Scanner QR",
"qr_scanner_instructions": "Pointez la caméra vers le code QR\npour scanner la facture ou l'adresse"
}
11 changes: 11 additions & 0 deletions lib/l10n/app_it.arb
Original file line number Diff line number Diff line change
Expand Up @@ -370,12 +370,23 @@
"nfc_unavailable_message": "NFC non disponibile su questo dispositivo",
"nfc_scanning_title": "Incassa con NFC",
"nfc_scanning_message": "Avvicina la Boltcard al telefono",
"nfc_hce_message": "Avvicina il dispositivo del pagatore",
"nfc_charging_message": "Incasso in corso...",
"nfc_invalid_tag_message": "Tag non valido o non è una Boltcard",
"nfc_charge_error_prefix": "Errore incasso NFC: ",
"nfc_charge_unknown_error": "Errore sconosciuto durante l'incasso",
"share_ready_message": "Pronto da condividere",
"lnurl_copied_message": "LNURL copiato negli appunti",
"nfc_mode_title": "Modalità NFC",
"nfc_mode_boltcard": "Addebita BoltCard",
"nfc_mode_boltcard_subtitle": "Leggi carta e addebita fattura",
"nfc_mode_hce": "Emula HCE",
"nfc_mode_hce_subtitle": "Telefono come carta",
"nfc_tag_not_compatible": "Tag non compatibile",
"nfc_not_boltcard": "Non è una Boltcard",
"nfc_incomplete_data": "Dati incompleti",
"nfc_invalid_response": "Risposta non valida",
"nfc_network_error": "Errore di rete",
"qr_scanner_title": "Scansiona QR",
"qr_scanner_instructions": "Punta la fotocamera sul codice QR\nper scansionare la fattura o l'indirizzo"
}
11 changes: 11 additions & 0 deletions lib/l10n/app_pt.arb
Original file line number Diff line number Diff line change
Expand Up @@ -370,12 +370,23 @@
"nfc_unavailable_message": "NFC não disponível neste dispositivo",
"nfc_scanning_title": "Cobrar com NFC",
"nfc_scanning_message": "Aproxime a Boltcard do telefone",
"nfc_hce_message": "Aproxime o dispositivo do pagador",
"nfc_charging_message": "Cobrando...",
"nfc_invalid_tag_message": "Tag inválido ou não é uma Boltcard",
"nfc_charge_error_prefix": "Erro ao cobrar com NFC: ",
"nfc_charge_unknown_error": "Erro desconhecido ao cobrar",
"share_ready_message": "Pronto para compartilhar",
"lnurl_copied_message": "LNURL copiado para a área de transferência",
"nfc_mode_title": "Modo NFC",
"nfc_mode_boltcard": "Cobrar BoltCard",
"nfc_mode_boltcard_subtitle": "Ler cartão e cobrar fatura",
"nfc_mode_hce": "Emular HCE",
"nfc_mode_hce_subtitle": "Telefone como cartão",
"nfc_tag_not_compatible": "Tag não compatível",
"nfc_not_boltcard": "Não é Boltcard",
"nfc_incomplete_data": "Dados incompletos",
"nfc_invalid_response": "Resposta inválida",
"nfc_network_error": "Erro de rede",
"qr_scanner_title": "Escanear QR",
"qr_scanner_instructions": "Aponte a câmera para o código QR\npara escanear a fatura ou endereço"
}
11 changes: 11 additions & 0 deletions lib/l10n/app_ru.arb
Original file line number Diff line number Diff line change
Expand Up @@ -370,12 +370,23 @@
"nfc_unavailable_message": "NFC недоступен на этом устройстве",
"nfc_scanning_title": "Приём через NFC",
"nfc_scanning_message": "Поднесите Boltcard к телефону",
"nfc_hce_message": "Поднесите устройство плательщика",
"nfc_charging_message": "Списание...",
"nfc_invalid_tag_message": "Неверный тег или это не Boltcard",
"nfc_charge_error_prefix": "Ошибка приёма по NFC: ",
"nfc_charge_unknown_error": "Неизвестная ошибка при списании",
"share_ready_message": "Готово к отправке",
"lnurl_copied_message": "LNURL скопирован в буфер обмена",
"nfc_mode_title": "Режим NFC",
"nfc_mode_boltcard": "Списать с BoltCard",
"nfc_mode_boltcard_subtitle": "Считать карту и списать средства",
"nfc_mode_hce": "Эмуляция HCE",
"nfc_mode_hce_subtitle": "Телефон как карта",
"nfc_tag_not_compatible": "Тег не совместим",
"nfc_not_boltcard": "Не Boltcard",
"nfc_incomplete_data": "Неполные данные",
"nfc_invalid_response": "Неверный ответ",
"nfc_network_error": "Ошибка сети",
"qr_scanner_title": "Сканировать QR",
"qr_scanner_instructions": "Наведите камеру на QR-код\nчтобы сканировать счёт или адрес"
}
66 changes: 66 additions & 0 deletions lib/l10n/generated/app_localizations.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1878,6 +1878,12 @@ abstract class AppLocalizations {
/// **'Acerca la Boltcard al teléfono'**
String get nfc_scanning_message;

/// No description provided for @nfc_hce_message.
///
/// In es, this message translates to:
/// **'Acerca el dispositivo pagador'**
String get nfc_hce_message;

/// No description provided for @nfc_charging_message.
///
/// In es, this message translates to:
Expand Down Expand Up @@ -1914,6 +1920,66 @@ abstract class AppLocalizations {
/// **'LNURL copiado al portapapeles'**
String get lnurl_copied_message;

/// No description provided for @nfc_mode_title.
///
/// In es, this message translates to:
/// **'Modo NFC'**
String get nfc_mode_title;

/// No description provided for @nfc_mode_boltcard.
///
/// In es, this message translates to:
/// **'Cobrar BoltCard'**
String get nfc_mode_boltcard;

/// No description provided for @nfc_mode_boltcard_subtitle.
///
/// In es, this message translates to:
/// **'Leer tarjeta y cobrar factura'**
String get nfc_mode_boltcard_subtitle;

/// No description provided for @nfc_mode_hce.
///
/// In es, this message translates to:
/// **'Emular HCE'**
String get nfc_mode_hce;

/// No description provided for @nfc_mode_hce_subtitle.
///
/// In es, this message translates to:
/// **'Teléfono como tarjeta'**
String get nfc_mode_hce_subtitle;

/// No description provided for @nfc_tag_not_compatible.
///
/// In es, this message translates to:
/// **'Tag no compatible'**
String get nfc_tag_not_compatible;

/// No description provided for @nfc_not_boltcard.
///
/// In es, this message translates to:
/// **'No es Boltcard'**
String get nfc_not_boltcard;

/// No description provided for @nfc_incomplete_data.
///
/// In es, this message translates to:
/// **'Datos incompletos'**
String get nfc_incomplete_data;

/// No description provided for @nfc_invalid_response.
///
/// In es, this message translates to:
/// **'Respuesta inválida'**
String get nfc_invalid_response;

/// No description provided for @nfc_network_error.
///
/// In es, this message translates to:
/// **'Error de red'**
String get nfc_network_error;

/// No description provided for @qr_scanner_title.
///
/// In es, this message translates to:
Expand Down
33 changes: 33 additions & 0 deletions lib/l10n/generated/app_localizations_de.dart
Original file line number Diff line number Diff line change
Expand Up @@ -990,6 +990,9 @@ class AppLocalizationsDe extends AppLocalizations {
@override
String get nfc_scanning_message => 'Halten Sie die Boltcard an das Telefon';

@override
String get nfc_hce_message => 'Halten Sie das Gerät des Zahlers an';

@override
String get nfc_charging_message => 'Wird belastet...';

Expand All @@ -1008,6 +1011,36 @@ class AppLocalizationsDe extends AppLocalizations {
@override
String get lnurl_copied_message => 'LNURL in die Zwischenablage kopiert';

@override
String get nfc_mode_title => 'NFC-Modus';

@override
String get nfc_mode_boltcard => 'BoltCard abbuchen';

@override
String get nfc_mode_boltcard_subtitle => 'Karte lesen und Rechnung einziehen';

@override
String get nfc_mode_hce => 'HCE emulieren';

@override
String get nfc_mode_hce_subtitle => 'Telefon als Karte';

@override
String get nfc_tag_not_compatible => 'Tag nicht kompatibel';

@override
String get nfc_not_boltcard => 'Keine Boltcard';

@override
String get nfc_incomplete_data => 'Unvollständige Daten';

@override
String get nfc_invalid_response => 'Ungültige Antwort';

@override
String get nfc_network_error => 'Netzwerkfehler';

@override
String get qr_scanner_title => 'QR scannen';

Expand Down
Loading