Some fixes, Fix result API params + table

- Result API used wrong GET-param. 
- Added secret to result API request for device detection
- Changed result API interval to task interval
- fix null pointer exception on sqlite cursor