简体   繁体   中英

Android File Association

How do I have a new file type launch my app?

For example if I have a new file type 'file.mjl' and I receive this file as an email, I want Android to associate this file type with my app and allow me to open / save it.

You need to add an intent-filter to the activity you want to launch to work with that file. Here is a link to a great example on that subject:

https://developer.android.com/guide/topics/intents/intents-filters.html

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM