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.

inside custom component

Native Development


Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.


Reply
Developer
Posts: 64
Registered: ‎09-10-2012
My Device: Developer
My Carrier: AMX
Accepted Solution

What's the MediaPlayer's user-agent string?

Hi guys

 

How can I get the Media Player's user-agent string?

I need it for when the app requests a video stream through a secure connection (which I'll most likely make another thread about...)

I thought it was the same one as the browser, but it seems it's a different one.

 

I entered www.thismachine.info through the Browser and through a sample app's webview and they are the same... Just wanted to be sure.

 

Thanks in advance

Pepe

Developer
Posts: 64
Registered: ‎09-10-2012
My Device: Developer
My Carrier: AMX

Re: What's the MediaPlayer's user-agent string?

I made a simple php script, hosted and these are the results:

 

This was generated by my browser:
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:19.0) Gecko/20100101 Firefox/19.0

These were generated by WindowsMP:
Windows-Media-Player/12.0.7601.17514
NSPlayer/12.00.7601.17514 WMFSDK/12.00.7601.17514

BB10 Media Player:
io-media

 

So just "io-media"...

 

In case someone wants the script, it's a bunch of copy-pasted code:

<?php 
 echo $_SERVER['HTTP_USER_AGENT'];
$myFile = "testFile.txt";
$fh = fopen($myFile, 'a') or die("can't open file");
$stringData = "UA:\n";
fwrite($fh, $stringData);
$stringData = $_SERVER['HTTP_USER_AGENT']."\n\n";
fwrite($fh, $stringData);
fclose($fh);
 ?>