Ich habe Code zum hochladen Bild und Video zu Gesicht Buch .. Aber ich weiß nicht, wie man Bild von Galerie zu konvertieren Bild in Bytes .. auch Daten in Bytes .. Jeder kann mir helfen ????Bild von der Galerie zu Bild in Bytes .. auch Daten in Bytes .. für Facebook hochladen in Android
*Upload picture,
Bundle params = new Bundle();
params.putByteArray("picture", <image in bytes>);
params.putString("message", "Have fun");
mAsyncRunner.request("me/photos", params, "POST", new SampleUploadListener());*
this is code for upload images...
*Upload video,
Bundle params = new Bundle();
param.putString("filename", <dataName>);
param.putByteArray("video", <data in bytes>);
mAsyncRunner.request("me/videos", param, "POST", new SampleUploadListener());**
this is code for upload images...
Any one know how code for my question please post.....
Dank im Voraus
Fileinputstream ist = ne w FileInputStream (neue Datei (Dateipfad)); ByteArrayOutputStream bs = neues ByteArrayOutputStream(); int Daten; while ((Daten! = Is.read())! = -1) bs.write (data); is.close(); byte [] rohe = bs.toByteArray(); bs.close(); – anoop
Daten sind nicht initialisiert, muss ich auf 0 initiieren –