Register to be able to open files of custom type. Say i have .cool files, and if the user tries to oepn it, Android asks if they would like to open it with my application. How?
+1
A:
I think that you don't choose that. This is handle by the system. Same thing when you send an intent to be handled by a map, If you have skyfire for instance, the system pops up a window an you can choose the application and choose if you want it to always open this kind of file.
Unless of course if your application is the only one to open this kind of file.
Edit
I think if you want your app to say "hey I'm able to open these .cool files", you need to set up <intent-filters>
with a tag <data>
and specificy the mimeType or Uri. Check here for more details.
Sephy
2010-08-12 07:11:38
He is asking how to specify that his application can handle a filetype.
alexanderblom
2010-08-12 07:20:30
true, I added some stuff.
Sephy
2010-08-12 07:33:01
Can I please have a full working example?
Aymon Fournier
2010-08-12 07:50:00
The manifest part, and also starting the activity, and retrieving the file from someone selecting my application
Aymon Fournier
2010-08-12 07:54:50
I don't have time now to right and test something. Try to do it please, I'll have a look later if I have time.
Sephy
2010-08-12 08:05:54
do I get extras from intent?
Aymon Fournier
2010-08-12 08:06:46
I told you, I don't know right now, I have to run some tests and code. I'm not using that all the time.
Sephy
2010-08-12 08:36:50
Meh I figured it out
Aymon Fournier
2010-08-12 18:19:59
Did my advice help you dig in the right direction?Sorry I've been on the train all day...
Sephy
2010-08-12 21:50:15