21.05.2014 Views

Android & PostgreSQL (application/pdf - 311.5 KB) - PGCon

Android & PostgreSQL (application/pdf - 311.5 KB) - PGCon

Android & PostgreSQL (application/pdf - 311.5 KB) - PGCon

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

LISTEN: Handle notifications<br />

A key limitation of the JDBC driver is that it cannot receive<br />

asynchronous notifications and must poll the backend to check if any<br />

notifications were issued.<br />

. . .<br />

org . p o s t g r e s q l . P G N o t i f i c a t i o n n o t i f i c a t i o n s [ ] =<br />

pgconn . g e t N o t i f i c a t i o n s ( ) ;<br />

i f ( n o t i f i c a t i o n s != n u l l ) {<br />

f o r ( i n t i =0; i

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!