ich diesen Code mit einem Screenshot der Partitur zu teilen:Android Aktie Bild auf Snapchat
Intent sharingIntent = new Intent(Intent.ACTION_SEND);
sharingIntent.setType("image/png");
Uri image = Uri.parse(Environment.getExternalStorageDirectory().toString() + "/sharescore.png");
try {
// create bitmap screen capture
View v1 = v.getRootView();
v1.setDrawingCacheEnabled(true);
Bitmap bitmap = Bitmap.createBitmap(v1.getDrawingCache());
v1.setDrawingCacheEnabled(false);
File imageFile = new File(image.getPath());
FileOutputStream outputStream = new FileOutputStream(imageFile);
int quality = 100;
bitmap.compress(Bitmap.CompressFormat.JPEG, quality, outputStream);
outputStream.flush();
outputStream.close();
} catch (Throwable e) {
// Several error may come out with file handling or OOM
e.printStackTrace();
}
sharingIntent.putExtra(Intent.EXTRA_STREAM, image);
startActivity(Intent.createChooser(sharingIntent, getString(R.string.share_via)));
Es funktioniert gut für WhatsApp Twitter usw., aber nicht für Snapchat und Instagram auch wenn ich die „imgae/jpeg "eingeben. Dies führt zu dem Fehler "ausgewähltes Bild kann nicht geöffnet werden". Wie kann ich das für Snapchat und Instagram machen?
Danke für Ihre Antwort, aber ich habe das Problem bereits selbst gelöst – cmtut