How to access Xamarin.Forms.Application object from the MainActivity

jstuardojstuardo Member ✭✭

Hello,

I need to send a message to the App object which was subscribed.

That App object is of Xamarin.Forms.Application class..... from Activity, in .Android project, I need to send a message to it, something like:

global::Xamarin.Forms.MessagingCenter.Send(this.Application, "AddItem", new string[]{ info.Code.ToString(), info.Description });

In this case, this.Application is not of type Xamarin.Forms.Application, so it did not work.

How can I solve this? I have spent several hours trying to find the solution in search engines but no avail.

Regards

Jaime

Answers

Sign In or Register to comment.