1

i am using visual studio and xamarin to build android and ios applications . i am looking for a way to add the (gracenote SDK) gnsdk to my solution , and all the SDKs are not working. what i did till now is :

i downloaded all the gnSDKs and tried to use all of them one by one and i failed for different reasons

1-gnsdk-3.07.7.3701o-20150714:

i was able add a reference to the gnsdk_csharp.dll in the android app, and i tried adding the (gnsdk_csharp_marshal.dll) as a reference but for sure it didn't work so i added it as a file to the project and also all the other Dlls from gnsdk like the (gnsdk_manager.dll,....) i set the build action to content , and the copy option to "copy if new". if i do the above in a windows form application the code works fine, and i can create an object of GnManager . when i do this in an android app, the project compiles , but once i run it on the mobile phone and i reach the code

gnManager_ = new GnManager("Lib",gnLicense_,GnLicenseInputMode.kLicenseInputModeString);

i get the following error

{System.TypeInitializationException: The type initializer for 'GracenoteSDK.gnsdk_csharp_marshalPINVOKE' threw an exception. ---> System.TypeInitializationException: The type initializer for 'SWIGExceptionHelper' threw an exception. ---> System.DllNotFoundException: gnsdk_csharp_marshal at (wrapper managed-to-native) GracenoteSDK.gnsdk_csharp_marshalPINVOKE+SWIGExceptionHelper:SWIGRegisterExceptionCallbacks_gnsdk_csharp_marshal (GracenoteSDK.gnsdk_csharp_marshalPINVOKE/SWIGExceptionHelper/ExceptionDelegate,GracenoteSDK.gnsdk_csharp_marshalPINVOKE/SWIGExceptionHelper/ExceptionDelegate,GracenoteSDK.gnsdk_csharp_marshalPINVOKE/SWIGExceptionHelper/ExceptionDelegate,GracenoteSDK.gnsdk_csharp_marshalPINVOKE/SWIGExceptionHelper/ExceptionDelegate,GracenoteSDK.gnsdk_csharp_marshalPINVOKE/SWIGExceptionHelper/ExceptionDelegate,GracenoteSDK.gnsdk_csharp_marshalPINVOKE/SWIGExceptionHelper/ExceptionDelegate,GracenoteSDK.gnsdk_csharp_marshalPINVOKE/SWIGExceptionHelper/ExceptionDelegate,GracenoteSDK.gnsdk_csharp_marshalPINVOKE/SWIGExceptionHelper/ExceptionDelegate,GracenoteSDK.gnsdk_csharp_marshalPINVOKE/SWIGExceptionHelper/ExceptionDelegate,GracenoteSDK.gnsdk_csharp_marshalPINVOKE/SWIGExceptionHelper/ExceptionDelegate,GracenoteSDK.gnsdk_csharp_marshalPINVOKE/SWIGExceptionHelper/ExceptionDelegate) at GracenoteSDK.gnsdk_csharp_marshalPINVOKE+SWIGExceptionHelper..cctor () [0x000ef] in :0 --- End of inner exception stack trace --- at GracenoteSDK.gnsdk_csharp_marshalPINVOKE..cctor () [0x00000] in :0 --- End of inner exception stack trace --- at GracenoteSDK.GnManager..ctor (System.String gnsdkLibraryPath, System.String license, GnLicenseInputMode licenseInputMode) [0x00000] in :0 at AndXamGNtest.MainActivity.OnCreate (Android.OS.Bundle bundle) [0x00066] in D:\Mediawave\AndXamGNtest\AndXamGNtest\MainActivity.cs:51 }

so why is this happening , and why is that gnsdk_csharp_marshal is not being copied to the phone , i tried coping it my self to the path in the error but still does not work.

2-gn-mobile-android-1.1.7.3690

tried to build an android binding library using the jar files, when i compiled i got hundreds of error in the generated code that i couldn't fix.

3-gn-mobile-winphone8-1.1.6.3529

i was able to get that sample project to work that comes with the SDK , and running it on my computer as an emulator it worked fine , and it was able to detect music and ID them correctly , but that DLL, i was not able to add reference to it in any other app , other than that sample project and every time i try to add it to a windows form application or an android application it gives an error that it is not a defined DLL.

please advice on any of the 3 ways above which is the correct one , and if there is a way to get it working , thanks .

youselry
  • 31
  • 5

0 Answers0