Hello I would like to make a project for Vuzix M300 Smart Glasses. In order to do so I need to get some information about my device in my PCL.
I found some Xamarin Plugins which did not really solve my problem.
So is there a way to get information about the current device like: vuzix M300 in my Visual Studio?
After all I found the answer by myself.
I used the Xamarin Forms Dependency Services to get the information into the pcl.
If you try to call the Plugin within the pcl you will get an exception.
Related
I have created a Xamarin Android project. Via NuGet, I have added a reference to the Grpc package.
In my activity, I want to create a Grpc.Core.Server instance, but it won't let me because of the following runtime error:
System.IO.FileNotFoundException: Error loading native library. Not found in any of the possible locations: /storage/emulated/0/Android/data/DecodingPoC.DecodingPoC/files/.override/libgrpc_csharp_ext.x64.so,/storage/emulated/0/Android/data/DecodingPoC.DecodingPoC/files/.override/runtimes/linux/native/libgrpc_csharp_ext.x64.so,/storage/emulated/0/Android/data/DecodingPoC.DecodingPoC/files/.override/../../runtimes/linux/native/libgrpc_csharp_ext.x64.so
I haven't been able to find any information on this for Xamarin, only iOS, so I am hoping someone here can provide a suggestion on how to proceed.
Please note that gRPC c# support for Xamarin is currently experimental. The stable packages in nuget.org don't provide the support yet (that will change with the upcoming v1.15.x release).
See HelloWorldXamarin instructions on how to obtain the correct nuget package (or use the https://www.nuget.org/packages/Grpc.Core/1.15.0-pre1 pre-release package which already supports Xamarin):
https://github.com/grpc/grpc/tree/master/examples/csharp/HelloworldXamarin#experimental-only
You might also need this workaround if you are using Xamarin.Forms: https://github.com/grpc/grpc/issues/16250
I am trying to include Judopay in my project, and I was able to add it to Android and iOS, but not to the Xamarin forms project. There is no NuGet to be included and I can't seem to add the component reference. Any idea on how can I add it? I cannot use any of these:
using JudoDotNetXamarin;
using JudoPayDotNet.Enums;
using JudoPayDotNet.Models;
Again, they only work on iOS or Android, but not Xam forms.
That is because they only provide platform implementations. You will need to tell your Forms app which implementation to use at what time.
The correct way to go about this is with some form of IoC, using dependency injection or service location. Luckily Xamarin Forms has this integrated:
https://developer.xamarin.com/guides/xamarin-forms/application-fundamentals/dependency-service/introduction/
Using the references from the Android or iOS projects in your shared code will likely not work completely or break things. Maybe not immediately but surely later on. (Except when there really is no platform-specific functionality, then you might get away with this.)
is there any experience using Crashlytics reporting system for xamarin.mac application? I tried to create binding library, I got an exception :
"Native linking failed with error code 1"
I'm not sure how binding library will work. any experience?
Here's some info that may be of use:
Fabric Kits available to use with Xamarin:
Answers Crashlytics Digits For Xamarin.Forms, Xamarin.Android and
Xamarin.iOS.
For iOS, you need to create a application with the same bundle id on
XCode as the one on your Xamarin app. Then, use the Fabric Mac app to
add your app and complete the Kits on-boarding process.
For Android, you need to create a application with the same package
name on android studio as the one on your Xamarin app. Then, use the
Fabric Mac app to add your app and complete the Kits on-boarding
process.
After that, you can follow the instructions on
https://www.fabric.io/kits to configure your projects.
For crashlytics on android, there is a hidden configuration, you need
to add/update the build id using a string resource
<string
name="com.crashlytics.android.build_id">e9e6beb9c4284289ac68b9ab76a9ee56</string>
Or else you'll get a crash on startup.
There is a Sample available on Samples folder.
On iOS, Crashlytics shouldn't be used with Answers. Crashlytics
includes Answers, so you should use either.
Code is available on https://github.com/drungrin/Fabric.Sdk.Xamarin
Nuget packages are also published:
https://www.nuget.org/packages/Fabric/
https://www.nuget.org/packages/Answers/
https://www.nuget.org/packages/Crashlytics/
https://www.nuget.org/packages/Digits/
Source: https://forums.xamarin.com/discussion/68256/fabric-crashlytics-answers-and-digits-for-xamarin-forms-xamarin-android-and-xamarin-ios
Mike from Fabric here.
At this time Fabric does not have support for Xamarin based projects. If that changes, I'll update my answer!
a more detailed instruction following the same answer as #CMash answer could be found here
I am trying to figure out how to run NewRelic mobile on xamarin forms android application. I found this repository. It is pretty old, but i tried o put latest .jar file and native library builds just fine. After i connect compiled dll to client project, i cant find a way to initialize newrelic, b/c there is no NewRelicHelper class, though it was declared in binidng metadata. Can you help and tell me how to find class that i need and initialize newrelic? Here is repo where you can reproduce issue.
I got it at least a step further, but it is still not working 100%
If you right click the csproj in visual studio and go to properties, in the Application Tab change the Android Class Parser to "class-parse" and the NewRelicHelper will now be in the dll, but the withApplicationToken method is not there.
I have tricky question about SignaturePad updated to Xamarin Forms 2.0, link to GitHub:
https://github.com/mrbelk/acr-xamarin-forms
I did manage to download repo and build it, however I have no idea how to produce proper DLLs that I could use in my project?
The main issue is that SignaturePadView is treated as Xamarin Forms View class instead of Android View, so there is different constructors, methods, etc.
Does smb know how to build these projects to produce proper dlls that iOS/Android solution will treat SignaturePadView as Android View and iOS UIView respectively?
Don't use acr.* any more if you want to save yourself some pain. I had to pull their camera implementation out of one of my apps due to no support for forms 2.0+.
Replace acr with supported NuGets like Plugin.Media and the others found here. For this particular issue no one has created a non-deprecated NuGet so there is this plugin as an option.
Apparently, it happens that we have actually used SignaturePad from https://components.xamarin.com/view/signature-pad but via acr.* nuget package.
What I found in my quick research that both acr.xamforms.SignaturePad and SignaturePad it self were in acr nuget package, and actually we were using components from SignaturePad, luckily. So I did remove this nuget from sln to get rid of acr.* components and add SignaturePad from xamarin components by hand.
Now we are able to use Xamarin Forms 2.0 without any problems.
Cheers,
G