I have a solid working channel code for displaying a JSON content feed, multiple rows by category, including live streams. It works really well, and includes bookmarking and trick play scrubbing and captions and everything. This using the SGDEX extensions for most things. So far so good.
I've also got solid functions written in Brightscript that validate token from registry, process user/password login, new user signups, etc. (hitting and updating our actual web back-end). All this from hard-coded values in the brs file.
The wall I am hitting is how to insert the screens for login/signup selection, keyboards, etc. The approaches from SGDEX Entitlement View and the on-device-authentication samples are very different. Advice about where to go next in this process? Feeling very much like a PHP developer who is missing some pretty big and obvious pieces ...
For context ... most of the work for the grid channel happens in MainScene.brs and RootHandler.brs. I discovered I cannot do things like call a URL or get a PucID from ChannelStore in MainScene. I have written AuthHandler.brs/.xml (extends ContentHandler) and the functions that process User auth are all there (Function LoginUser(email,password), Function ValidateToken(), Function clearToken(), etc.). I can call them from the .brs file sequentially, passing them a hard-coded email address and password, and printing status. t's beautiful to see the token not validate, then the login succeed, then the token validate, then the user logout, then the token not validate again.
Just can't my head around how to get the dialog and keyboard flow in the middle of this.
Why would you need a user to sign up or log in? This is the beauty of Roku that they handle the subscriptions automatically. The only thing you need to do is implement the Roku payment API and add your products.
Yeah that's fair. Right now this isn't monetizable at all - no subscriptions, just logins. And the most important thing that might move us toward monetization is being able to work across our web/mobile platform as well as Roku. Roku is a feature add-on for these users, for now - then down the road it becomes a central piece to how we monetize. So I need to integrate with our existing user/password system first.
I'm going to go back and look at the Entitlement samples Roku has, and see if I can drop my working functions in to their placeholders that use the fake tokens in their sample code. And then just update graphics/colors on their sample screens. That seems like the quickest way for me to get the last 20% of this done.
I just really need to better understand how nodes and screens and scenes and tasks and render and interfaces and all that works together. A solid certification course would be awesome.