
As you know, Android provides an excellent opportunity to
delegate part of the functionality of your application to third-party through
intents . In other words, we can send the necessary intent to the system and a third-party application will do all the necessary work for us, returning the finished result to us.
Examples of such actions may be scanning a QR code, sending an SMS message, a call, capturing the camera image of the phone, viewing the address or coordinates on a map, etc.
')
For different tasks in the intent it is necessary to specify different action, category, type, extras. And since this code is repeated from application to application and in order not to look for information about the required extent on stackoverflow each time, I decided to collect such intents into the
library .
At the moment, the collection has the following intents:
- Share Text - share text
- Send SMS - send SMS (your application does not need additional permissions)
- Send Email - send email
- Open Play Store - open the application page in the Play Store
- Show Location - show coordinates on the map
- Find Location - show place or address on map
- Show Street View - open Google Street View
- Show Location Settings - open the system settings screen to enable / disable GPS
- Call Phone - open a dialer with a phone number.
- Dial Phone - dial the number
- Open Link - open the link in the browser.
- Open Audio - open file in audio player
- Open Video - open file in video player
- Open Image - open image
- Open Text - open a text file.
- Pick File - select file from file system
- Pick Contact - select a contact from the phone book, considering the API version
- Capture Photo - make a photo
- Crop Image - crop photo

There is also a small demo that demonstrates work with existing intents, which can be downloaded from
Google Play .
If someone has thoughts about what intentions are missing, what could be improved or added - welcome!