Implement plugin on Spark 2.0.7

I have develop videoaudio plugin using sparkplugkit. Sparkplugkit using spark 1.1.0. My plugin is going well on spark 1.1.0 but when i try to put it on plugin directory on spark 2.0.7, my plugin didn’'t work. Anyone can help me?

one more question, how can i add an icon on button that i create from my plugin?

thnx for any attention…

Hi gde_big,

To get your plugin working with Spark 2.x start off by downloading the Sparkpluginkit 2.0.7. The only thing you’'ll probably have to do to make to your sparkplug work is to change your import statements from “com.jivesoftware.spark…” to “org.jivesoftware.spark…”.

As for your button question, that is going to depend somewhat on what sort of button you’'re talking about. Can you provide a sample of your code?

Thanks,

Ryan

i had follow ur step… but i found error when i compiling it because “org.jivesoftware.spark…” not found. any other suggestion?

i talk about button that i add on chatWindow. this is my simple code :

private void addChatRoomButton(){

// Retrieve ChatManager from the SparkManager

ChatManager chatManager = SparkManager.getChatManager();

// Create a new ChatRoomButton.

final ChatRoomButton Videobutton = new ChatRoomButton(“Video”);

final ChatRoomButton Audiobutton = new ChatRoomButton(“Audio”);

// Add to a new ChatRoom when the ChatRoom opens.

chatManager.addChatRoomListener(new ChatRoomListenerAdapter() {

public void chatRoomOpened(final ChatRoom room) {

room.getToolBar().addChatRoomButton(Videobutton);

room.getToolBar().addChatRoomButton(Audiobutton);

Videobutton.addActionListener(new ActionListener() {

public void actionPerformed(ActionEvent e) {

//Action

}

});

Audiobutton.addActionListener(new ActionListener() {

public void actionPerformed(ActionEvent e) {

//Action

}

});

}

public void chatRoomLeft(ChatRoom room) {

room.getToolBar().removeChatRoomButton(Videobutton);

room.getToolBar().removeChatRoomButton(Audiobutton);

}

});

}

i just follow the example on sparkplug_dev_guide.

And one another problem that i found… how to make the button on chatWindow is visible for all chat window but invisible for conference chat window? my button that i make with the code above, is visible only for the newest chatWindow n it visible on conference chat window too… thnx for ur attention…

I’‘m sorry… it seems that i’'m not read your post very carefully… i had download sparkplugkit_2_0_7 n now my plugin run well on spark 2_0_7. but i have one problem…

my plugin is adding a button on chatroom… when the focus is moving on the newest tab chat, the button is appear on the newest tab chat but it disappear on the old one. i want that my button is still exist on all tab chat room. I trying to use method chatRoomActivated but it’‘s seems didn’'t work. I hope more suggestion for my problem… ow and one more question… how i can add an icon on my button? thnx for any suggestion…

this is my code at my plugin :

chatManager.addChatRoomListener(new ChatRoomListenerAdapter() {

public void chatRoomOpened(final ChatRoom room) {

if (room instanceof ChatRoomImpl){

room.getToolBar().addChatRoomButton(Videobutton);

room.getToolBar().addChatRoomButton(Audiobutton);

}

Videobutton.addActionListener(new ActionListener() {

public void actionPerformed(ActionEvent e) {

//Action

}

});

Audiobutton.addActionListener(new ActionListener() {

public void actionPerformed(ActionEvent e) {

//Action

}

});

}

public void chatRoomActivated(final ChatRoom room){

System.out.println(“room activated”);

if (room instanceof ChatRoomImpl){

room.getToolBar().addChatRoomButton(Videobutton);

room.getToolBar().addChatRoomButton(Audiobutton);

}

Videobutton.addActionListener(new ActionListener() {

public void actionPerformed(ActionEvent e) {

//Action

}

});

Audiobutton.addActionListener(new ActionListener() {

public void actionPerformed(ActionEvent e) {

//Action

}

});

}

});

}