I am trying to create an Android video editing application. I noticed in the SDK sources there are a number of classes in the package 'android.media.videoeditor' that appear to do what I need; however, when I try and import them into my Java project, I can't because according to Eclipse they don't exist! I checked the contents of 'android.jar' and sure enough, the classes are missing.
One of the classes in that package - MediaArtistNativeHelper.java - uses JNI to call out to whatever native methods it needs to, which are implemented in C++ from what I can tell (does this mean I need to build them separately?)
My question is, how can I use these classes in my project?
I am developing the app using Eclipse on a Mac.
The android.media.videoeditor package is an internal/hidden package, because the Javadoc above it's classes/interfaces contain the {@hide} or @hide annotation.
You are not allowed to use it from within your application and as you saw the API is not present in android.jar which contains the public API's available. FYI the package's javadoc can be seen here.
For adding media functionality to your application use the android.media package instead, which:
Provides classes that manage various media interfaces in audio and video.
The Media APIs are used to play and, in some cases, record media files. This includes audio (e.g., play MP3s or other music files, ringtones, game sound effects, or DTMF tones) and video (e.g., play a video streamed over the web or from local storage).
Other special classes in the package offer the ability to detect the faces of people in Bitmaps (FaceDetector), control audio routing (to the device or a headset) and control alerts such as ringtones and phone vibrations (AudioManager).
The contents of the android.jar showing what the android.media package contains:
(Taken from adt-bundle-linux/sdk/platforms/android-17/android.jar)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With