Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4362: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4364: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4365: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4366: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
anddev.org • View topic - share intent video?

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() {
      a.setDrawingCacheEnabled(true);
      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 {
          file.createNewFile();
          FileOutputStream fo = new FileOutputStream(file);
          fo.write(bytes.toByteArray());
      } catch (IOException e) {                       
              e.printStackTrace();
      }
      
      Intent shareIntent = new Intent(android.content.Intent.ACTION_SEND);
      shareIntent.setType("image/png");
      shareIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET);
   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,.
xyz
Once Poster
Once Poster
 
Posts: 1
Joined: Fri Jul 13, 2012 10:38 pm

Top

Return to Novice Tutorials

Who is online

Users browsing this forum: No registered users and 9 guests