just to be even clearer, here is what the beginning of the library
method i need to pass the path to (the one that needs to read a config
file) looks like:

        protected void loadFile(String file) { // System.out.println("DEBUG:
                // loading Configuration");
                if (file == null) { // System.out.println("DEBUG: no 
Configuration
                        // file");
                        // TODO forse ci va qualche forma di debug?
                        return;
                }
                // else
                BufferedReader in = null;
                try {
                        in = new BufferedReader(new FileReader(file));


On May 17, 5:33 pm, asymmetric <[email protected]> wrote:
> hi!
>
> i'm writing an application that needs to call some functions of a 3rd
> party library (mjsip).
> I need to call a library method that reads a text file, and that takes
> the absolute filename's path as an argument.
> At first, the text file was in the res/raw, and i tried and reference
> it via getResources().openRawResourceFd(R.raw.conf), but the fact that
> it doesn't expose "paths" made me think that i had to use Assets
> instead.
> I then tried using assets combined with file descriptors (the openFd()
> method), to try and avoid the whole path issue, but an exception was
> raised saying that this method can only be called on uncompressed
> data, and that my text file probably is compressed.
>
> The getAssets().list method doesn't seem to wanna work (it only yields
> some results if i call it on "/", otherwise it does nothing at all).
>
> So, if i want to pass to another, non-native library the absolute path
> of a resource, how can i do that? (without using fds as it seems it's
> not allowed)
>
> thanks!
> asymmetric
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" 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-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to