Page 1 of 1

Android MM rating widget idea

Posted: Thu Mar 31, 2011 12:58 pm
by Wargazm
I just switched to Android, and I love my new phone. But I really miss being able to sync ratings with MediaMonkey. So much so that I am thinking of developing a widget to give me the functionality I need.

Ignoring that I am a really inexperienced coder, I just want to know if my idea is even feasible. Here's how I envision it would work:

* Assume you start with a device with no music. You connect your Android device and copy a bunch of music to the SD card using MediaMonkey by syncing a playlist with the device.
* You run a separate MM/Android Rating Sync script that generates some sort of file (xml? I don't know) and copies it to the device. This file holds the filenames/basic identifying track information of each track that you just synced, along with ratings.
* Now you're on your phone, and your MMRatings widget is running. The widget watches as you play music. When you play a song that exists in the ratings file described above, it shows the rating in the widget.
* You can now edit this rating, in the widget, and the widget writes back the rating to the file.
* When you come back to your computer, you run the MM/Android Rating Sync script again, this time it reads information and updates the MM database with any changed ratings.

A different, simpler workflow might have a background service running on your desktop machine that just looks for commands coming from the widget. So whenever you updated a rating on your phone it would send a command over that data connection to update the MM database. This would have the advantage of not having to fiddle with any new files to sync to the SD card (the downside being that I have no idea how to code background processes or programs that talk to each other over the net).


So, what do you guys think? I have never written a MM add-on, so I don't even know if what I've outlined above is possible. Any guidance would be most welcome!

Re: Android MM rating widget idea

Posted: Fri Apr 15, 2011 12:56 pm
by Wargazm
I see this forum doesn't get a lot of traffic...at this point all I want is a simple yes/no as to whether the MM API would allow for something like this.

Re: Android MM rating widget idea

Posted: Fri Apr 15, 2011 1:25 pm
by Melloware
Wargazm wrote:I see this forum doesn't get a lot of traffic...at this point all I want is a simple yes/no as to whether the MM API would allow for something like this.
Based on your requirements this should be possible with the MM API.

Re: Android MM rating widget idea

Posted: Fri Apr 15, 2011 1:43 pm
by Wargazm
awesome, thank you.

Re: Android MM rating widget idea

Posted: Fri Apr 15, 2011 1:52 pm
by Melloware
Wargazm wrote:awesome, thank you.
My TunesRemote+/MonkeyTunes combo lets you rate songs from Android but not for your local music, it rates them on your MediaMonkey running on your PC. You idea is more of taking your music with you and then batching the ratings of what you listened to when you get back to syncing with your desktop. A good idea and should definitely be possible.

Re: Android MM rating widget idea

Posted: Fri Apr 15, 2011 2:15 pm
by Wargazm
The only thing now is that I've never coded any application more complex than a simple perl script in my life. haha

Re: Android MM rating widget idea

Posted: Fri Apr 15, 2011 2:17 pm
by Melloware
Wargazm wrote:The only thing now is that I've never coded any application more complex than a simple perl script in my life. haha
HA! Well the funnest coding and learning experiences come from when you are building something for yourself that you need. You are providing your own requirements to meet your own needs. Good luck!

Re: Android MM rating widget idea

Posted: Fri Apr 15, 2011 2:23 pm
by Wargazm
One last question: what languages will I need to be working with? I know Android apps are written in java, so the widget will have to be written in that. But what about the MM side?

Re: Android MM rating widget idea

Posted: Fri Apr 15, 2011 2:26 pm
by Melloware
Wargazm wrote:One last question: what languages will I need to be working with? I know Android apps are written in java, so the widget will have to be written in that. But what about the MM side?
The MM side you might be able to code entirely in VBS or VBScript that runs in the /Scripts folder of MM.

Everything you need is here on the developer WIKI: http://www.mediamonkey.com/wiki/index.php/Scripting

Re: Android MM rating widget idea

Posted: Fri Apr 15, 2011 2:36 pm
by Wargazm
awesome, thank you.

Re: Android MM rating widget idea

Posted: Wed May 18, 2011 2:55 am
by markstuartwalker
One of the most awkward aspects to this sort of process is correlating the track in Android with that in MM. The common practice is to use the title and artist. This is simple but fragile because a name correction in MM breaks the linkage.

I have asked for http://www.mediamonkey.com/forum/viewto ... 19&t=57978 which should help the correlation.

Mark