• 1
  • 5
  • 6
  • 7(current)
  • 8
  • 9
No TV Shows Found since Alpha 3
#91
I personally think that well written code means it's relatively easy to understand. The art in programming is to simplify complex questions. Especially open source projects should have a transparent architecture and clear naming conventions. But that's just my opinion...
Image

Please add to my reputation if you find my posts usefull (+/- button below posts)
Ubuntu 12.10 minimal XBMC auto-install script :: XBMControl :: Xbmc XBOX Skins :: XBMControl for Android :: Owner of Sudo Systems
Reply
#92
Well while I do agree in general, the official remote seems complex but in the end it's doing great in simplifying complex things Smile

By using complex but quite standard Java/Android Freezy as achieved a high level of re-usability and maintainability, you can easily switch to JSON or anything else without impacting anything.

When I started Android I did not understand this remote, and now that my skills increase I can now see how powerful some patterns are and would have resolved some of my problems if I had understand those before Smile
Reply
#93
Ok, that's nice to know. I'll keep digging in the code to get a better understanding of the architecture and hopefully learn something Smile.

Maybe you could point me in the right direction and tell which source package(es) I need to extract the complete jsonrpc, http and eventclient clients? I'm not familiar with the naming conventions used and every time I think I've got it, it's only a small part of it all. I get that spaghetti-feeling. That's probably because I'm just to inexperienced with android development Smile
Image

Please add to my reputation if you find my posts usefull (+/- button below posts)
Ubuntu 12.10 minimal XBMC auto-install script :: XBMControl :: Xbmc XBOX Skins :: XBMControl for Android :: Owner of Sudo Systems
Reply
#94
Well Json is not really implemented in current remote and I did not check Tom. git.

But most of the part is well organized in org.xbmc.httpapi / org.xbmc.httpapi.client / org.xbmc.eventclient Smile

The rest are the interface and observers pattern to implement those in the Remote.

As I told you writing a library will not really be reusable since most of remote makers will have specific needs to integrate with the library like direct streaming for performance and observers from the notification service that will mostly have needs different from your implementations.
Reply
#95
I understand the obvious package names of course. But extracting these does not result in a complete and working client library.

We'll see. It's a fun little project to learn from and I will develop a remote myself. So it will be at least one more remote to choose from which is never a bad thing in my opinion Smile.

The json rpc api makes it a lot easier to write a maintainable client library, compared to the old http api. Apart from a remote app I'm thinking about developing a live wallpaper (showing now plying meta data) and widgets. These kinds of little projects will certainly benefit from a reusable client library.

Edit: What do you mean with direct streaming?
Image

Please add to my reputation if you find my posts usefull (+/- button below posts)
Ubuntu 12.10 minimal XBMC auto-install script :: XBMControl :: Xbmc XBOX Skins :: XBMControl for Android :: Owner of Sudo Systems
Reply
#96
Widgets and Live Wallpaper are typically examples that may need special attentions to correctly handle battery usage it will limit usage of notifications and needs lots of optimizations that may pass by specific library usage.
More EventClient usage since less data send for example, use of batch queries (ie multiple JSON request in one request) .....

So you need to clearly implement a very complicated library to handle all theses (You may want to try Yatse to check for examples, even if not open source you still have Xbmc debug mode to see how I interact with it).

Direct streaming is the fact to handle JSON data as it arrive, this is the best way to handle big data with very big performances and very low memory usage.

A simple example : You query for all movies with some data like Plots, you quickly arrive to an answer of multiple MB that in standard mapping mode, will need to be stored in a string so X MB of memory then you convert this to JSON object X more MB then you convert this to your final objects needs X more MB, not talking about CPU usage to handle all these. Now think that on old phones an app can not use more than 16MB of memory and that you need also to use memory for images (worse for fanart for your live wallpaper).

While in direct streaming I can handle answer bigger than available memory and put them directly in database without using memory of non need CPU, resulting in fast and functioning.
Reply
#97
Ok, thanks for clarifying direct streaming! Very helpful Smile Caching is something I will implement in a later stadium and Direct streaming definitely sounds like the way to go.

Because the EventServer API isn't really documented and I don't want to put too much time in it in the early development stages I've tried extracting that part from the official Xbmc remote. This actually wasn't as difficult as I thought is would be. So that client library is already fully functional Smile.
Image

Please add to my reputation if you find my posts usefull (+/- button below posts)
Ubuntu 12.10 minimal XBMC auto-install script :: XBMControl :: Xbmc XBOX Skins :: XBMControl for Android :: Owner of Sudo Systems
Reply
#98
Well actually EventClient is also a zone with some things to know Smile

In current implementation there's a timer that sends packet each X seconds to keep the connection up after setup (X needs to be < 60s). So that's quite bad for battery usage for widgets or live paper.

And if you don't do that the first packet Xbmc receive will reactivate it's internal EventServer timer but won't be threated as an actual command.

So one simple way is to send a Ping packet before the actual command to bypass this need. But the way the Xbmc Remote as implemented async commands (needed for ICS and more recent Android). Each packet send generate a new thread and due to Android internal and normal behavior of UDP there's no way to be sure the ping arrive before the actual command.

This way of acting is also problematic when sending quickly lot's of commands to assure they arrive in the correct order.

Here's a part of my implementation that correct this for my needs : https://gist.github.com/3388636 (still need some modification for more public usage).

Just to be clear, when I told you that you should not start directly to target a reusable library it's by no mean a way to limit the arrival of Android remote but really a real advice to avoid you loosing lot's of time.

You should start by trying to write your apps to learn more and the more problems you rise the more solutions you'll find and after some times you'll start to have something.
Remember that phone dev is really different than other apps, all is about optimizations for memory cpu and battery usage, at expense of perfect code. You'll have to make lot's of compromise to achieve good apps.

I started to learn Android for Yatse Widget 9 month ago and the internals have changed multiple times and even if Yatse is made to work with any media center the Xbmc part while optimized would really make no sense for other ones.

Reply
#99
be great if you could change the screen resolution so it would fit better on a tablet.

thanks for all your great work
Reply
For tablets for the moment you should try Yatse Widget or Android Music Pump Smile
Reply
Hey, has the official development died? From the looks of the repository commit dates it would seem that nothing has been done to the official project in ages... If that's the case, maybe Tom should take over the project... @Tom, It would seem that you've got most the features working and I'm glad someone has taken the time to bring the code current. Any reason you chose to branch the code rather than submit the patches to the existing code base? just wondering...

Great work and thanks!
Reply
Yes - all the developers for the "official" xbmc remote have dropped off the project, it's been defunct for quite a while. So, not a lot of point in trying to submit patches. It'd be awesome if Tom picked it back up again, but someone would have to figure out how to either get the developers to respond to email, or how to get google code to switch ownership of the repo (and then deal with getting the key to submitting a new app to the store). Going to be pretty crucial to do so at some point, since with frodo the app's pretty nonfunctional (hence this whole thread).
Reply
Anyone know if the project is going to be picked up? I had an idea about saving the current play state on one device and using the android remote app to transfer the state to another xbmc device and continuing playing from the last position (and exiting the file from the first xbmc device)...
Reply
In a similar vein, has anyone come across a remote that allows the user to select a TV episode from the TV Shows list, and resume from the last resume point?

@Numus Would your functionality enable that feature?
Reply
Yatse has the resume function inside Smile
Reply
  • 1
  • 5
  • 6
  • 7(current)
  • 8
  • 9

Logout Mark Read Team Forum Stats Members Help
No TV Shows Found since Alpha 30