How can I send a raw message in .net maui for android, no compiling sample found

Julien Duprat 0 Reputation points
2023-03-24T10:40:28.3333333+00:00

Hello,

I would like to find a sample project in .net MAUI for android to send a raw message via USB, no compiling sample found.

I found this project which work well on pAX IM30 Android 7.1 : https://github.com/kai-morich/SimpleUsbTerminal

I would like to do the same stuff in .net MAUI.

thank you for your help

Julien

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
2,859 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Wenyan Zhang (Shanghai Wicresoft Co,.Ltd.) 26,221 Reputation points Microsoft Vendor
    2023-03-24T12:59:38.7966667+00:00

    Hello,

    The sample consumes a third-party usb-serial-for-android library and Android USB Host Mode (OTG) API. If you want to do the same stuff in MAUI, you could try Binding Library for Android platform. And Android native library bindings can be done the same way as in Xamarin, please see Binding a Java Library - Xamarin | Microsoft Learn
    In addition, you can refer to Binding Native Libraries for .NET MAUI - Events | Microsoft Learn

    Best Regards, Wenyan Zhang


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment". Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments