Search code examples
androidremoteviewandroid-remoteview

List of RemoteViews supported methods


I have been searching everywhere for a list of supported methods in RemoteViews but come up empty. Can anyone link a resource or list all available methods supported by RemoteViews? Thanks.


Solution

  • I am assuming that you are referring to the methods that can be used by RemoteViews methods like setBoolean().

    The way to determine if a method is supported is to look at the source code and see whether the method has the @RemotableViewMethod annotation. If it does, that is available for those ad-hoc RemoteViews "setters".

    So for example, the first @RemotableViewMethod-annotated method in the Android 7.1 edition of View is setContentDescription().

    Note that these annotations may change over time. They should not be removed (unless perhaps the underlying method is deprecated), but ones can be added. So, you will want to check the source associated with your minSdkVersion.