What is an intent-Filter?

What is an intent-Filter?


An intent can be used to open another app with your desired behaviour such as taking a picture.
an intent filter however defines your app can be opened
that means, if you develop  photo pp for example that you cn set up intent-filter that allows other apps to start your app to take a photo

Declaring an intent-Filter



Action: this is the type of action you want to peovide to other apps. in this example i open a .txt file in my pp that was opened from another app.
Categorey : you can define categories to add additionl behaviour . in this example  dded the Browsble caategory, so this filter will also respond to .txt opened in  browser .
Data: the mimeType defines the file ending you want to open . and i also dded two schemes to define that we actualy want to open a file that contains content.

Post a Comment

0 Comments