Offline Invoice Signing in Android using .NET MAUI

Hi,

We are currently utilizing Android devices (phones, tablets, and handheld terminals) to generate invoices through our application, which is developed using .NET MAUI. At present, the invoice signing process is handled via a Web API hosted on our server, and this approach is functioning reliably when internet connectivity is available.

However, in scenarios where internet access is unavailable, we are unable to proceed with invoice creation due to the dependency on the remote signing service.

To address this limitation, we are exploring the feasibility of performing the signing process locally on the Android device. Specifically, we would like to inquire whether it is possible to use .NET 8 class libraries (DLLs) within our .NET MAUI Android application to facilitate offline signing.

We would appreciate your guidance on whether this is a supported and recommended approach, and if there are any specific considerations or limitations we should be aware of when integrating .NET 8 DLLs for this purpose.

Thank you for your assistance.

Best regards,
Anish A K

Morning @anishak

Thanks for reaching out,

Kindly note that we are supporting our SDK tool, you can install the latest version of our SDK .Net version which is 3.4.1 (it’s support .Net 8 ) and use the DLL file in your own implementation to use all It’s functionality without need to be connect to the internet.

After installing the SDK follow this path to find the DLL (SDK\dotNet\zatca-einvoicing-sdk-DotNet-238-R3.4.1\Lib\Dot-Net8\DLL)

Thanks,
Ibrahem Daoud

Dear Ibrahem Daoud,

Thank you for your continued support.

We have successfully installed the latest version of the .NET SDK (3.4.1) and are currently integrating the .NET 8-compatible DLLs into our .NET MAUI application.

While we are able to create and sign the XML documents using the SDK DLLs within the .NET MAUI Windows application, we are encountering an issue when executing the same functionality on .NET MAUI Android. Specifically, the EInvoiceSigner.SignDocument function fails with the following error:

[Error] Parsing EInvoice Certificate
[Error] Populating Signed Signature Properties

This issue appears to be specific to the Android platform. We have verified that the certificate is valid and correctly configured, and the same implementation works as expected in the Windows environment.

Could you please assist us in identifying the root cause of this issue and guide us on how to resolve it for Android?

We appreciate your support and look forward to your response.

Best regards,
Anish AK