1

As I see in Android sources here is available method to register my own custom functions. But when I trying to call addCustomFunction() I get an error "cannot resolve method". Also I cannot find it in official documentaion. Why this method is not available?

BArtWell
  • 4,176
  • 10
  • 63
  • 106
  • Please refer this link : http://stackoverflow.com/questions/7867099/how-can-i-create-a-user-defined-function-in-sqlite – Nilay Dani Jun 20 '15 at 11:39

1 Answers1

1

Why this method is not available?

Because it is marked with an @hide annotation. Any classes and methods that you see in the Android source code marked with @hide are not part of the Android SDK. They will not appear in the JavaDocs and they are not part of the android.jar that we compile against when building our projects.

In general, there are many possible reasons for something to be marked with @hide, including:

  • A bit of weak "security by obscurity".

  • The class or method, when written, was deemed to be "in flight" and not something that Google was ready to say it was going to support for all Android releases going forward.

  • The class or method really would be private or package-private, but due to the way the Android code wound up being organized, the class or method had to be public to allow the right other stuff to access it. In this case, @hide means "really, this is internal implementation, but it is public because Java made me do it".

However, in general, we are not told why a class or method is marked with @hide, so I cannot tell you the precise rationale that was used in this case.

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491