Skip to content

Instantly share code, notes, and snippets.

@devwithzachary
Created February 8, 2022 10:18
Show Gist options
  • Save devwithzachary/ea20768223ae353364054a3d5b424b13 to your computer and use it in GitHub Desktop.
Save devwithzachary/ea20768223ae353364054a3d5b424b13 to your computer and use it in GitHub Desktop.
using System;
using Android.Content;
using Android.Database;
using Huawei.Agconnect.Config;
namespace XamarinHmsRemoteConfig
{
[ContentProvider(new string[] { "com.huawei.cordova.remoteconfig.XamarinCustomProvider" }, InitOrder = 99)]
public class XamarinCustomProvider : ContentProvider
{
public override int Delete(Android.Net.Uri uri, string selection, string[] selectionArgs)
{
throw new NotImplementedException();
}
public override string GetType(Android.Net.Uri uri)
{
throw new NotImplementedException();
}
public override Android.Net.Uri Insert(Android.Net.Uri uri, ContentValues values)
{
throw new NotImplementedException();
}
public override bool OnCreate()
{
AGConnectServicesConfig config = AGConnectServicesConfig.FromContext(Context);
config.OverlayWith(new HmsLazyInputStream(Context));
return false;
}
public override ICursor Query(Android.Net.Uri uri, string[] projection, string selection, string[] selectionArgs, string sortOrder)
{
throw new NotImplementedException();
}
public override int Update(Android.Net.Uri uri, ContentValues values, string selection, string[] selectionArgs)
{
throw new NotImplementedException();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment