A small library which will save you from writing the same intent creation code again and again for the most simple tasks

Overview

Android Intents

A small library which will save you from writing the same intent creation code again and again for the most simple tasks. I found myself writing my own library to create some common intents I was using across projects, so we decided to push that code to a project everyone could contribute to.

You can find a comprehensive list of all intents that can be used in the sample application. Here are some sample methods to show you how to do some simple things:

  • Email intents:

    EmailIntents.newEmailIntent( "[email protected]", "My subject", "Hey there!" )

  • Phone intents:

    PhoneIntents.newDialNumberIntent(null)

    PhoneIntents.newCallNumberIntent("+123456789")

    PhoneIntents.newDialNumberIntent("+123456789")

    PhoneIntents.newSmsIntent("+123456789", "this is a test SMS")

    PhoneIntents.newSmsIntent("this is a test SMS")

    PhoneIntents.newPickContactIntent()

    PhoneIntents.newPickContactWithPhoneIntent()

  • Geo intents:

    GeoIntents.newMapsIntent( "Musée du Louvre 75058 Paris", "Le Louvre" )

    GeoIntents.newMapsIntent( 43.481055f, -1.561959f, "My label for that place" )

    GeoIntents.newStreetViewIntent( 43.481055f, -1.561959f )

    GeoIntents.newNavigationIntent( "1 rue du Louvre 75058 Paris, France" )

  • System intents:

    SystemIntents.newMarketForAppIntent( getApplicationContext() )

  • Media intents:

    MediaIntents.newPlayYouTubeVideoIntent("b_yiWIXBI7o")

    MediaIntents.newPlayImageIntent("http://upload.wikimedia.org/wikipedia/commons/thumb/a/a9/Biarritz-Plage.JPG/1920px-Biarritz-Plage.JPG")

    MediaIntents.newPlayAudioIntent("http://www.stephaniequinn.com/Music/Allegro%20from%20Duet%20in%20C%20Major.mp3")

    MediaIntents.newPlayVideoIntent("https://www.youtube.com/watch?v=b_yiWIXBI7o")

    MediaIntents.newOpenWebBrowserIntent("http://vincentprat.info")

    MediaIntents.newTakePictureIntent(Environment.getExternalStorageDirectory().toString() + "/temp.jpg")

    MediaIntents.newSelectPictureIntent()

This project has now been initiated with a few intents but we are looking forward to integrating your own intents to ease each developer's life.

Some rules for contributors:

  • If the intent you are creating does not fit into any of the provided utility classes (EmailIntents, GeoIntents, ...), do not hesitate to create your own. Those classes are meant to be simple factories with only static methods.
  • If the intent you are creating is specific to an application (like a particular Twitter client), please put the utility class in a sub-package named after that application.

Usage

The easiest way to get the library included in your project is by using Gradle. Simply add the following line to your dependencies block:

dependencies {
    compile 'com.marvinlabs:android-intents:1.5.1@aar'
}

Of course, you can replace the version number by whichever version you need (you can have a look at this repository's tags to know which is the latest).

Change log

1.5.1 (2015-05-07)

  • [New] allow multiple numbers in send SMS intent
  • [Fix] Honor default sms package on API > 19

1.4.0 (2015-04-27)

  • [New] pick contacts
  • [New] open youtube video
  • [New] media intents to open video, audio and image
  • [New] "map" intent can now have a label
  • [New] refactored the build scripts

1.3.0 (2013-06-23)

  • [New] "map" intent on coordinates
  • [New] "navigate to" intents

1.2.0 (2013-06-19)

  • [New] a demo
  • [New] Android Studio support
  • [New] maven repository support

1.1 (2013-06-19)

  • [New] intents to open the app markets
You might also like...
Same as the Outlined text fields presented on the Material Design page but with some dynamic changes. 📝 🎉
Same as the Outlined text fields presented on the Material Design page but with some dynamic changes. 📝 🎉

README SSCustomEditTextOutlineBorder Getting Started SSCustomEditTextOutLineBorder is a small kotlin library for android to support outlined (stroked)

TSBattery a new way to save your battery avoid cancer apps hacker it.

TSBattery TSBattery a new way to save your battery avoid cancer apps hacker it. TSBattery 是一个旨在使 QQ、TIM 变得更省电的开源 Xposed 模块 Get startted 此模块支持原生 Xposed

Mi-FreeForm - An APP that is activated through Shizuku/Sui and can display most apps in the form of freeform
Mi-FreeForm - An APP that is activated through Shizuku/Sui and can display most apps in the form of freeform

Mi-FreeForm 简体中文 Mi-FreeForm is an APP that is activated through Shizuku/Sui and

A logger with a small, extensible API which provides utility on top of Android's normal Log class.
A logger with a small, extensible API which provides utility on top of Android's normal Log class.

This is a logger with a small, extensible API which provides utility on top of Android's normal Log class. I copy this class into all the little apps

[Deprecated] Sexy way to execute async/background tasks on Android

Groundy library for Android @Deprecated Unfortunatenly this library is no longer maintained, we encourage you to use other widely supported solutions

The most comprehensive utils of ViewBinding.

ViewBinding reduces exceptions caused by id or type errors, which are recommended by both Google officials and Jake Wharton, but it can be a bit cumbersome to use, so this library can help you use ViewBinding with as little code as possible in any usage scenario.

A small utility to record Android device screen to a GIF
A small utility to record Android device screen to a GIF

RoboGif A small utility to record Android device screen to an optimized GIF so you can paste it to GitHub or a similar service. Requirements Python 2.

A collection of small utility functions to make it easier to deal with some otherwise nullable APIs on Android.

requireKTX is a collection of small utility functions to make it easier to deal with some otherwise nullable APIs on Android, using the same idea as requireContext, requireArguments, and other similar Android SDK methods.

Small utility to create/restore encrypted backups

Quick Backup Choose some files and quickly create a complete encrypted and compressed file. Usage Clone the repository Run gradlew installShadowDist T

Comments
  • Honor default sms package on API > 19

    Honor default sms package on API > 19

    Otherwise user will be prompted with chooser and could end up with app with no permission to send sms. Also, allow multiple recipients as for phoneNumber

    opened by almozavr 1
  • Modify Action-and-Uri for Email intent, var args for addresses

    Modify Action-and-Uri for Email intent, var args for addresses

    Main problem is: MIME_TYPE_EMAIL = "message/rfc822"; is not only for email clients but for many others (e.g. with mhtml support), that's why user could end up opening evernote from many options, even if he has one default mail client.

    opened by almozavr 0
  • Add Intent picker with explicit/implicit intents

    Add Intent picker with explicit/implicit intents

    For some intents, such as navigation or maps, some apps don't support the google way or don't follow any standard intent patterns.

    Would be good to have an intent picker that could be initialized with some explicit intents (launching a particular app if available) and all apps responding to the default implicit intent (which could reply to the supposed standard intent for that action).

    Idea comes from http://datamoil.blogspot.fr/2011/04/android-universal-intent-to-start.html

    enhancement 
    opened by vpratfr 0
  • Add intents for Locale

    Add intents for Locale

    The Locale app distributes its intents in source form. A canonical source would be nice.

    Although, getting into contact with twofourtyfour (the developer) to hash out licensing might be necessary.

    opened by hakan42 0
Owner
MarvinLabs
Digital creative studio
MarvinLabs
compaKTset is a small library aimed at providing you with the most memory efficient Set implementation for any particular data type of your choosing.

compaKTset is a small library aimed at providing you with the most memory efficient Set implementation for any particular data type of your choosing.

Ignat Beresnev 3 Nov 16, 2021
Type safe intent building for services and activities

#IntentBuilder Type safe intent building for services and activities. IntentBuilder is a type safe way of creating intents and populating them with ex

Emil Sjölander 348 Oct 10, 2022
🎁 Android Intent & Bundle extensions that insert and retrieve values elegantly.

?? Android Intent & Bundle extensions that insert and retrieve values elegantly.

Jaewoong Eum 233 Dec 13, 2022
Criminal-Intent - An android app used to record office crimes

What is Criminal Intent? CriminalIntent records the details of “office crimes” –

Mohammad Rashid 1 Feb 11, 2022
adds an option to the Android Sharesheet that allows you to save files to your device.

Save On Device adds an option to the Android Sharesheet that allows you to save files to your device. Download Get the app from the Google Play Store

null 24 Nov 29, 2022
A helper library to ease the most repetitive codes with simple reusable attributes.

ak-universal-android-helper A helper library to ease the most repetitive codes with simple reusable attributes. AKUAH can help you with many repetitiv

Aakash Kumar 20 Jul 8, 2020
This project aims to simplify creation of basic Arduino programs by just editing a UI on Android.

ArdUI A video explanation If you are more a fun of video explanation go to this youtube video Project aim This project aims to simplify creation of ba

Targist 21 Nov 19, 2022
SharedPreference Library to save all types including your custom types and observe them if need be.

A SharedPreference Library that can be used to store all types including your custom classes and observe them too if needed.

Ehma Ugbogo 18 Nov 10, 2021
writing into android application lib.so with offset & hex bytes

KMrite writing into android application lib.so with offset & hex bytes support root and non root devices Changelogs 3.1 : fix hex input only number up

BryanGIG 13 Nov 28, 2022
Small Android library to help you incorporate MVP, Passive View and Presentation Model patterns in your app

DroidMVP About DroidMVP is a small Android library to help you incorporate the MVP pattern along with Passive View and Presentation Model (yes, those

Andrzej Chmielewski 225 Nov 29, 2022