I want to serialize an object in a file and share it between 2
application. I have made a contentProvider to do it with a SqlLiteDb.
Now I want to hendle the file to the uri... How I can do it... My db
has the _id, name, _data columns...
When I try do..

Uri uri=Uri.parse("content://P2P/condivisioni/MappaCondivisioni");
                try{
                        uri = myContext.getContentResolver().insert(uri, null);


                        try {
                                myLogger.log(Logger.INFO,"Sto per creare un 
output stream");
                                OutputStream outStream =
myContext.getContentResolver().openOutputStream(uri);
                                myLogger.log(Logger.INFO,"Creato outputstream");
                                ObjectOutputStream output=new 
ObjectOutputStream(outStream);
                                myLogger.log(Logger.INFO,"Creato un 
Objectoutputstream");
                                output.writeObject(Mappa);
                                myLogger.log(Logger.INFO,"Scrivo l'oggetto");
                                output.close();
                        } catch (IOException e) {
                                // TODO Auto-generated catch block
                                myLogger.log(Logger.SEVERE,e.toString());
                        }
                }catch (IllegalArgumentException e) {
                                myLogger.log(Logger.SEVERE,e.toString());
                }catch (SQLException e) { ......



I catch :
java.io.FileNotFoundException: No files supported by provider at
content://P2P/condivisioni/MappaCondivisioni

well where is the problem?
what I must put in the data field...

I have tryied with the real path of a file and with the
content://P2P/condivisioni/MappaCondivisioni uri

always the same exception....

help me please....
If you have an example with file hendled
a content provider that hendle file
.....
Sorry for my english
bye

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to