4

I have a need to use ParcelFileDescriptor.createPipe(), but I would still like to target API 8/Froyo. This function requires API 9/Gingerbread.

I have read that there are compatibility kits that allow newer API functions to be used on the older OS versions, but know nothing about them. Is that an option here?

If not, what would be the cleanest method for going about duplicating this functionality? I have considered using fromSocket() and making a simple network connection over the loopback interface, but that seems like more overhead than is needed, if there were a simpler way.

Any thoughts or advice would be much appreciated. I should also point out that I am using Monodroid, but a simple Java-based example that uses the Android API would be fine. I can translate it to C#.

Brad
  • 159,648
  • 54
  • 349
  • 530
  • 1
    2Brad: I am sorry. I was under strong impression that createPipe was introduced in API 8. Yorkw pointed out that it's wrong. So, that method which I posted won't work. – Victor Ronin Sep 27 '12 at 17:14
  • It looks like you may be able to re-implement the function using the NDK, since the native pipe() API is available on Froyo. Would that work within your project requirements? (reference: http://source-android.frandroid.com/frameworks/base/core/jni/android_os_ParcelFileDescriptor.cpp) – alanv Sep 30 '12 at 06:57
  • @alanv, Possibly. I'm not sure how to do it with Monodroid, but I will look into it. – Brad Oct 03 '12 at 03:00
  • @alanv, Please post that as an answer. Someone might as well get the +250 bounty, and it expires in a couple hours. – Brad Oct 03 '12 at 13:18

0 Answers0