Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Binge Watcher

Sending data to remote database after SceneGraph application is launched

I am using the SceneGraph sample "Simple Grid with Details and Video" with separate main and component scripts. My objective is to send data to a remote database after the video player stops playing.  Is this possible? Can someone reply with a example script?
Brightscript linitations:
1) roUrlTransfer can only be used in a Task node
2) roMessagePort can only be used when the SceneGraph application is launched (

Here is what I have so far. I connect to the database in 

Sub ConnectToDatabase() As Object
   db = CreateObject("roUrlTransfer") 'This can only be used in a Task node
    DBport = CreateObject("roMessagePort") 'This can only be used when the SceneGraph application is launched
    return db
End Sub

and then transfer db as an object to after the viewer stops the video player.


This doesn't work. I get the following error.
'Dot' Operator attempted with invalid BrightScript Component or interface reference. (runtime error &hec) in pkg:/components/screens/DetailsScreen/DetailsScreen.brs

Please help.
0 Kudos