Closed Bug 870157 Opened 12 years ago Closed 12 years ago

Pick MozActivity does not support generic type

Categories

(Firefox OS Graveyard :: General, defect)

x86
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: jugglinmike, Unassigned)

References

Details

The "pick" MozActivity should support a generic media type, for instance:

```
new MozActivity({
  name: 'pick',
  data: {
    type: '*/*'
  }
})
```

in order to allow the user to select any type of media. This is particularly relevant for MMS, where a user may want to attach audio, video, or image media. Ideally, this interaction could be supported with a single UI element which triggered a MozActivity as described above.
Probably likely a web activities gecko bug.
Component: Gaia → General
Blocks: 870158
I think you should be able to do that with a regexp.
I was unable to get this working with a regexp (i.e. `type: /.*/`), but I did find that not specifying a `type` attribute triggers the desired behavior. Should I consider this behavior stable?

(I found an example of this usage in the "Firefox OS Boilerplate App" project: https://github.com/robnyman/Firefox-OS-Boilerplate-App/blob/b067664245e3f61fe30508d994cc0d0fb627bbc0/js/webapp.js#L45-L64 )
Not specifying the type effectively ignores it when looking for a match. I misread your question as being an activity provider. In this case you can use regexpes in your manifest like https://github.com/mozilla-b2g/gaia/blob/master/apps/browser/manifest.webapp#L48
This is just what I needed; I was assuming a non-existent API. Thanks for the information!
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.