Thanks to visit codestin.com
Credit goes to github.com

Skip to content

public static ISharedPreferences GetDefaultSharedPreferences(Context context) missing from Xamarin.AndroidX.Preference 1.1.0-rc2 #46

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
gmck opened this issue Jan 20, 2020 · 8 comments
Assignees
Labels
in-progress in progress

Comments

@gmck
Copy link

gmck commented Jan 20, 2020

Have to revert back to preview06. See Class PreferenceManager

@moljac
Copy link
Contributor

moljac commented Jan 21, 2020

@gmck

This is my generated code:

		// Metadata.xml XPath method reference: path="/api/package[@name='androidx.preference']/class[@name='PreferenceManager']/method[@name='getDefaultSharedPreferences' and count(parameter)=1 and parameter[1][@type='android.content.Context']]"
		[Register ("getDefaultSharedPreferences", "(Landroid/content/Context;)Landroid/content/SharedPreferences;", "")]
		public static unsafe global::Android.Content.ISharedPreferences GetDefaultSharedPreferences (global::Android.Content.Context context)
		{
			const string __id = "getDefaultSharedPreferences.(Landroid/content/Context;)Landroid/content/SharedPreferences;";
			try {
				JniArgumentValue* __args = stackalloc JniArgumentValue [1];
				__args [0] = new JniArgumentValue ((context == null) ? IntPtr.Zero : ((global::Java.Lang.Object) context).Handle);
				var __rm = _members.StaticMethods.InvokeObjectMethod (__id, __args);
				return global::Java.Lang.Object.GetObject<global::Android.Content.ISharedPreferences> (__rm.Handle, JniHandleOwnership.TransferLocalRef);
			} finally {
			}
		}

gist of the whole file:

https://gist.github.com/moljac/2735f3238eef523175c618876f4d625f

location of the code snippet:

https://gist.github.com/moljac/2735f3238eef523175c618876f4d625f#file-androidx-preference-preferencemanager-cs-L1293-L1305

I need to check the tools and their versions locally and on CI.

@moljac moljac self-assigned this Jan 21, 2020
@moljac moljac added the in-progress in progress label Jan 21, 2020
@moljac
Copy link
Contributor

moljac commented Jan 21, 2020

Duplicate
#41

@moljac
Copy link
Contributor

moljac commented Jan 22, 2020

Related:

dotnet/java-interop#501

@moljac
Copy link
Contributor

moljac commented Jan 22, 2020

Related:
dotnet/java-interop#543

CI servers should use 16.5 P2

@moljac
Copy link
Contributor

moljac commented Jan 23, 2020

@moljac
Copy link
Contributor

moljac commented Feb 3, 2020

@gmck

Both MacOSX and Windows Azure DevOps (CI) build servers are generating correct code now.

Fixed in:

https://github.com/xamarin/AndroidX/releases/tag/AndroidX-rc3

Waiting for Americans to wake up, so somebody will press the green button to publish nuget[s].

Please provide feedback whether the issue is fixed. Even better close it yourself. Thanks

@moljac
Copy link
Contributor

moljac commented Feb 3, 2020

@moljac
Copy link
Contributor

moljac commented Feb 3, 2020

Closing it.

Got feedback info in:

#41

Preparing stable

@moljac moljac closed this as completed Feb 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in-progress in progress
Projects
None yet
Development

No branches or pull requests

2 participants