The Sandbox just opened...

  Thread Rating:
  • 1 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
freezy Offline
Team-XBMC Android Remote Developer
Posts: 885
Joined: Dec 2006
Reputation: 15
Location: Switzerland
Information  The Sandbox just opened...
Post: #1
For everyone who's interested in contributing code to the Official Android Remote but never had the time to read through all the code, here's your chance:

[INDENT]https://github.com/freezy/android-xbmcremote-sandbox[/INDENT]

This is a mini-project where I will commit the base of the future XBMC Remote code. Read more about it on GitHub and I'm lookin forward to pull-requests, comments and suggestions. Remember however that we're mostly talking about code here, not end-user features.

And if someone can come up with mockups for a tablet version, we would surely not be disappointed. Wink

Cheers,

-freezy.

Running XBMC on my HTPC, tablet, phone and pinball machine.
Always read the XBMC online-manual, FAQ and search the forums before posting. Do NOT e-mail Team-XBMC members asking for support. For troubleshooting and bug reporting, make sure you read this first.
find quote
octacon100 Offline
Junior Member
Posts: 2
Joined: Nov 2011
Reputation: 0
Post: #2
Hi There,

Is this still being worked on? I'd like to help out if I could. The main thing I want to do is add the ability to open playlists from the remote as that would be great.

Total n00b questions here, but:

1. What is this being coded in? Since it's an Android app, I'd assume Java.
2. What's the best way to get started?

Thanks,
Nathan
find quote
octacon100 Offline
Junior Member
Posts: 2
Joined: Nov 2011
Reputation: 0
Post: #3
So it looks like I have to make something like a "PlaylistFragment" class and add that to the musicPagerActivity class. I'm guessing that Eclipse is probably the ide you guys use.

Am I on the right track? When are you guys thinking of inserting this code into the main trunk?

Thanks,
Nathan
find quote
freezy Offline
Team-XBMC Android Remote Developer
Posts: 885
Joined: Dec 2006
Reputation: 15
Location: Switzerland
Post: #4
If you only want the playlist feature, I suggest you better take a look at the other version and integrate it there. The sandbox is still too young for such kind of features.

Running XBMC on my HTPC, tablet, phone and pinball machine.
Always read the XBMC online-manual, FAQ and search the forums before posting. Do NOT e-mail Team-XBMC members asking for support. For troubleshooting and bug reporting, make sure you read this first.
find quote
smee204 Offline
Junior Member
Posts: 46
Joined: May 2011
Reputation: 0
Post: #5
Are there any plans or a list of things that need implementing? I might have a bit of spare time over the next few weeks if any coding needs doing. I assume the sandbox is the current place to develop.
I have a android htc desire phone and hp touchpad tablet (running android).
find quote
freezy Offline
Team-XBMC Android Remote Developer
Posts: 885
Joined: Dec 2006
Reputation: 15
Location: Switzerland
Post: #6
Yes, of course. I'm currently working on UI code that works for tablet and phone. Any idea what you would want to be working on?

Running XBMC on my HTPC, tablet, phone and pinball machine.
Always read the XBMC online-manual, FAQ and search the forums before posting. Do NOT e-mail Team-XBMC members asking for support. For troubleshooting and bug reporting, make sure you read this first.
find quote
smee204 Offline
Junior Member
Posts: 46
Joined: May 2011
Reputation: 0
Post: #7
Sorry loads of stuff cropped up as soon as I volunteered to help! Typical! I have a bit of free time now. What needs working on?
find quote
freezy Offline
Team-XBMC Android Remote Developer
Posts: 885
Joined: Dec 2006
Reputation: 15
Location: Switzerland
Post: #8
From README.md:

Quote:Figure out a faster way to manage updates. Right now, everything is re-inserted, with a ON CONFLICT REPLACE constraint on the ID. Importing 1.200 artists and 500 albums takes about 10 seconds. Seems pretty slow to me.

Basically the task would be to handle the one-way sync between XBMC and the remote as fast as possible. Have a look at the org.xbmc.android.jsonrpc.io.audio package, a good part of the current code is in there.

I think that would be a good start, since all the other things are already being worked on.

Running XBMC on my HTPC, tablet, phone and pinball machine.
Always read the XBMC online-manual, FAQ and search the forums before posting. Do NOT e-mail Team-XBMC members asking for support. For troubleshooting and bug reporting, make sure you read this first.
find quote
hunkyn Offline
Fan
Posts: 399
Joined: May 2011
Reputation: 1
Location: Universe
Post: #9
@freezy, could we do something like connecting to the mysql database from the android app and get data from there? would that be fast?

I came across a link that accesses the mysql from android maybe this will help you or give you more ideas have a look

http://www.basic4ppc.com/forum/basic4and...orial.html

Thanks

Intel® Quad Core i5 Sandybridge @3.40GHz | ASRock Z775 Mobo 8GB DDR3 Ram | Logitech K400 Keyboard |
| Logitec Harmony 550 Remote| 46' Samsung LCD TV | Onkyo TX-S605 w/ Bose 5.1 Surround
find quote
smee204 Offline
Junior Member
Posts: 46
Joined: May 2011
Reputation: 0
Post: #10
I have had a quick look so far and it looks like the slowest part is not receiving the data but inserting it into the local phone database.
On my system it takes 5892ms to sync and 4416ms of that is inserting the data. I am investigating...
find quote
smee204 Offline
Junior Member
Posts: 46
Joined: May 2011
Reputation: 0
Post: #11
smee204 Wrote:I have had a quick look so far and it looks like the slowest part is not receiving the data but inserting it into the local phone database.
On my system it takes 5892ms to sync and 4416ms of that is inserting the data. I am investigating...

Think I have worked out how to speed it up a lot. Will give it a go tomorrow.
find quote
gfoldv Offline
Senior Member
Posts: 115
Joined: Oct 2009
Reputation: 5
Location: in the dutch mountains
Post: #12
In general the ContentProvider.applyBatch is slow because it does a lot of string comparison operation to turn the URIs to tables. The ContentResolver.bulkInsert is faster although "This function make no guarantees about the atomicity of the insertions".
find quote
freezy Offline
Team-XBMC Android Remote Developer
Posts: 885
Joined: Dec 2006
Reputation: 15
Location: Switzerland
Post: #13
@hunkyn: Direct MySQL access probably isn't such a good idea, because most a) most people probably don't use MySQL anyway and b) as smee204 stated fetching the data is not the bottleneck.

Smee204 I'm looking forward to your result! Cheers!

Running XBMC on my HTPC, tablet, phone and pinball machine.
Always read the XBMC online-manual, FAQ and search the forums before posting. Do NOT e-mail Team-XBMC members asking for support. For troubleshooting and bug reporting, make sure you read this first.
find quote
everslick Offline
Junior Member
Posts: 4
Joined: Feb 2014
Reputation: 0
Post: #14
ok, since xbmc remote is something i really care about and I wanted to start android devel for a long time now, I gave it a shot. android studio is up and running. xbmc-remote-sandbox cloned. asus TF101 connected. project compiled and uploaded. started. it finds my xbmc on the network (10.0.0.20:80) but as soon I click it to connect, it fails and asks me to have a look at the logs, which even indicate in red, that there went something wrong:

03-03 09:37:43.752 15749-15885/org.xbmc.android.remotesandbox I/JsonApiRequest﹕ POST request: http://10.0.0.20:80/jsonrpc
03-03 09:37:43.752 15749-15885/org.xbmc.android.remotesandbox I/JsonApiRequest﹕ POST entity:{"jsonrpc":"2.0","id":"8779813510703367259","method":"JSONRPC.Ping"}
03-03 09:37:43.762 15749-15885/org.xbmc.android.remotesandbox E/ApiException﹕ No authentication challenges found
org.xbmc.android.jsonrpc.io.ApiException: No authentication challenges found
at org.xbmc.android.jsonrpc.io.JsonApiRequest.postRequest(JsonApiRequest.java:166)
at org.xbmc.android.jsonrpc.io.JsonApiRequest.execute(JsonApiRequest.java:68)
at org.xbmc.android.jsonrpc.io.ConnectionManager$1.run(ConnectionManager.java:193)
at java.lang.Thread.run(Thread.java:841)
Caused by: java.io.IOException: No authentication challenges found
at libcore.net.http.HttpURLConnectionImpl.getAuthorizationCredentials(HttpURLConnec​tionImpl.java:438)
at libcore.net.http.HttpURLConnectionImpl.processAuthHeader(HttpURLConnectionImpl.j​ava:418)
at libcore.net.http.HttpURLConnectionImpl.processResponseHeaders(HttpURLConnectionI​mpl.java:367)
at libcore.net.http.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:30​1)
at libcore.net.http.HttpURLConnectionImpl.getResponseCode(HttpURLConnectionImpl.jav​a:497)
at org.xbmc.android.jsonrpc.io.JsonApiRequest.postRequest(JsonApiRequest.java:117)
            at org.xbmc.android.jsonrpc.io.JsonApiRequest.execute(JsonApiRequest.java:68)
            at org.xbmc.android.jsonrpc.io.ConnectionManager$1.run(ConnectionManager.java:193)
            at java.lang.Thread.run(Thread.java:841)

i will now start into digging deeper, but thought to post this anyway. is this still the right place to talk about xbmc-remote-sandbox?

best regards...
clemens
find quote
freezy Offline
Team-XBMC Android Remote Developer
Posts: 885
Joined: Dec 2006
Reputation: 15
Location: Switzerland
Post: #15
Interesting. Is XBMC you're connecting to password protected? Also, which version of XBMC are you running?

Running XBMC on my HTPC, tablet, phone and pinball machine.
Always read the XBMC online-manual, FAQ and search the forums before posting. Do NOT e-mail Team-XBMC members asking for support. For troubleshooting and bug reporting, make sure you read this first.
find quote
Post Reply