mirror of
https://github.com/moparisthebest/Yaaic
synced 2025-01-07 11:48:08 -05:00
New helper: Broadcast.createServerIntent()
This commit is contained in:
parent
acb09a3b8a
commit
381601d521
@ -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;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user