Xamarin Google Tag Manager Integration - xamarin

My goal is to integrate the GTM (Gootle Tag Manager) SDK in a Xamarin.iOS app without having to use Firebase.
Problem:
The instructions for integrating GTM from the Xamarin component store only show how to integrate via Firebase. Whereas Google provides 2 options, including one that does not require Firebase.
Additionally the GTM Xamarin component is missing types and methods provided by the original Google GTM SDK. Ex: TAGManager, TAGContainer
Any help would be greatly appreciated.

Not sure if you have figured this out. Hopefully this could help someone hoping to do the same. We currently use TagManager with Google Analytics in our Xamarin apps.
You need to install specific version of Google TagManager via Nuget and latest Google Analytics for your Xamarin.iOS app.
Packages currently used:
Xamarin.Google.iOS.Analytics - v 3.17.0.1
Xamarin.Google.iOS.TagManager - v 3.15.0.5
These packages should allow for the objects you are looking for TAGManager, TAGContainer to be found.
Follow this tutorial from a colleague of mine if you want Enhanced Ecommerce:
How To Implement Google Tag Manager Enhanced Ecommerce iOS in Xamarin

Related

How to use the Plugin.Storereview for requesting reviews on Appstore in Xamarin forms Application?

I am a beginner in Xamarin forms. I have installed the plugin
https://github.com/jamesmontemagno/StoreReviewPlugin
I haven't found any usage documents on how to initialize/ how to do the setup for using the plugin when i looked on the web.
How can I display the prompt to the user using this plugin?
I just did a test and you do not need any additional steps to use this plugin.
Install this plugin through manage nuget packages and the in your project:
Use the namespace:
using Plugin.StoreReview;
Use the method:
CrossStoreReview.Current.OpenStoreListing("appid");
You need to test with a real device instead of a simulator.
The Store Review Nuget plugin has been updated to v3 recently thanks to the new (August 2020) Android native Play Core library so that it displays an In-App Review on both iOS & Android:
https://devblogs.microsoft.com/xamarin/android-in-app-reviews/
So now, initializing and setup is a lot easier and you don't need to pass the appid anywhere, it will be shown directly in the app

Web intent plugin in NativeScript

I building Bookmarks manager app in Nativescript. i am looking for a plugin related to web intent, but i could find any. If any one have any idea to achieve similar functionality like this React native plugin for intent, Please help
Thanks in advance
It's quite straight forward on Android, you would use JavaProxy to create an activity Or simply use your NativeScript activity if you want to open your application itself upon sharing, add the same intent-filter under that activity in AndroidManifest.xml file.
With iOS, there is an option feature request for building app extensions. But still there are some POCs for app extensions available on Github which seems to require some manual steps as mentioned in the Github issue.

How to read user phone book contacts without using any plugin or package

In my enterprise application need to read user phone book contacts and save into my database. I have searched more but all are suggest, need to install xamarin.mobile package or plugin. In my application have only limited size, so difficult to install package or plugin. Please suggest any idea to read contacts. Thanks in advance.
You need dependency service to be able to do that.
for more information on how to create a dependency service:
https://developer.xamarin.com/guides/xamarin-forms/application-fundamentals/dependency-service/introduction/
You'll need to do this on each platform separately.
How to do it for android: https://developer.xamarin.com/recipes/android/data/contentproviders/read_contacts/
For IOS u can also find on the Xamarin website. But I can't post 2 links
Good luck!

How to use Google Places Autocomplete API in React Native Android?

I am trying to use the Google Places Autocomplete API in RN Android (link to Google Doc as below). However, as the JS version of the API is meant for web app, I am not sure how to include the script into my RN Android code (original code for web application: ). Is there a way to use this API in RN? Or because the Google Places API also has an Android native version, do we have to write an Android native module and hook it to RN as explained in the "Guides(Android)/Native Modules" in the official RN doc?
Thanks a lot!
Google Places Autocomplete API JS: https://developers.google.com/maps/documentation/javascript/places-autocomplete
Official RN doc on Native Modules: http://facebook.github.io/react-native/docs/native-modules-android.html#content
Try to avoid using https://github.com/FaridSafi/react-native-google-places-autocomplete, as this will use Google Places API, which will not support mobile application API key restriction.
You can use npm install googleplaces to install google places npm packages in your project and
use require('googleplaces') in your code to access it
Checkout https://www.npmjs.com/package/googleplaces for more details. I've not tested it but I guess you can use it like other npm packages for react-native

Is it possible to perform Sqlite sync via Azure Mobile Services completely within Xamarin Forms iOS PCL project

After spending two straight days chasing the answer, I have to fall back and just ask:
Is it possible to perform Sqlite sync via Azure Mobile Services completely within Xamarin Forms iOS PCL project?
Any examples I have looked at (including those that claim that their emphasis is on PCL) all end up instantiating the MobileServicesClient within the Native iOS part of the solution, as well as performing the Sqlite sync via Azure Mobile Services within the native project as well.
My goal is to have a Xamarin.Forms solution, which relies on a Sqlite / Azure Mobile Services sync for all of its data and its offline needs. Such solution would not have to have any additional platform specific code, beside what is generated by the project template.
Furthermore, I intent on using Syncfusion Xamarin charts library, which only works within Xamarin.Forms project. The idea is to have Syncfusion chart source its data from the local Sqlite db, which, in turn, is periodically auto-refreshed using Azure Mobile Services Sqlite sync.
I think, that if I had to do all if the data sync business within my platform specific project, then I may not be able to use this Syncfusion Forms-only library.
Is it actually possible to do the Sqlite / Azure sync completely within the bounds of the PCL?
-Eugene
Yes, you can do so. Check out the book - http://aka.ms/zumobook - particularly Chapter 3. In addition, check out the underlying repo (link in the book) - there are several example setups of Xamarin Forms with Offline Sync in SQLite in there. The Chapter3 sample is a good place to start.
I'm able to use them with my project with removing Silverlight optins from my PCL project because of some System.Web methods are not available with it.
On PCL:
Microsoft.IdentityModel.Clients.ActiveDirectory
Newtonsoft.Json
SQLite.Net
SQLite.Net.Async
On iOS Project:
Microsoft.IdentityModel.Clients.ActiveDirectory, Version=3.1.0.0
Microsoft.IdentityModel.Clients.ActiveDirectory.Platform
Newtonsoft.Json
SQLite.Net
SQLite.Net.Platform.XamarinIOS.Unified

Resources