Just for the record, this code is working... I had messed up the versions
that was the problem!

On 22 January 2011 18:09, Pedro Duque <pmdu...@gmail.com> wrote:

> Hi,
>
> I'm trying to send a file through email and them open it when it's received
> on the email.
>
> To send the file I use:
>                     Intent sendIntent = new
> Intent(Intent.ACTION_SEND_MULTIPLE);
>
> sendIntent.setType("application/vnd.portugalemgrande.clock");
>                     sendIntent.putExtra(Intent.EXTRA_SUBJECT, "Check this
> out: "+cp.getClock_name());
>                     //Attachs
>                     ArrayList<Uri> uris = new ArrayList<Uri>();
>
> uris.add(Uri.parse("file://"+fn.getPath()+File.separator+"clock"+type+".png"));
>
> uris.add(Uri.parse("file://"+fn.getPath()+File.separator+"clock"+type+".dcp"));
>
> sendIntent.putParcelableArrayListExtra(Intent.EXTRA_STREAM, uris);
>
> I don't have problems receiving the email back on the terminal, but I can't
> manage to open the .dcp file from the email reader (I can only read it if I
> save it to the sdcard and use a file manager to open it). My intent-filter
> is as follows:
>
>             <intent-filter>
>                 <action android:name="android.intent.action.MAIN" />
>                 <category android:name="android.intent.category.LAUNCHER"
> />
>             </intent-filter>
>             <intent-filter>
>                 <action android:name="android.intent.action.VIEW" />
>                 <category android:name="android.intent.category.DEFAULT" />
>                 <category android:name="android.intent.category.BROWSABLE"
> />
>                 <data
> android:mimeType="application/vnd.portugalemgrande.clock"/>
>             </intent-filter>
>             <intent-filter>
>                 <action android:name="android.intent.action.VIEW" />
>                 <category android:name="android.intent.category.DEFAULT" />
>                 <category android:name="android.intent.category.BROWSABLE"
> />
>                 <data android:scheme="file"
>                 android:mimeType="*/*"
>                 android:pathPattern=".*\\.dcp"
>                 android:host="*"/>
>             </intent-filter>
>
> What am I doing wrong?
>
> Thanks,
> Pedro Duque
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to