public static boolean sendPersonBroadCast(Context context, int type, Person person) { Intent intent = new Intent(IvyMessages.INTENT_PERSON); intent.putExtra(IvyMessages.PARAMETER_PERSON_TYPE, type); intent.putExtra(IvyMessages.PARAMETER_PERSON_VALUE, PersonManager.getPersonKey(person)); context.sendBroadcast(intent); return true; }
public static boolean sendMessageIntent( Context context, int messageType, int messageState, int id, int type, String content, boolean isMeSay, Person person) { Intent intent = new Intent(IvyMessages.INTENT_MESSAGE); intent.putExtra(IvyMessages.PARAMETER_MESSAGE_TYPE, messageType); intent.putExtra(IvyMessages.PARAMETER_MESSAGE_ID, id); intent.putExtra(IvyMessages.PARAMETER_MESSGAE_STATE, messageState); intent.putExtra(IvyMessages.PARAMETER_MESSAGE_FILE_TYPE, type); intent.putExtra(IvyMessages.PARAMETER_MESSAGE_FILE_VALUE, content); intent.putExtra(IvyMessages.PARAMETER_MESSAGE_SELF, isMeSay); intent.putExtra(IvyMessages.PARAMETER_MESSAGE_PERSON, PersonManager.getPersonKey(person)); context.sendOrderedBroadcast(intent, null); return true; }