MAGNET MESSAGE

Make your app a Daily Habit with In-app Messaging & Real-time User Interactions

Download the Messenger demo app
home bgk

Add rich messaging into your apps

Real-Time User-to-User Messages

Simple native APIs to power in-app chat, contextual sharing and real-time interactions across mobile platforms.

See how

Public & Private Channels

Add reliable mobile pub-sub capabilities to communicate privately in a group or allow public sharing & collaboration.

See how

Mobile User Auth and Profiles

Complete Authentication, Authorization & User Profile Management to bring User Discovery & Targeting to your app.

See how

Real-Time User-to-User Messages

Go beyond text messages; send reliable, real-time contextual data with your in-app chat messages - whether it is time, location, or even your app objects.

// Get the content to send HashMap<String, String> content = new HashMap<String, String>(); content.put("message", "Meet me here!"); content.put("currentLocation", myLatLong); // Build the message MMXMessage message = new MMXMessage.Builder().recipients(myfriends).content(content) .build(); // Send the message String messageId = message.send(new MMXMessage.OnFinishedListener<String>() { public void onSuccess(String s) { ... } public void onFailure(MMXMessage.FailureCode failureCode, Throwable e) { ... } });
// Get the content to send NSDictionary *content = @{@"message" : @"Meet me here!", @"currentLocation" : myLatLong}; // Create the message MMXMessage *message = [MMXMessage messageToRecipients:myFriends] messageContent:content]; // Send the message [message sendWithSuccess:^(NSSet *invalidUsers){ ... } failure:^(NSError *error) { ... }];
// Get the content to send let content = ["message":"Meet me here!", "currentLocation": myLatLong] // Create the message let message = MMXMessage(toRecipients: recipients, messageContent: content) // Send the message message.sendWithSuccess({ invalidRecipients in print("Invalid recipients = \(invalidRecipients)") }) { error in }
// Get the content to send var myLatLong = '...'; var recipients = [...]; // Create the message var message = new Max.Message({ message: 'Meet me here!', currentLocation: myLatLong }, recipients); // Send the message message.send().success(function() { ... });

Public & Private Channels

Create Channels to enable user-based pub-sub in your app. Share data to your private "invite-only" groups or to public channels to unlock the "wisdom of the crowd".

// Define the channel String channelName = "LunchMob"; String channelSummary = "Hardest decision of the day - where to have lunch."; // Create the channel MMXChannel.create(channelName, channelSummary, false, MMXChannel.PublishPermission.SUBSCRIBER, new MMXChannel.OnFinishedListener<MMXChannel>() { public void onSuccess(MMXChannel result) { ... } public void onFailure(MMXChannel.FailureCode code, Throwable ex) { Log.e(TAG, "Exception caught: " + code, ex); ... } }); // Send a message to the channel String messageId = myChannel.publish(content, myListener});
// Define the channel NSString *channelName = @"LunchMob"; NSString *channelSummary = @"Hardest decision of the day - where to have lunch."; // Create the channel [MMXChannel createWithName:channelName summary:channelSummary isPublic:NO publishPermissions:MMXPublishPermissionsSubscribers success:^(MMXChannel *channel) { ... } failure:^(NSError *error) { ... }]; // Send message to the channel [lunchMobChannel publish:messageContent success:^(MMXMessage *message) { NSLog(@"Successfully published to channel %@",lunchMobChannel.name); } failure:^(NSError *error) { NSLog(@"Error publishing to channel %@nError = %@",lunchMobChannel.name,error); }];
MMXChannel.createWithName( "LunchMob", summary: "Hardest decision of the day - where to have lunch.", isPublic: false, publishPermissions: .Subscribers, success: { channel in ... }) { error in ... } lunchMobChannel.publish(content, success: { message in print("Successfully published to (lunchMobChannel)") }) { error in print("Could publish to \(lunchMobChannel)\nError = \(error)") }
// Create the channel Max.Channel.create({ name: 'LunchMob', summary: 'Hardest decision of the day - where to have lunch.', isPublic: false, publishPermissions: 'subscribers' }).success(function(lunchMobChannel) { // Send message to the channel var message = new Max.Message({ message: 'Hello!' }); lunchMobChannel.publish(message).success(function() { ... }); });

Mobile User Auth & Profiles

Regain control of your users and enable a whole new way of User discovery and targeting for communication & collaboration, using our Auth & User Profile optimized for Mobile.

// Find Users List<String> usernames = {"john.doe", "jane.doe"}; User.getUsersByUserNames(usernames, new ApiCallback<List<User>>() { public void success(List<User> users) { ... } public void failure(ApiError apiError) { ... } });
// Find Users [MMUser usersWithUserNames:@[@"jane.doe",@"john.doe"] success:^(NSArray *users) { ... } failure:^(NSError *error) { ... }];
// Find Users MMUser.usersWithUserNames(["john.doe","jane.doe"], success: { users in print("Users are \(users)") }) { error in print("\(error)") }
// Find Users var usernames = ['john.doe@magnet.com', 'jane.doe']; Max.User.getUsersByUserNames(usernames).success(function(users) { ... }).error(function() { ... });