You can't force an app you don't "own" to use only your app to handle an 
Intent. That's not the Android design philosophy.

The best you can do is put in an intent filter in your manifest for an 
intent. When that intent is matched, your app will get it, unless other 
apps also match. If more than one app matches, the user gets a chance to 
pick the one to use. Users can choose to use the app they've picked for all 
similar actions, after which the chooser is no longer activated and the 
intent goes directly to the chosen app.

What you can do is tell users to choose your app when they open a CSV file. 
If that option doesn't appear, they have to clear options in the mail app's 
entry in App settings.

This is a feature. If you forced users to use your app for *any* CSV file, 
they'd never be able to look at Excel CSVs, etc.

What you might want to do is use your own custom MIME type for the file 
you're sending. You can still use CSV format, but with a custom MIME type 
you can have an intent filter that only handles that type.

On Sunday, May 13, 2012 11:07:29 PM UTC-7, Kanika Sayal wrote:
>
> I am developing a simple application where the requirement says that 
> If there is any email attachment with .csv file extension then on long 
> press of that email attachement should open an option to user that 
> "Download and open this attachment with MYAPP". So When the user 
> clicks on "MyAPP" then it automatically get downloaded and open with 
> MYAPP.. Here I am using IntentFilter, but that IntentFilter works 
> after that attachment downloaded and saved into sdcard. 
>
> So anyone please help me on how can I implement that Click on email 
> attachment would open an option to open the attachment with myapp?? 
>
> Thanks...

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

Reply via email to