share intent video?

Basic Tutorials concerning: GUI, Views, Activites, XML, Layouts, Intents, ...

share intent video?

Postby xyz » Fri Jul 13, 2012 11:01 pm

hei,.im sory for my bad english,i have an code like this
Code: Select all
private Intent shareIt() {
      Bitmap icon = a.getDrawingCache();
      ByteArrayOutputStream bytes = new ByteArrayOutputStream();
      icon.compress(Bitmap.CompressFormat.JPEG, 100, bytes);
      File file = new File(Environment.getExternalStorageDirectory() + File.separator + "temporary_file.jpg");
      try {
          FileOutputStream fo = new FileOutputStream(file);
      } catch (IOException e) {                       
      Intent shareIntent = new Intent(android.content.Intent.ACTION_SEND);
   Uri uri = Uri.parse("file:///sdcard/temporary_file.jpg");
      shareIntent.putExtra(Intent.EXTRA_STREAM, uri);
      startActivity(Intent.createChooser(shareIntent, "Share via"));
      return shareIntent;

the code is for share image using share intent,
and the problem is ,how to share video using share intent like that code??
variable a on that code is imageview,i use video view to share video but on getDrawingCache() is not suported with videoview,..any sugest for that problem,..??

thanks before,.
Once Poster
Once Poster
Posts: 1
Joined: Fri Jul 13, 2012 10:38 pm


Return to Novice Tutorials

Who is online

Users browsing this forum: No registered users and 5 guests