Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Native Android app (auto-gen based)
#41
I got back to this guy tonight and got started on the media part of it. That'll be probably the most complicated bit. I'll post another once I have that bit working.
Dean Roddey
Explorans limites defectum
Reply
#42
I got a lot of grunt work done today on this guy, though still a good ways from having even the media browsing bit working yet. This stuff is forcing me to implement a lot of new plumbing stuff which I've sort of stumbled through in a learning on the job sort of way today.
Dean Roddey
Explorans limites defectum
Reply
#43
OK, another long day on this guy. I ended up doing a lot of plumbing improvement, and consoldating code that was showing up repetitively.

And I hit on some magic sequence of msg bytes that showed up a flaw in my checksum calculation algorithm (the usual thing, Java's silly inability to deal with unsigned numbers.) It had worked on every msg so far, so of course I didn't suspect it until I'd wasted a lot of time looking at other possibilities.

I have it now showing the categories, and you can select one to drill down to titles in that category. I'm doing the usual drilling down type of text list browser. Now that I figured that checksum issue out and got the other grunt work code in place, I should be able to get the other layers working. I'll also have to add some caching as well, which I'm not currently even trying to do, meaning it'll go back to the server every time you open a new list.
Dean Roddey
Explorans limites defectum
Reply
#44
Got back to this today and I'm now drilling down to individual song items and enqueing them. Nothing fancy, just the basic functionality, but it's working.
Dean Roddey
Explorans limites defectum
Reply
#45
I got a lot more done on the media browsing front. I can drill down and come back up, flip between movies and music, and I'm showing more info now. Still not trying to do any caching of media info yet, but I'll probably move on to preview next and come back to speed improvements later.

And I improved the XML GW connection plumbing a lot more as well. Previously, the bgn thread would sleep for particular lengths of time each time around the loop, depending on what state it was in. It would only then look for msgs from the fgn to process. It now combines the two and processes msgs while it waits, so the response will be a lot better now.

More and more I'm kind of seeing this guy as primarily for the smaller devices, since it's lighter weight and what not. I'm not sure it's really worth trying to compete with the RIVA clients in general on the larger tablets, though you could certainly run it there. But I'm kind of approaching the layout more on the assumption of a phone type display.
Dean Roddey
Explorans limites defectum
Reply
#46
I completely fried my brain on Android today. I realized that, despite the fact that the processing of messages to the XML GW server are done asynchronously, the user interface is still blocking waiting for them to be completed. So, I re-implemented the queries in the media stuff to use the AsyncTask class. That took some exploration, and more to keep it from being a lot of redundant code. And I figured out how to do a modal popup which bizarrely Android doesn't have, so that I can pop up error messages. I'll go back and do the lighting commands the same way as well.

And I figured out, since I was doing the Async task thing how to work in a progress bar that all of the queries can easily support. So when you make a selection a progress bar shows upon the bottom to indicate it's working until the respones comes back. Figuring out to style an indeterminate progress bar was giving me fits, mainly because Eclipse didn't expose a required attribute, so I didn't know it existed. It only exposes the determinate progress bar drawable attribute, not the indeterminate one. Doh!

Doesn't sound like much but it was quite a lot of digging to find out how to do that stuff correctly. It's somewhat redundant feeling to be spinning threads to wait for an already bgn thread to do something. But it has to be that way. The background thread itself is also doing calls to the GW automatically, so commands and requests have to be queued upon that background thread. There just needs to be a way at the GUI level to wait for them to complete while keeping the GUI updating appropriately. So it has to be a two level thing.

But, it's looking pretty cool now and I've managed so far to keep the amount of code involved reasonable. I guess I can move on to the preview screen now. It's quite slow to make the media queries, but I think that's because XML parsing is a bit heavy for the emulator perhaps. The actual processing of the user input and the bgn thread getting to the msg and the msg being gotten back and all that is pretty quick. And the lighting commands that don't depend on parsing a bunch of XML go out quickly. We'll see when I get to you guys and you can try it in a real system.
Dean Roddey
Explorans limites defectum
Reply
#47
Got back to this today and got started on a movie preview screen. That involved getting into some new bits, mostly related to getting the image down. I didn't think I had a Base64 decoder available so I wrote one, and was having some problems, then realized that, though Java doesn't provide one, Android might and it does, so that fixed that and I'm getting the cover art down and displayed now.

So I think I have all of the functionality required now to finish off the preview screen. Then it's just a matter of invoking playback if desired, and that's easy to do.
Dean Roddey
Explorans limites defectum
Reply
#48
I updated the first post with the latest source code for any folks who want to continue playing around with it. This is just where I left off yesterday. Basically the functionality now is:

1. Login Screen
2. Home screen
3. Weather
4. Lighting
5. Media Browsing
6. Movie Preview

When browsing media, it's a list based scheme. There's a Back button down at the bottom left. Later I'll figure out how to intercept gustures on the list and allow for gesture based Back operations. And there's a button beside it to flip to the other media type. If you select a song item, it just enqueues it as a temporary bit of testing functionality. If you select a movie collection, it brings up the partial bits of a preview screen I'm working on now. No way yet to start it playing.

It's making no attempts yet to cache media data, so it will go to the server each time. This will make it a little slow. Give me some ideas of how slow, so that I can get a feel for the actual go to the server type access times people are seeing.

It's not currently short circuiting selection of movies with only one collection when you click on the title set. It actually displays the one collection and you pick that to get to the preview. I'll fix that here soon.

I'm not doing a lot to deal with errors at this point either, though I have added an error popup. It's not being called in all possible places yet though, so some errors will just get silently ignored.
Dean Roddey
Explorans limites defectum
Reply
#49
Oh, and still no 'Home' button in the title bar. So you still have to either do Back, or back to the Login screen and select a room to get back to the Home screen. I still need to do an icon for that and add it.
Dean Roddey
Explorans limites defectum
Reply
#50
The GIT repository and DropBox binary have been updated, see post 33 for the links...
Field Generator 0.65: Create CQC fields on the fly, from external applications.
Mobile templates 0.4: Main resolution of 320x480 with navigation side bars (384x544).
Sage Media Server 1.1.3 + Sage Player 2.7.8: Display and manipulate SageTV information or player.
TaRIVA 1.26: Android RIVA client.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Android RIVA Client: taRiva Fonceur 1,066 498,266 01-04-2019, 04:52 AM
Last Post: kfly
  native scroll for android client pasha 14 21,412 05-07-2012, 03:15 PM
Last Post: Dean Roddey
  android app burkepaol4 1 10,672 12-19-2010, 07:12 PM
Last Post: Fonceur
  10 android burkepaol4 4 13,529 12-19-2010, 06:44 PM
Last Post: burkepaol4
  Android client ? willplaice 33 52,412 08-14-2010, 10:42 AM
Last Post: Fonceur

Forum Jump:


Users browsing this thread: 1 Guest(s)