Welcome!

Welcome to the Official BlackBerry Support Community Forums. This is your resource to discuss support topics with your peers, and learn from each other. New to the forum? Please visit the ‘Getting Started’ link below.
inside custom component

Native Development

Reply
Contributor
harshalbid271
Posts: 42
Registered: ‎02-17-2012
My Carrier: -

Mmlibrary.db

Hi, i'm trying to develop a music player app for bb10, so I'm using the mmlibrary.db file to obtain information. But since I don't have a dev alpha yet, I'm having trouble adding music to the simulator and getting the mmlibrary file to update itself. I tried to download some tracks on the simulator via the browser but the mmlibrary file does not seem to update itself. Can someone with more knowledge provide some insight into how the database works and how to transfer files to the simulator. Thanks 

Please use plain text.
Developer
HorizonXP
Posts: 131
Registered: ‎03-28-2011
My Carrier: Bell

Re: Mmlibrary.db

You really shouldn't be looking at that database. It's private, yucky, useless, and undocumented.

 

Kidding aside, I'm pretty sure the only way that the database is populated is by the Music app itself. Pictures and videos are different, seems there is a background service that takes care of that. All of this may be completely different on the simulator, they may have removed those daemons. Unlikely, but possible.

 

See if you can load up the Music app into the simulator. I can't detail here how to do it, but if you search around, I'm sure you'll find a way...


Founder of Pulsecode Inc. and taab
Authomator - Two-factor authentication codes on BlackBerry 10 - http://www.xitijpatel.com/ - Follow @xitijpatel
Is there a helpful or useful post in this thread? Click the thumbs up on it so that other people can find it more easily!
Please use plain text.
Contributor
harshalbid271
Posts: 42
Registered: ‎02-17-2012
My Carrier: -

Re: Mmlibrary.db

Thanks for the reply. I understand that its undocumented and is private, but it saves me a lot of effort. I'm not even sure what will go into preparing the database otherwise, probably scanning for files reading the tags which would probably take a lot of time each time its done and this process would have to be repeated every time the app starts as there is no way to create a background process.

Does anyone have any idea if maintaining a database by myself would be doable?
Please use plain text.
Developer
HorizonXP
Posts: 131
Registered: ‎03-28-2011
My Carrier: Bell

Re: Mmlibrary.db

I was kidding. Use the database, that's what it's there for. 


Founder of Pulsecode Inc. and taab
Authomator - Two-factor authentication codes on BlackBerry 10 - http://www.xitijpatel.com/ - Follow @xitijpatel
Is there a helpful or useful post in this thread? Click the thumbs up on it so that other people can find it more easily!
Please use plain text.
Contributor
harshalbid271
Posts: 42
Registered: ‎02-17-2012
My Carrier: -

Re: Mmlibrary.db

I'm sorry horizonXP I was focusing so hard on finding the solution that I didn't notice the kidding part. I'll try to sideload music app on the simulator, meanwhile if anyone does know how to sideload the music player then do let me know
Please use plain text.
Developer
HorizonXP
Posts: 131
Registered: ‎03-28-2011
My Carrier: Bell

Re: Mmlibrary.db

The issue with loading the music player is two fold. First, you need to find the BAR file that contains it. That's the part that cannot really be discussed on this official forum, for various reasons. Use Google. 

 

After that, you just need to deploy it like a regular app. It's getting that BAR file that's the issue.

 

Anyway, there's an easy way to figure out if there is a background daemon handling all of this.

 

1. Copy mmlibrary from the simulator to your desktop via ssh. 

2. Download some music into the shared music folder in the simulator. 

3. Wait a few minutes...

4. Copy the mmlibrary from the simulator to the computer again.,

5. Using an SQlite viewer, open the two copies of mmlibrary that you now have and explore, looking for changes and differences.

 

If there's a background daemon, you should see some differences. If not, then you likely need the music app to fill these values in for you. But I'm still unsure of how this would translate to the device because (and I'm not kidding this time) it is undocumented. Hopefully that will change.


Founder of Pulsecode Inc. and taab
Authomator - Two-factor authentication codes on BlackBerry 10 - http://www.xitijpatel.com/ - Follow @xitijpatel
Is there a helpful or useful post in this thread? Click the thumbs up on it so that other people can find it more easily!
Please use plain text.
Contributor
harshalbid271
Posts: 42
Registered: ‎02-17-2012
My Carrier: -

Re: Mmlibrary.db

Alright, I'll try that. Thanks for taking the time to help me horizonXP :smileyhappy:

Please use plain text.
BlackBerry Development Advisor
smcveigh
Posts: 544
Registered: ‎11-29-2011
My Carrier: other

Re: Mmlibrary.db

The database is populated by the media indexer which monitors the /accounts/1000/shared directory for new files.  It makes use of an event stream from the filesystem so there is no polling.  It is possible that on the simulator, this functionality is not fully functional.

Rebooting should cause it to re-sync any files that it finds under that directory.

Please use plain text.
BlackBerry Development Advisor
smcveigh
Posts: 544
Registered: ‎11-29-2011
My Carrier: other

Re: Mmlibrary.db

also, as indicated, since the interface to this database is not public, you are using it at your own risk.  the schema is subject to change from time to time, so you will need to re-test.

Please use plain text.