question: void invite ( ) { if ( mGrid . getCheckedItemCount ( ) <= 0 ) { return ; } List < String > to = null ; int [ ] keys = SparseArrays . trueKeys ( mGrid . getCheckedItemPositions ( ) ) ; for ( int pos : keys ) { EasyCursor c = ( EasyCursor ) mGrid . getItemAtPosition ( pos ) ; if ( c . isNull ( Contacts . GLOBAL_ID ) && ! c . isNull ( Contacts . EMAIL ) ) { if ( to == null ) { to = new ArrayList < > ( keys . length ) ; } String email = c . getString ( Contacts . EMAIL ) ; if ( ! email . contains ( "\t" ) ) { to . add ( email ) ; } else { CollectionUtils . addAll ( to , email . split ( "\t" ) ) ; } } } if ( to != null ) { sendInvite ( to , this ) ; event ( "friends" , "invite" , to . size ( ) ) ; } }
target:  Start an email app to send an invitation to selected contacts.