On May 19, 8:56 pm, Robert Fejer <[email protected]> wrote:

> When I try to use MediaRecorder.setParameters(), Eclipse is
> complaining, as there is no official setParameters() method in
> MediaRecorder.
>
> Anybody knows how to get around this problem?

For APIs like this that are simply unpublished, you can use
reflection. It's the same technique you use to access object methods
in later versions of the API while still maintaining compatibility
with earlier versions, discussed here:
http://developer.android.com/resources/articles/backward-compatibility.html

Keep in mind that unpublished methods are not guaranteed to exist on
all devices (as I understand it), so make sure your code doesn't rely
on setParameters(). IOW, ensure that your code will degrade gracefully
if it's running on a device where that method really doesn't exist.

String

-- 
You received this message because you are subscribed to the Google Groups 
"Android Discuss" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/android-discuss?hl=en.

Reply via email to