How to solve the issue of non-static and cannot accessed from a static context

When using for Ringtone it works but any other api the following error accours

CODE SNIPPET:

object GetAccounts(Context c,object[] args){
        //var ring = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);
        var accounts = AccountManager.getAccounts();
        return null;
    }

ERROR:

'Android.android.accounts.AccountManager.getAccounts()' is non-static and cannot be accessed from a static context

Why is that so?

Thanks!

As the error message says the getAccounts() is not static so you need to create an AccountManager instance first. How would you do this natively on Android?