Bug 60907 - DeepLinking is not indexing after latest update
Summary: DeepLinking is not indexing after latest update
Alias: None
Product: Forms
Classification: Xamarin
Component: Samples ()
Version: 2.5.0
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Rui Marinho
Depends on:
Reported: 2017-11-29 07:31 UTC by Vitaly Chernikov
Modified: 2018-06-20 13:33 UTC (History)
5 users (show)

Is this bug a regression?: ---
Last known good build:

Modifyed DeepLinking xamarin example, lib version updated and some firebase code added (2.69 MB, application/zip)
2017-11-29 07:31 UTC, Vitaly Chernikov

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report for Bug 60907 on Developer Community or GitHub if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: Developer Community HTML or GitHub Markdown
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:

Description Vitaly Chernikov 2017-11-29 07:31:23 UTC
Created attachment 25858 [details]
Modifyed DeepLinking xamarin example, lib version updated and some firebase code added

I took example from https://github.com/xamarin/xamarin-forms-samples/tree/master/DeepLinking

This example uses version of libary Xamarin.Forms and Xamarin.Forms.AppLink and GooglePlayServices 29.* and DOESN'T use Firebase.
Ok. Its working well.

After I have updated all librarys to and GooglePlayServices to 42.* project, indexing throw error Firebase is not initialized.

I added Firebase initialization code and error avoided.

But indexing is not working.

Xamarin example here https://github.com/xamarin/xamarin-forms-samples/tree/master/DeepLinking

MY Updated example with firebase code and new librarys version is here

Projects differ only by version

   <package id="Xamarin.Forms" version="" targetFramework="monoandroid60" />
   <package id="Xamarin.Forms.AppLinks" version="" targetFramework="monoandroid60" />
   <package id="Xamarin.GooglePlayServices.AppIndexing" version="" targetFramework="MonoAndroid60" />
   <package id="Xamarin.GooglePlayServices.Base" version="" targetFramework="MonoAndroid60" />
   <package id="Xamarin.GooglePlayServices.Basement" version="" targetFramework="MonoAndroid60" />


 <package id="Xamarin.Firebase.AppIndexing" version="42.1021.1" targetFramework="monoandroid71" />
 <package id="Xamarin.Firebase.Common" version="42.1021.1" targetFramework="monoandroid71" />
 <package id="Xamarin.Forms" version="" targetFramework="monoandroid71" />
 <package id="Xamarin.Forms.AppLinks" version="" targetFramework="monoandroid71" />
 <package id="Xamarin.GooglePlayServices.AppIndexing" version="42.1021.1" targetFramework="monoandroid71" />
 <package id="Xamarin.GooglePlayServices.Base" version="42.1021.1" targetFramework="monoandroid71" />
 <package id="Xamarin.GooglePlayServices.Basement" version="42.1021.1" targetFramework="monoandroid71" />
 <package id="Xamarin.GooglePlayServices.Tasks" version="42.1021.1" targetFramework="monoandroid71" />

and some code for Firebase

public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsApplicationActivity
        protected override void OnCreate(Bundle bundle)

            global::Xamarin.Forms.Forms.Init(this, bundle);

            var options = new FirebaseOptions.Builder()

            var app = FirebaseApp.InitializeApp(this, options);


            LoadApplication(new App());

    async void OnSaveActivated(object sender, EventArgs e)
        var todoItem = (TodoItem)BindingContext;

        if (isNewItem)

        appLink = GetTestAppLink("Kupertino datatron");

        catch (Exception exc)
            var t = exc.Message;

        await Navigation.PopAsync();

    public static AppLinkEntry GetTestAppLink(string titleText)
        var itemType = "question";
        var uri = new Uri(string.Format("http://testscheme.krista?id={0}", 23), UriKind.RelativeOrAbsolute);

        var pageLink = new AppLinkEntry
            Title = titleText,
            Description = "Небольшое пояснение",
            AppLinkUri = uri,
            IsLinkActive = true,
            Thumbnail = ImageSource.FromFile("monkey.png")

        pageLink.KeyValues.Add("contentType", "contentType");
        pageLink.KeyValues.Add("appName", App.AppName);
        pageLink.KeyValues.Add("companyName", "Krista");

        return pageLink;
Comment 1 Vitaly Chernikov 2017-11-29 08:07:01 UTC
When you have run this example try add any note in app, and
then call Google Ok and write "Kupertino" - this won't searchable.

ATTENTION There I hardcoded test method 
appLink = GetTestAppLink("Kupertino datatron");
Comment 3 Rui Marinho 2018-03-24 01:49:50 UTC
actually I just hinted this in one of my apps :/ going to take a look on Monday.
Comment 4 faceoffers28 2018-04-07 15:00:43 UTC
I've encountered the same problem as shown here. https://forums.xamarin.com/discussion/125062/xamarin-forms-applinks-no-longer-working-correctly-after-upgrade It seems like Xamarin.Firebase.AppIndexing 42.1021.1 isn't interacting correctly with Xamarin.Forms.AppLinks
Comment 5 faceoffers28 2018-04-07 15:17:06 UTC
This might help too. I've fully documented my experience here to overcome the "Firebase initialization" bug with AppLinks. As you will see, I experienced the bug twice and only after setting my Target to 8.1, did it truly go away.  https://forums.xamarin.com/discussion/125059/applinks-crashes-with-make-sure-to-call-firebaseapp-initializeapp-context-first Hope this helps.
Comment 6 faceoffers28 2018-04-14 20:34:58 UTC
The bug came back and App Center caught it. 

FirebaseAppIndex.get_Instance ()
Java.Lang.IllegalStateException: Default FirebaseApp is not initialized in this process com.domainname.appname. Make sure to call FirebaseApp.initializeApp(Context) first.
ExceptionDispatchInfo.Throw ()
JniEnvironment+StaticMethods.CallStaticObjectMethod (Java.Interop.JniObjectReference type, Java.Interop.JniMethodInfo method)
JNIEnv.CallStaticObjectMethod (System.IntPtr jclass, System.IntPtr jmethod)
FirebaseAppIndex.get_Instance ()
AndroidAppLinks.IndexItemAsync (Xamarin.Forms.IAppLinkEntry appLink)

Offer+<OnAppearing>d__5.MoveNext ()
ExceptionDispatchInfo.Throw ()

I noticed in this sample that the developer is using a different version of Xamarin.Firebase.AppIndexing.


I updated Xamarin.Firebase.AppIndexing to 60.1142.1 (+ all other packages that go with it) and the error has gone away again, but my items still do not display in Google Search.
Comment 7 faceoffers28 2018-04-23 16:25:18 UTC
@Rui Marinho Can we get an update on this? This is one of two issues that is holding up the launch of my latest Xamarin app. Thanks!
Comment 8 faceoffers28 2018-05-03 21:51:50 UTC
Can someone from Xamarin/Microsoft please acknowledge this bug and provide an update? I just reinstalled Xamarin.Forms and Xamarin.Forms.AppLinks to target monoandroid81 and it still doesn't work. Here is my new config.

<package id="Xamarin.Forms" version="" targetFramework="monoandroid81" />
  <package id="Xamarin.Forms.AppLinks" version="" targetFramework="monoandroid81" />
  <package id="Xamarin.GooglePlayServices.AppIndexing" version="60.1142.1" targetFramework="monoandroid81" />