I used chromecustomtab in my xamarin android project, i can bind service using CustomTabActivityManger class, but there is no option for unbind the service in that class.
and as i am not unbinding, it always throws me error of memory leak.
I am using Nuget - xamarin.Android.Support.CustomTabs version 26.1.0.1
code is as below
namespace Android.Support.CustomTabs
{
public class CustomTabsActivityManager
{
public CustomTabsActivityManager(Activity parentActivity);
public CustomTabsSession Session { get; }
public Activity ParentActivity { get; }
public CustomTabsClient Client { get; }
public event CustomTabsServiceDisconnectedDelegate CustomTabsServiceDisconnected;
public event CustomTabsServiceConnectedDelegate CustomTabsServiceConnected;
public event ExtraCallbackDelegate ExtraCallback;
public event NavigationEventDelegate NavigationEvent;
public static CustomTabsActivityManager From(Activity parentActivity, string servicePackageName = null);
public bool BindService(string servicePackageName = null);
public void LaunchUrl(string url, CustomTabsIntent customTabsIntent = null);
public bool MayLaunchUrl(string url, Bundle extras, List<string> otherLikelyUrls);
public bool Warmup(long flags = 0);
public class ExtraCallbackEventArgs
{
public ExtraCallbackEventArgs();
public string CallbackName { get; set; }
public Bundle Args { get; set; }
}
public delegate void NavigationEventDelegate(int navigationEvent, Bundle extras);
public delegate void ExtraCallbackDelegate(object sender, ExtraCallbackEventArgs e);
public delegate void CustomTabsServiceConnectedDelegate(ComponentName name, CustomTabsClient client);
public delegate void CustomTabsServiceDisconnectedDelegate(ComponentName name);
}