The location module connects app users with each other and their environment. Using GPS locations, map integrations and local data, end users can literally 'see' each other on the map and engage with other users, points of interest, and objects..
// create point // initialize the geodata object QBLGeoData geoData = new QBLGeoData(); geoData.setStatus("I’m on Baker street, London!"); Location loc = QBLLocationDataSource.getInstance().getCurrentLocation(); geoData.setLatitude(loc.getLatitude()); geoData.setLongitude(loc.getLongitude()); // create new point QBLocationService.postGeoData(geodata, this);
// create point QBLGeoData *geoData = [QBLGeoData geoData]; geoData.status = @"I’m on Baker street, London!"; geoData.latitude = 51.52322; geoData.longitude = -0.15778; [QBLocation createGeoData:geoData delegate:self];
//Create connection this.QBlox = new QuickBloxSDK_Silverlight.QuickBlox(AppID, OwnerID, this.AuthKey, this.AuthSecret, null, true, this.GetDeviceUniqueID()); //Setup event handler this.QBlox.geoService.GeoServiceEvent += new QuickBloxSDK_Silverlight.Geo.GeoService.GeoServiceHandler(geoService_GeoServiceEvent); //Add location this.QBlox.geoService.AddGeoLocation(new GeoData(578, decimal.Parse("51,46546546"), decimal.Parse("122,6565465"), "I’m on Baker street, London!")); //Get Location by identifier this.QBlox.geoService.GetGeoLocation(12317); void geoService_GeoServiceEvent(QuickBloxSDK_Silverlight.Geo.GeoServiceEventArgs Args) { this.Dispatcher.BeginInvoke(new Action(() => { GeoData Location = (GeoData)Args.result; } }
curl -X POST -d "geo_data[latitude]=23 &geo_data[longitude]=34 &geo_data[status]=hello &token=fef1be67941e43d654987d21cd50a15fe28113f8" http://api.quickblox.com/geodata
Engage and socialize your users with the chat module. Features include: Peer to Peer Chat; Group chat; Attachments (photos, videos, location); Video chat; Location based chat; AR chat; Push notification for offline users.
// initialize the message object QBChatMessage message = new QBChatMessage(); message.setText("Hi, Sam. What do you think about cinema today evening?"); message.setRecipientId(4); message.setSenderId(78); // send message QBChatService.getInstance().setDelegate(this); QBChatService.getInstance().sendMessage(message);
// initialize the message object QBChatMessage *message = [[QBChatMessage alloc] init]; message.text = @"Hi, Sam. What do you think about cinema today evening?"; message.recipientID = userOpponent.ID; message.senderID = currentUser.ID; // send message [QBChat instance].delegate = self; [QBChat instance] sendMessage:message]; [message release];
//Create connection this.QBlox = new QuickBloxSDK_Silverlight.QuickBlox(AppID, OwnerID, this.AuthKey, this.AuthSecret, null, true, this.GetDeviceUniqueID()); //Setup event handler for GeoService events this.QBlox.geoService.GeoServiceEvent += new GeoService.GeoServiceHandler(geoService_GeoServiceEvent); //Post new Message this.QBlox.geoService.AddGeoLocation(new GeoData(UserID, 0, 0, MessageManager.CreateChatMessage("Hi, Sam. What do you think about cinema today evening?"))); // Event Handler for Background events void QBlox_BackgroundEvent(string Command, object Result) { this.Dispatcher.BeginInvoke(new Action(() => { //Get from all geoData all chat Messages var res = MessageManager.GetChatMessages(QBlox.GeoData); })); }
The users module helps you manage your user base across all platforms – and retain them. It includes a simple authentication process with Single Sign-On and integration across all popular platforms. This integrates easily with your existing DB.
// sign in // initialize the user object QBUUser user = new QBUUser(); user.setOwnerID(18); user.setLogin("kevin"); user.setPassword("incredibleworld"); // authenticate QBUsersService.authenticateUser(user, this);
// authenticate user [QBUsers logInWithUserLogin:@"garry" password:@"mc56f" delegate:self];
//Create connection this.QBlox = new QuickBloxSDK_Silverlight.QuickBlox(AppID, OwnerID, this.AuthKey, this.AuthSecret, null, true, this.GetDeviceUniqueID()); //Setup Eventhandler this.QBlox.userService.UserServiceEvent += new QuickBloxSDK_Silverlight.users.UserService.UserServiceHandler(userService_UserServiceEvent); //Create new user this.QBlox.userService.AddUser(new User { Email = "vova@rsk-k1611.com", Password="12345", Username = "Rsk-k161" }); //Authenticate with this user this.QBlox.userService.Authenticate("rsk-k161", "12345"); //Get User by identificator this.QBlox.userService.GetUser(35, false); //User service event handler void userService_UserServiceEvent(QuickBloxSDK_Silverlight.users.UserServiceEventArgs Args) { this.Dispatcher.BeginInvoke(new Action(() => { User user = (User)Args.result; } }
curl -X POST -d "user[login]=kevin &user[password]=incredibleworld &user[owner_id]=18 &token=7c1215fd0c682c8b4aa2f75979d618485297e5c0" http://api.quickblox.com/users
Send, stream, store, share and save content. Stream movies, securely store business data, allow users to share file attachments to each other. The module is also a CMS — update your app's content without having to republish.
// upload file Drawable image = getResources().getDrawable(R.drawable.userAvatar); QBBlobsService.TUploadDataAsync(image, "avatar.jpeg", "image/jpeg", this);
// upload file NSData *imageData = UIImagePNGRepresentation([UIImage imageNamed:@"smile.png"]); [QBContent TUploadFile:imageData fileName:@"smile.png" contentType:@"image/png" isPublic:NO delegate:self];
curl -X POST -d "blob[blob_owner_id]=23 &blob[content_type]=image/jpeg &blob[name]=avatar.jpeg &blob[multipart]=0 &token=ac1cac4219db11c3f0ba80e5fb388ed541457da7" http://api.quickblox.com/blobs.xml
Custom Objects module provides flexibility to define any data structure you need.
QBCustomObject hero = new QBCustomObject("hero"); hero.put("health", 100); hero.put("type", "human"); hero.put("god_mode", false); QBCustomObjects.createNewObject(hero, new QBCallback() { @Override public void onComplete(Result result) { // response here! } });
QBCOCustomObject *object = [QBCOCustomObject customObject]; object.className = @"HijackGame"; object.fields = [NSMutableDictionary dictionary]; [object.fields setObject:@"45" forKey:@"rating"]; [object.fields setObject:@"YES" forKey:@"vote"]; [QBCustomObjects createObject:object delegate:self];
QBCustomObject hero = new QBCustomObject("hero"); hero.put("health", 100); hero.put("type", "human"); hero.put("god_mode", false); QBCustomObjects.createNewObject(hero, new QBCallback() { @Override public void onComplete(Result result) { // response here! } });
curl -X POST -d "expert_mode=true &health=100 &type=human &god_mode=false" https://api.quickblox.com/data/hero