Java – You cannot call public static methods in a public class

You cannot call public static methods in a public class… here is a solution to the problem.

You cannot call public static methods in a public class

I’ve been experimenting with generating thumbnails for images and videos using Android’s built-in ThumbnailUtils class. Video thumbnails are generated correctly using the createVideoThumbnail(..) method. However, I can’t even call the related method createImageThumbnail. Both methods are declared as public and static. This is github link To the source.

How do I restrict clients from selectively using the public static method in Java?

[edit]: See this link for use More information on Android’s internal/hidden methods:

Solution

createImageThumbnail The documentation contains @hide, which makes it inaccessible outside of the Android SDK.

For more information about @hide< a href="https://stackoverflow.com/questions/17035271/what-does-hide-mean-in-the-android-source-code" rel="noreferrer noopener nofollow"> here .

Related Problems and Solutions