Xamarin bar code scanner ZXing.Net Mobile - xamarin.android

I am working on an Xamarin.Forms application. Specifically, I am focusing on the Android platform before I focus on iOS. So far in my application I have implemented login and registration. When I was working on the login and registration features of the application all the work that I did was in the PCL, which would compile into android and iOS.
However, I now want to implement barcode scanning. For this requirement I have decided to use the ZXing.Net.Mobile for Forms library. After reading the documentation it says the following var scanPage = new ZXingScannerPage();. I have download ZXing.Net.Mobile for Forms in my Xamarin.Android solution however it is unable to find the class. Any help or guidance would be great thanks.

I have download ZXing.Net.Mobile for Forms in my Xamarin.Android solution however it is unable to find the class
If you just install the ZXing.Net.Mobile nuget package, it's unable to find the class.
You could see the ZXing.Net.Mobile source code, the ZXingScannerPage.cs class is included in ZXing.Net.Mobile.Forms. So you need download the ZXing.Net.Mobile.Forms nuget package :
Then you could get started with ZXingScannerPage :
var scanPage = new ZXing.Net.Mobile.Forms.ZXingScannerPage();

Related

Flash Builder SDK issues

So I needed to install a new SDK to use the Compass ANE that I purchased. Which I did and the issue that I had with it was that the "TabbedViewNavigatorApplication" was not a supported component. So, after some research, the problem was with the new framework file. I took the framework file from the original 4.6.0 (file location shown below):
C:\Program Files\Adobe\Adobe Flash Builder 4.7 (64 Bit)\sdks
and put that in the new SDK file. This fixed this issue but now I have another issue where the old code I had working has now broken.
GeolocationEvent.UPDATE is no longer being called
Camera.setMode() causes a crash
UIComponent.addChild(Video) causes a crash
I am able to run the program with no errors.
Event is not being triggered for Geolocation in Flex
This person had a similar problem to me and he says he fixed his issue but I can't work out what he did:
I worked out the ultimate cause of this specific problem. It stems from Flash Builder not installing the complete Android SDK or the IOS SDK. Once I manually installed these by copying the SDK folders to their correct paths in Adobe Flash Builder, my GPS events were called successfully.
To sum up, if you get this trouble where the code and everything looks alright but it wont call up your events, then check to make sure that your latest SDKs for Flex are installed correctly for Android and or iOS
I haven't done any work with flex SDKs and if anyone can either recommend a place to download one which supports these features or has any advice on how to fix my issue I would be most grateful.
Solved issue. In case anyone looks for this, my old SDK would allow me to run the app from a device without requesting for permission for geolocation event. The new SDk forces you to use the permission status event.
Makes sense to me now. Just wish I had an error pop up asking for permission rather than just doing nothing.

Xamarin IOS can't initialize visibility plugin

I have a Xamarin project with an ios and a android app. In both I want to use the MvvmCross Visibility Plugin. On Android it generated the proper bootstrap file and usage works fine. On iOS I created a own bootstrap file, but I always get the following message:
MvvmCross.Platform.Exceptions.MvxException: Could not find plugin loader for type MvvmCross.Plugins.Visibility.PluginLoader
Also I tried to call the plugin loader manually in the InitializeLastChance:
MvvmCross.Plugins.Visibility.PluginLoader.Instance.EnsureLoaded();
But this leads to the same exception.
How can I solve this?

How to integrate GTM with Firebase analytics enabled Application which developed using Xamarin Android platform

I am developing Mobile application using Xamarin Android. We have integrated Firebase portal with our application successfully. Also we are able to see all automated event and custom event on Dashboard in firebase Console.
Now my requirement is to integrate Google Tag Manager(GTM) SDK with existing Firebase SDK in my application. I tried to integrate by following some below links
https://developers.google.com/tag-manager/android/v5/
https://github.com/IdoTene/XamarinTagManagerAndroid
but ended up with build error Invalid Resource file Name for GTM configuration file(GTM-XXXX.json).
So here is my question, How to integrate GTM SDK with Firebase SDK in Xamarin Android application.
Please any help would be greatly appreciated.
I don't know if you figured it out eventually, but for future reference, the problem is that the IdoTene tagmanager project is for tagmanager v4, which is pre firebase. Instead you should use the version that Xamarin maintains:
https://www.nuget.org/packages/Xamarin.GooglePlayServices.TagManager/
The steps are very simple. Integrate GTM containers (ios and android) as follows:
For Android -> create subfolder in assets folder and name it as containers, copy container in it (make sure it's naming starts with GTM-xxxxxx.json).
For iOS -> create a folder container in the root directory and copy GTM container json there (GTM-xxx.json)
Then install Xamarin.GooglePalyServices.TagManager nuget for Android and Xamarin.Google.iOS.Tagmanger for iOS.
Thats it for Android, but for iOS, there is a one more step.
Integrate following code in AppDelegate.cs
Google.TagManager.TagManager.Configure();
Then you should be good to go!! :)

Not Implemented in Portable Class Library. Using Riverts with Xamarin in iOS app

I have a problem in Xamarin project. I use VS2015 and I try add App Link to my iOS app.
I found a tutorial here. When I try to open my link in Safari everything works fine, but when debugger is in the OpenUrl function, I get this exception:
System.NotImplementedException: Not Implemented in Portable Class Library. Use a platform specific assembly instead.
The code is:
var rurl = new Rivets.AppLinkUrl(url.ToString());
The URL has the address which I added in Safari. Any ideas?
The Rivets component that you are using cannot invoke the platform-specific code to work with the AppLink. Make sure you have also added the Rivets component or DLL to your iOS project, not just your PCL project.

Xamarin Active Directory using native library, storyboard issue

I'm using the Active Directory Authentication Library as found here I've then created a binding project in Xamarin and then created some login code to manage logins to our app via ADAL.
Everything was working fine until I moved the app to a Unified app. Ever since doing that when I try to authenticate, I get the following error:
The required resource bundle could not be loaded. Please read the ADALiOS readme on how to build your application with ADAL provided authentication UI resources.
I have the required storyboards as part of the main iOS app, but for some reason the ADAL library can't seem to find them in the main bundle.
Any insight greatly appreciated!
James, did you try ADAL v3? It supports Xamarin natively, without the need of using bindings against the native ADALs. Although bindings are technically possible, we consider ADAL v3 to be the main way in which we support Xamarin integration.
Please see https://azure.microsoft.com/en-us/documentation/samples/active-directory-dotnet-native-multitarget/ for an example. ADAL v3 is still in preview, but we are working hard to release it ASAP.
For the record, for whatever reason, just adding the Storyboard to the iOS Xamarin project doesn't seem to work any more. If you add the compiled ADALiOS.bundle from the ObjC library to you Xamarin project, it will work.
You add it by selecting add files from folders in Xamarin Studio and selecting the folder directly above the .bundle file in the output tree.
Makes sense I guess.

Resources