Giter Site home page Giter Site logo

hms-core / hms-xamarin-bindings Goto Github PK

View Code? Open in Web Editor NEW
36.0 14.0 11.0 20.58 MB

This repo contains all of Xamarin HMS plugins.

Home Page: https://developer.huawei.com/consumer/en/doc/overview/HMS-Core-Plugin?ha_source=hms1

License: Apache License 2.0

C# 99.99% AIDL 0.01%
xamarin xamarin-android-binding hmscore hms xamarin-ios-binding

hms-xamarin-bindings's Introduction

HMS Xamarin Bindings

license

This repo contains the source code for HMS Xamarin first-party plugins, which are developed by the HMS Core team.

These plugins enable access to using kit-specific APIs. For more information about plugins, and how to use them, see Official Documentations.

Plugins

These are the available plugins in this repository.

Plugin Version Download Documentation
Location version version Getting Started
API Reference
Push version version Getting Started
API Reference
Account version version Getting Started
API Reference
IAP version version Getting Started
API Reference
Maps version version Getting Started
API Reference
Analytics version version Getting Started
API Reference
Site version version Getting Started
API Reference
Ads version version Getting Started
API Reference
ML version version Getting Started
API Reference
Scan version version Getting Started
API Reference
AR version version Getting Started
API Reference
Dtm version version Getting Started
API Reference
Safety Detect version version Getting Started
API Reference
Contact Shield version version Getting Started
API Reference
Awareness version version Getting Started
API Reference
Health version version Getting Started
API Reference
Nearby Service version version Getting Started
API Reference
FidoFido2 version version Getting Started
API Reference
FidoBioauthn version version Getting Started
API Reference
FidoBioauthnAndroidX version version Getting Started
API Reference
Drive version version Getting Started
API Reference
Wallet version version Getting Started
API Reference

Building

Prerequisites

The build script for this project uses Cake. To run the build, you can use one of the bootstrapper files either for Mac or Windows.

The bootstrapper script will automatically download Cake.exe and all the required tools and files into the ./tools/ folder.

dotnet tool install -g cake.tool

When building on macOS, you may also need to install CocoaPods:

# Homebrew
brew install cocoapods

# Ruby Gems
gem install cocoapods

Compiling

You can either build all the libraries and samples in the repository from the root:

dotnet cake

Or, you can build each component separately:

# iOS
cd ios
dotnet cake

# Android
cd android
dotnet cake

The following targets can be specified using the --target=<target-name>:

  • build builds the class library bindings (depends on externals)
  • externals downloads and builds the external dependencies
  • samples builds all of the samples
  • nuget builds the nuget packages
  • clean cleans up everything

Note: In the main-components.cake and dependency.cake, there are only latest versions specified. You can change the versions and compile the projects as you like.

Question or issues

If you want to evaluate more about HMS Core, r/HMSCore on Reddit is for you to keep up with latest news about HMS Core, and to exchange insights with other developers.

If you have questions about how to use HMS samples, try the following options:

  • Stack Overflow is the best place for any programming questions. Be sure to tag your question with huawei-mobile-services.
  • Huawei Developer Forum HMS Core Module is great for general questions, or seeking recommendations and opinions.

If you run into a bug in our samples, please submit an issue to the Repository. Even better you can submit a Pull Request with a fix.

hms-xamarin-bindings's People

Contributors

tugcearar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hms-xamarin-bindings's Issues

Huawei.Hms.Hwid 5.0.3.303

Hello.
On the Huawei website, the current version of the plugin is listed as 5.0.3.303. On the website "nuget.org" the current version of the plugin is specified 5.0.3.302. There will be an update to 5.0.3.303 on "nuget.org"?
Huawei
nuget.org

Huawei.Hms.Map , HMS Map not rendering

Hi , i am trying to create an MapRenderer for Xamarin Android , i am using non Huawei Device with HMS Core 6.3.0.312 apk installed.

the problem is when i try to load the map , the map is not loaded and this appear in the application log.

[HMSSDK_HMSPackageManager] Enter getHMSPackageNameForMultiService
[HMSSDK_AGCUtils] Get appId with AGConnectServicesConfig failed
[HmsMapKit_HmsUtil_33] isInitialized is: falserepeatFlag is: true
[HmsMapKit_HmsUtil_33] hmsVersionStr 4.0.2.300
[HmsMapKit_HmsUtil_33] baseVersion 40002300
[HMSSDK_HMSPackageManager] Enter getHMSPackageName
[HMSSDK_HMSPackageManager] current versionCode:60300311, minimum version requirements: 40002300
[HMSSDK_HMSPackageManager] Enter getHMSPackageName
[HMSSDK_HMSPackageManager] Enter getHMSPackageName
[HMSSDK_HMSPackageManager] MinApkVersion is disabled.
[HmsMapKit_HmsUtil_33] Hms is :0
[HmsMapKit_HmsUtil_33] Hms is avaiable
[HmsMapKit_MapCreator_57] Making Createor dynamically
[dynamic-api_DynamicModule] 11481-11481|null|com.huawei.hms.feature.dynamic.DynamicModule|b|104|No available cached loader, query remote.
[dynamic-api_DynamicModule] 11481-11481|null|com.huawei.hms.feature.dynamic.DynamicModule|d|112|bundle info: errorCode:0, moduleVersion:60201300, modulePath:/data/user_de/0/com.huawei.hwid/files/modules/external/huawei_module_maps/60201300/Map-Route.apk, loader_version:60201300, loaderPath:/data/user_de/0/com.huawei.hwid/files/modules/external/huawei_module_maps/60201300/Map-Route.apk, armeabiType:0
[dynamic-api_DynamicModule] 11481-11481|null|com.huawei.hms.feature.dynamic.DynamicModule|c|84|The loader_path:/data/user_de/0/com.huawei.hwid/files/modules/external/huawei_module_maps/60201300/Map-Route.apk in query bundle is not available,change the module version to:-100
[dynamic-api_DynamicModule] 11481-11481|null|com.huawei.hms.feature.dynamic.DynamicModule|b|223|failed to load.
[dynamic-api_DynamicModule] java.lang.NullPointerException
[dynamic-api_DynamicModule] 	at com.huawei.hms.common.util.Logger.a(Unknown Source:27)
[dynamic-api_DynamicModule] 	at com.huawei.hms.common.util.Logger.w(Unknown Source:9)
[dynamic-api_DynamicModule] 	at com.huawei.hms.feature.dynamic.DynamicModule.b(Unknown Source:223)
[dynamic-api_DynamicModule] 	at com.huawei.hms.feature.dynamic.DynamicModule.getRemoteModuleInfo(Unknown Source:41)
[dynamic-api_DynamicModule] 	at com.huawei.hms.feature.dynamic.a.e.getModuleInfo(Unknown Source:0)
[dynamic-api_DynamicModule] 	at com.huawei.hms.feature.dynamic.DynamicModule.load(Unknown Source:22)
[dynamic-api_DynamicModule] 	at com.huawei.hms.maps.mbu.b(Unknown Source:8)
[dynamic-api_DynamicModule] 	at com.huawei.hms.maps.mbu.a(Unknown Source:15)
[dynamic-api_DynamicModule] 	at com.huawei.hms.maps.MapView$maa.createDelegate(Unknown Source:57)
[dynamic-api_DynamicModule] 	at com.huawei.hms.feature.dynamic.DeferredLifecycleHelper.a(Unknown Source:44)
[dynamic-api_DynamicModule] 	at com.huawei.hms.feature.dynamic.DeferredLifecycleHelper.onCreate(Unknown Source:5)
[dynamic-api_DynamicModule] 	at com.huawei.hms.maps.MapView.onCreate(Unknown Source:29)
[dynamic-api_DynamicModule] 	at crc64720bb2db43a66fe9.FragmentContainer.n_onCreateView(Native Method)
[dynamic-api_DynamicModule] 	at androidx.fragment.app.Fragment.performCreateView(Fragment.java:2963)
[dynamic-api_DynamicModule] 	at androidx.fragment.app.FragmentStateManager.createView(FragmentStateManager.java:518)
[dynamic-api_DynamicModule] 	at androidx.fragment.app.FragmentStateManager.moveToExpectedState(FragmentStateManager.java:282)
[dynamic-api_DynamicModule] 	at androidx.fragment.app.FragmentManager.executeOpsTogether(FragmentManager.java:2189)
[dynamic-api_DynamicModule] 	at androidx.fragment.app.FragmentManager.removeRedundantOperationsAndExecute(FragmentManager.java:2100)
[dynamic-api_DynamicModule] 11481-11481|null|com.huawei.hms.feature.dynamic.DynamicModule|getLocalVersion|90|Cannot find the class of module descriptor for huawei_module_maps
[dynamic-api_e] 11481-11481|null|com.huawei.hms.feature.dynamic.a.e|getModuleInfo|90|Cannot get module info in remote or local.
[HmsMapKit_MapCreator_8] getRemoteContext: DynamicModule load failedcom.huawei.hms.feature.dynamic.DynamicModule$LoadingException: Query remote version and local version failed.
[HmsMapKit_MapCreator_57] getRemoteMapContext failed
[HmsMapKit_MapView_-2] getMapAsync: 

if i switch to Xamarin.Android.Huawei.Hms.Map package from https://www.nuget.org/packages/Xamarin.Android.Huawei.Hms.Maps/ , then the map will load fine. But i am using Huawei.Hms.SafetyDetect package in my project too , so i have to use this HMS Map package, otherwise it will have reference conflict on AGConnectServicesConfig class. Please help.

here is project package without Huawei.Hms.SafetyDetect installed.
Screenshot 2022-01-14 at 10 11 45 AM

PushKit - Didn't find class "com.huawei.hms.framework.common.EmuiUtil"

Hello,
After facing this issue into a production app, I downloaded the PushKitDemo on my Mac and I am getting the same issue.
I am testing on a Huawei P40 Lite. I am getting the error on both debug and release modes, so it's not related to proguard.cfg.

On this post on StackOverflow some guys said to downgrade Huawei.Hms.Push to the lowest available version 5.0.4.302, but I made the update of the NuGet package from the old one 5.0.4.302 to the current one (6.1.0.304) - because of a security warning in Google Play console (Implicit PendingIntent on com.huawei.hms.support.api.push.pushselfshow.prepare.PushNotification.showNotification

Thanks.

Captură de ecran din 2022-11-29 la 14 08 41

HiAnalyticsInstance.AAID returning null value

I've tried to run HiAnalyticsDemo with my own project id and agconnect-services.json and it worked, the event is showing in HMS Console App debugging page.
However I can't get it to work on my own project somehow, I've followed the guides step by step and also referencing the codes from HiAnalyticsDemo but its not working.

One thing that I noticed thought, is that the AAID value from HiAnalyticsInstance object is actually null when I try to run it in my project (when I debug from HiAnalyticsDemo its not null)
aaid

Any idea what's causing this to happen?
Thank in advance

[Android] Update PushKit to the latest version and upgrade to AndroidX from Support or remove it completely

Platform: Android
The issue is here:

<dependency id="Xamarin.Android.Support.v4" version="28.0.0.3" />

Push kit bindings contain some helpers that are special addition:
Original push kit does not depend on those. So I'd suggest to remove those helpers or move them to another new NuGet. It's up to the final user how to display notifications and we should not depend on Support or AndroidX at all.

Xamarin Forms Project does not compile when use Hianalytics

I am trying to integrate Huawei Analytics on my Xamarin Forms App, I added the nugets, and if I compile the project everything works well, but when I add this line:

Huawei.Hms.Analytics.HiAnalyticsInstance instance;

I got this message

The process cannot access the file 'ProjectRoute\obj\Debug\120\androidx\cecil\Huawei.Hms.Hianalytics.dll' because it is being used by another process.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
   at Mono.Cecil.ModuleDefinition.ReadModule(String fileName, ReaderParameters parameters)
   at Xamarin.AndroidX.Migration.CecilMigrator.ReadAssembly(AssemblyResolver resolver, String path)
   at Xamarin.AndroidX.Migration.CecilMigrator.Migrate(String source, String destination)
   at Xamarin.AndroidX.Migration.CecilMigrator.Migrate(IEnumerable`1 assemblies)
   at Xamarin.AndroidX.Migration.BuildTasks.CecilfyFiles.Execute()	

I am using the last nuget version from HiAnalytics.
image

This is the code that cause all the problem

Question about App Service SDK

Hi!
First of all, many thanks for the official Huawei HMS nugets! been doing bindings on my own repo since last year and updates were a hassle.

Yesterday I sent an updated app to AppGallery and got a comment on the approval notice about the "update detection interface":

[Description]:We found that the HMS does not invoke the update detection interface after the app was launched.The publishing in Mainland China and other countries or regions you have chosen to publish has been affected until all the requirements above are met. For more information. For more information, please refer to: https://developer.huawei.com/consumer/cn/doc/development/AppGallery-connect-Guides/appgallerykit-checklist

Searching in the official documentation there is mention of JosApps.getAppUpdateClient() on the "appservice" SDK, which doesn't seem to be available for Xamarin: link

So, is there another way to implement that functionality? Is it available on one of the bindings/kits? Searching thru the code on this repo doesn't show hits for JosApps or AppUpdate.

Thanks again for your hard work!
Ivan

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.