N
N
NFly2016-01-17 09:51:07
Java
NFly, 2016-01-17 09:51:07

Why does libstreaming require Android 4.0 and above?

Hello.
The Libstreaming library ( https://github.com/fyhertz/libstreaming ) requires Android 4.0 ( API 14 ) and higher to work, even when using this hack:
The MediaRecorder API was not intended for streaming applications but can be used to retrieve encoded data from the peripherals of the phone. The trick is to configure a MediaRecorder instance to write to a LocalSocket instead of a regular file (see MediaStream.java).
Edit: as of Android Lollipop using a LocalSocket is not possible anymore for security reasons. But using a ParcelFileDescriptor does the trick. More details in the file MediaStream.java! (Thanks to those guys for the insight)

But the localSocket andlocalSocketServer ( developer.android.com/intl/ru/reference/android/ne... ) were added to API Level 1.
Why then can't the library work on earlier versions of Android using this method?
How to get around?
Thank you.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
lopatoid, 2016-01-21
@lopatoid

Import the library into the IDE, reduce the API level, and see what features the IDE will complain about.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question