Comments (12)
Yes, you can't just add yourself to any dialog.
Only dialog's occupants can add other users to a dialog they are in.
from quickblox-android-sdk.
First thing is I have already created a group dialog . Now, I would like to do that if any new user want to join this group, then how they will do this? What I have found that updateDialog() method will do this.
Suppose the user have the group id, then why they cannot able to join this group? If owner always do this, then how new user will join?
from quickblox-android-sdk.
So you can create a public group dialog, so any user in your app can join it
use dialog.setType(QBDialogType.PUBLIC_GROUP); when you create a dialog
from quickblox-android-sdk.
Thanks for your quick response, but for this is group code necessary at the time of updateDialog() method?
from quickblox-android-sdk.
No need to update a dialog then
from quickblox-android-sdk.
So can you please provide the code of Android 2.0 Beta version code, that if any new user join to existing public group.
from quickblox-android-sdk.
To create a dialog:
QBDialog dialog = new QBDialog();
dialog.setType(QBDialogType.PUBLIC_GROUP);
groupChatManager.createDialog(dialog, new QBEntityCallbackImpl<QBDialog>() {
@Override
public void onSuccess(QBDialog dialog, Bundle args) {
Log.i(TAG, "dialog: " + dialog);
}
@Override
public void onError(List<String> errors) {
handleErrors(errors);
}
});
from quickblox-android-sdk.
Sorry for late response, what you have provide I have already done, but after that I need the code which will use for join to this group by new user, i.e., a new member would like to join this specific group.
from quickblox-android-sdk.
Here it is
DiscussionHistory history = new DiscussionHistory();
history.setMaxStanzas(0);
currentChatRoom = groupChatManager.createGroupChat(dialog.getRoomJid());
currentChatRoom.join(history, new QBEntityCallbackImpl() {
@Override
public void onSuccess() {
log("join Room success");
// add listeners
currentChatRoom.addMessageListener(groupChatQBMessageListener);
}
@Override
public void onError(final List list) {
log("join Room error: " + list);
}
});
btw you can find all these examples here https://github.com/QuickBlox/quickblox-android-sdk/blob/new_api/snippets/src/com/quickblox/snippets/modules/SnippetsChat.java
from quickblox-android-sdk.
QBRoomChatManager roomChatManager = QBChatService.getInstance().getRoomChatManager();
it's old process by QuickBlox. Now on version 2.0 there are no such package. So, it for this reason I close this issue.
from quickblox-android-sdk.
You don't have appropriate permissions to perform this operation.
I am always getting above permission while adding members to group dialog.(PUBLIC).
First time it works fine , but second time it starts giving me this error. I am adding and removing from the same account which created the dialog.
Please help, I am using following method for it.
QBRequestUpdateBuilder requestBuilder = new QBRequestUpdateBuilder();
requestBuilder.push("occupants_ids", values);
QBGroupChatManager groupChatManager = QBChatService.getInstance().getGroupChatManager();
groupChatManager.updateDialog(qbDialog, requestBuilder, new QBEntityCallback<QBDialog>() {
@Override
public void onSuccess(QBDialog qbDialog, Bundle bundle) {
Log.v(TAG, "user added successfully");
}
@Override
public void onError(QBResponseException e) {
Log.v(TAG, "user added failed" + e.getMessage());
}
});
For Removing : QBRequestUpdateBuilder requestBuilder = new QBRequestUpdateBuilder();
// requestBuilder.push("occupants_ids", 378); // add another users
requestBuilder.pullAll("occupants_ids", values); // Remove yourself (user with ID 22)
QBGroupChatManager groupChatManager = QBChatService.getInstance().getGroupChatManager();
groupChatManager.updateDialog(qbDialog, requestBuilder, new QBEntityCallback<QBDialog>() {
@Override
public void onSuccess(QBDialog qbDialog, Bundle bundle) {
Log.v(TAG, "Removing success");
}
@Override
public void onError(QBResponseException e) {
Log.v(TAG, "Removing Failure"+e.getMessage());
}
});
from quickblox-android-sdk.
I am using the same code provided in sample of android chat code to join the group which i have created by this code :
currentChatRoom.join(history, new QBEntityCallbackImpl() {
@Override
public void onSuccess() {
log("join Room success");
// add listeners
currentChatRoom.addMessageListener(groupChatQBMessageListener);
}
@Override
public void onError(final List list) {
log("join Room error: " + list);
}
});
I am not getting entered in either of onSuccess()
and onError()
,control flow just goes bypassing callback methods.
from quickblox-android-sdk.
Related Issues (20)
- Not Working push notifications with Latest Firebase bom HOT 3
- Unexpected signature in session api HOT 2
- Message send issue if use same device for two different login HOT 1
- Audio/Video call connection issue (Not calling onReceiveNewSession method when call coming) HOT 1
- Corner Radius in QBRTCSurfaceView HOT 1
- Private chat Notification receiving for all the users HOT 3
- How to assign admin ownership to the second participant in the group HOT 1
- Automatic push subscription doesn't work. HOT 2
- Cannot create push subscriptions for two applications on one device HOT 5
- Crash on call service in android 12 HOT 2
- Cannot upload document files on Quickblox android HOT 6
- Issue with calling when login on multiple devices HOT 9
- Push subscription HOT 12
- Failed to resolve: HOT 1
- App is crashing internally due to the error in the SDK HOT 2
- Send Location and Contacts in Chat HOT 5
- Push Notification not working for call HOT 1
- Dialog Name As my Contact Name HOT 3
- Could not download chat-message-adapter-2.0.aar HOT 5
- QuickBlox CallService Compatibility Issue on Android 14 HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from quickblox-android-sdk.