Skip to content

Creating a before INSERT callback

Chris Scott edited this page May 2, 2023 · 1 revision

Developers sometimes have a use-case where they wish to upload only certain records to their HTTP server. Since the plugin's HTTP service operates by consuming records found in its SQLite database, one must implement logic before the plugin performs the database INSERT.

Developers often assume (or wish) there exists some sort of onBeforeInsert or onBeforePost callback where one could somehow filter records in their client application code. However, this would be very complex to handle this sort of two-way staging of an HTTP request between client code and the native iOS/Android layers.

Instead, one must implement "onBeforeInsert" callbacks directly in native iOS and Android code.