updates

1. implement background sync anno to cloud in javascript
2. convert implementation of tapping back button to close tray screen
from native code into JavaScript code.