New helper: Broadcast.createServerIntent()

This commit is contained in:
Sebastian Kaspari 2010-03-24 19:23:07 +01:00
parent acb09a3b8a
commit 381601d521
1 changed files with 18 additions and 2 deletions

View File

@ -39,12 +39,12 @@ public abstract class Broadcast
public static final String EXTRA_CONVERSATION = "conversation";
/**
* Create an intent for conversation broadcasting
* Create an Intent for conversation broadcasting
*
* @param broadcastType The type of the broadcast, some constant of Broadcast.*
* @param serverId The id of the server
* @param conversationName The unique name of the conversation
* @return
* @return The created Intent
*/
public static Intent createConversationIntent(String broadcastType, int serverId, String conversationName)
{
@ -55,4 +55,20 @@ public abstract class Broadcast
return intent;
}
/**
* Create an Intent for server broadcasting
*
* @param broadcastType The typo of the broadcast, some constant of Broadcast.*
* @param serverId The id of the server
* @return The created Intent
*/
public static Intent createServerIntent(String broadcastType, int serverId)
{
Intent intent = new Intent(broadcastType);
intent.putExtra(Broadcast.EXTRA_SERVER, serverId);
return intent;
}
}