Hi Mark, will this update be published this week?
Thank you!
Hi Mark, will this update be published this week?
Thank you!
We sure hope so!
I have the same problem but for android. I can’t use workaround because create method is private (and never used in the sdk, that’s weird). When will the update be released?
My Custom Event Handlers are still being ignored in 3.0.10, are you working on it?
@Fabio, this is a duplicate question. For any given problem we should communicate in one topic. I responded to you here.
@Gregorz, there is a patch in Android SDK. If you download the latest jar from guthub, it contains a fix that will let you use the before/afterCreate handlers. On the client side you still call the “save” method.
Should android users be using the create or save method? I have setup a beforeCreate business logic for a table and it runs when the request is submitted through REST but not from the android api. I am using the 3.0.17.1 jar and 3.0.19 coderunner.
I have simple example for android sdk
server code(event handler):
@Asset( "*" )
public class GenericTableEventHandler extends com.backendless.servercode.extension.PersistenceExtender<HashMap>
{
@Override
public void beforeCreate( RunnerContext context, HashMap hashmap) throws Exception
{
System.out.println("test");
}
}
java client code using maven dependancy
public class App
{
public static void main( String[] args )
{
Backendless.initApp( "763428F5-24CF-5A6A-FF85-E6D09BA76C00", "E5A67056-E1D1-28D6-FFA6-4E3714841100", "v1" );
System.out.println( Backendless.Data.of( "TestSome" ).save( new HashMap( ) ).get( "objectId" ) );
}
}
and result on client
/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/bin/java -Didea.launcher.port=7534 "-Didea.launcher.bin.path=/Applications/IntelliJ IDEA 15.app/Contents/bin" -Dfile.encoding=UTF-8 -classpath "/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/lib/ant-javafx.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/lib/dt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/lib/javafx-mx.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/lib/jconsole.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/lib/sa-jdi.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/lib/tools.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/jre/lib/charsets.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/jre/lib/deploy.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/jre/lib/javaws.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/jre/lib/jce.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/jre/lib/jfr.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/jre/lib/jfxswt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/jre/lib/jsse.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/jre/lib/management-agent.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/jre/lib/plugin.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/jre/lib/resources.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/jre/lib/rt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/jre/lib/ext/cldrdata.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/jre/lib/ext/dnsns.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/jre/lib/ext/jfxrt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/jre/lib/ext/localedata.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/jre/lib/ext/nashorn.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/jre/lib/ext/sunec.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/jre/lib/ext/sunjce_provider.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/jre/lib/ext/sunpkcs11.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/jre/lib/ext/zipfs.jar:/Users/ksv/dev/tmp/test12we/target/classes:/Users/ksv/.m2/repository/com/backendless/backendless/3.0.17.1/backendless-3.0.17.1.jar:/Applications/IntelliJ IDEA 15.app/Contents/lib/idea_rt.jar" com.intellij.rt.execution.application.AppMain test.App
814375AB-EB23-14CF-FF27-7A3677052700
Process finished with exit code 0
on server(debug mode)
[INFO] Registering runner on: 'https://api.backendless.com' with version 'v1'
[INFO] Application ID: '763428F5-24CF-5A6A-FF85-E6D09BA76C00'
[INFO] Secret key: '6B429245-2FD3-B6CB-FFC6-C3672C3FDC00'
[INFO] Runner successfully registered
[INFO] Parsing event model...
[INFO] Build successfully: 1 handler, 0 timers
[INFO] Deploying model to server, and starting debug...
[INFO] Model successfully deployed.
[INFO] Waiting for events...
test