Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Ringtones from existing content on WP7 – why can’t you do that?

DZone's Guide to

Ringtones from existing content on WP7 – why can’t you do that?

· Mobile Zone
Free Resource

Launching an app doesn’t need to be daunting. Whether you’re just getting started or need a refresher on mobile app testing best practices, this guide is your resource! Brought to you in partnership with Perfecto

I see this question asked a lot on StackOverflow, and today I saw another example of this phenomenon. I decided to write this blog post to simply explain why this is not possible and why you should look for another media sources to build your ringtones rather than using the existing media library.

The main problem with building ringtones from existing media content is the lack of access to direct media byte streams. Also known as – media content. You can play registered songs through the OS-based player, but you don’t have the byte array for the content that is played. That being said, SaveRingtoneTask does not accept a parameter of type Song.

What’s the reason for the restriction? The main one I see here would be illegal content distribution. If a third-party application would have access to the media content uploaded through Zune, this would mean that the same application could do whatever it wants with that content – send it somewhere, upload it to a public server. You name it. A lot of songs on various Windows Phone 7 devices are licensed and DRM-protected. Specific licenses restrict distribution of the content, therefore it makes sense to lock any possible backdoors that would facilitate doing that.

What about beat extraction through VisualizationData (via MediaPlayer.GetVisualizationData)?

Not going to work because it is not available on Windows Phone:

image

What should I do?

Either bundle ringtones with the application (not really efficient but possible – for example, through soundboard apps) or have your own web server (or space on a web server) that can be accessed from within your application to download MP3 and WMA files of appropriate length and size (also, without DRM).

Keep up with the latest DevTest Jargon with the latest Mobile DevTest Dictionary. Brought to you in partnership with Perfecto.

Topics:

Opinions expressed by DZone contributors are their own.

THE DZONE NEWSLETTER

Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

X

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}