Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 58056

Implementing a DependencyService

$
0
0

I am trying to write a DependencyService that utilizes the native Facebook SDKs on the individual platforms.

What is the best approach for this on Android?

Would it be to start an Android Service "FacebookService" in the MainActivity, or to have the "FacebookService" start a new Activity "FacebookActivity", or something entirely different?

The FacebookService would implement the IFacebookDependencyService with a parameterless constructor so that it can be fetched from the shared business logic using DependencyService.Get<>(). You need to access the current Activity from wherever this is running to call the Facebook SDK.

Thanks!


Viewing all articles
Browse latest Browse all 58056

Trending Articles