Any ideas to call the android third party functions?

Yuan Jeffers 1 Reputation point
2022-08-17T08:27:29.433+00:00

Hi,

Currently, we have developed an android applciation, running on pda (with printe function, call the function by third party package).

How can we switch it to maui platform?
Is it possible to put the third party package inside the android folder, and call it from maui ui?

Updated:

Maybe I had not explained clearly about the situaction.
I mean, in Android application, I call use the aar or jar library, in the Xamarin, it's also possible.(Even, the Xamarin.Android only allowed one aar for one library project).

However, in the MAUI, it's not possible to call the aar or jar library, in source code, it can found the aar/jar library, it can recognize the class, method etc. But it cannot be complied.
Any ideas about it?

Thanks.

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

1 answer

Sort by: Most helpful
  1. Yonglun Liu (Shanghai Wicresoft Co,.Ltd.) 35,121 Reputation points Microsoft Vendor
    2022-08-18T06:04:56.32+00:00

    Hello,

    You could refer to this documentation .NET 6 - Xamarin.Android Binding Migration to get the details about how the binding library works in .NET6.

    In addition, you need to use AndroidLibrary item group for binding library, please refer to One .NET: Embedded Resources and .nupkg Files

    Best Regards,

    Alec Liu.


    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