Portrait/Landscape shifting and mailing

All your problems with Audio, Video and Images.

Portrait/Landscape shifting and mailing

Postby IskaNL » Sun Nov 14, 2010 8:04 pm

Hey everyone,

I'm currently stuck the following problems:
- Sending bitmap
In my current app I create bitmap's which are saved to a file on the phone or on an external storage. I'm currently trying to enable the user to send the file using the ACTION_SEND intent.
First I retrieve the URI of the file I'm trying to send:
Code: Select all
Uri FileURI = null;
       
       if (itemLocation == CONSTANTS.STORAGE_PHONE)
       {
          FileURI = Uri.fromFile(new File(Environment.getDataDirectory(), "wpp.page." + PageNumber + "." + noteName + ".png"));
       }
       else if (Environment.MEDIA_MOUNTED.equals(Environment.getExternalStorageState()))
       {
          FileURI = Uri.fromFile(new File(Environment.getExternalStorageDirectory(), "wpp.page." + PageNumber + "." + noteName + ".png"));
       }
       return FileURI;


Which works correctly (checked it).
Then I open the Intent to send the file:
Code: Select all
       Intent SendMessageIntent = new Intent(android.content.Intent.ACTION_SEND); 
       SendMessageIntent.setType("image/png");
       
       SendMessageIntent.putExtra(Intent.EXTRA_STREAM, SupFunc.retrieveURI(CurrentNoteStorage, CurrentNoteName, CurNotePadView.CurrentBitmap));
      
       startActivity(Intent.createChooser(SendMessageIntent, "Send your note using:"));


The Intent opens up, but the problem is that is refuses to add the image (error message)! I couldn't find anything about this topic on Google :(. Does anybody know how I can add a 'private' file to the intent?

- Portrait/Landscape shifting
The second the problem is that when the user set the view to portrait or landscape while he was busy with a bitmap in another view, the size of the viewport changes and therefore the bitmap! Is there an easy fix for this?

Thanks in advance!

PS: bad english can be blamed on my dutch heritage ;)
IskaNL
Freshman
Freshman
 
Posts: 2
Joined: Sun Nov 14, 2010 7:50 pm

Top

Re: Portrait/Landscape shifting and mailing

Postby IskaNL » Wed Nov 17, 2010 4:52 pm

Nobody?
IskaNL
Freshman
Freshman
 
Posts: 2
Joined: Sun Nov 14, 2010 7:50 pm

Top

Return to Multimedia Problems

Who is online

Users browsing this forum: No registered users and 12 guests