Insert row in data table from custom business logic

How insert row in data table from custom business logic ?

All methods from Android SDK available from custom server code.
Android SDK doc:

Here is example for you:

@BackendlessEvent( "customEvent" )
public class CustomEventEventHandler extends com.backendless.servercode.extension.CustomEventHandler
 public Map handleEvent( RunnerContext context, Map eventArgs )
 String appId = context.getAppId().toString();
 Contact contact = new Contact();
 contact.setName( appId );
 contact.setAge( 147 );
 contact.setPhone( "777-777-777" );
 contact.setTitle( "Favorites" );

 Contact savedContact = contact );

 return Collections.emptyMap();


Or you can use added project:

  1. Open attached project in IDEA
  2. Select and set your app id and secret key (use secret key for code runner)
  3. Build project
  4. Run
  5. For example, run REST request to invoke handler:
-H application-id:<your app id>
-H secret-key:<rest secret key>
-H Content-Type:application/json
-H application-type:REST
-v [url=][/url] -d '{}'
  1. Check added Contact table on data page

Link to project: