在我的应用程序中,我只想打开一个包含媒体的URL,例如http://www.test.com/test.mp3或 rstp://www.test.com/test.3gp,所以我需要Symbian嵌入式媒体玩家的uid来打开它。
If you know the content type of the URL, you can discover the UID of the right application and launch it as detailed here .
There are other alternatives:
CVideoPlayerUtility
and CAudioPlayerUtility
. Both have OpenUrl()
methods. CMdaAudioOutStream
and friends) .. and there are other methods too. That all said, if you are targeting Symbian^3 onwards, you might be better off developing in QT - Symbian C++ can very much considered 'deprecated' for app development.
This is what I use for showing links:
_LIT( KTestUrlPrefix,"4 " );
HBufC* parameter = HBufC::NewLC( KTestUrlPrefix().Length() + aLink.Length() );
parameter->Des().Copy( KTestUrlPrefix );
parameter->Des().Append( aLink );
if(iLauncher)
{
delete iLauncher;
iLauncher = NULL;
}
iLauncher = CBrowserLauncher::NewL();
iLauncher->LaunchBrowserEmbeddedL( *parameter, NULL, NULL, iOverriddenSettings );
CleanupStack::PopAndDestroy();
_LOGENTRY("web ad->");
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.