You Are Here:

Community: Wiki


TSS000877 - Launching the Nseries Music Player in a certain view

From Forum Nokia Wiki



ID TSS000877 Creation date April 2, 2008
Platform S60 3rd Edition, Feature Pack 1, S60 3rd Edition, Feature Pack 2 Devices S60 Nseries devices
Category Symbian C++ Subcategory Architecture/Design, Music


Keywords (APIs, classes, methods, functions):

Overview

The Music Player application used in new Nseries devices uses a view system different from the standard S60 Music Player. This may cause problems in 3rd party applications that try to launch the Music Player in a certain view (e.g. Now Playing).

Description

Different views of the Music Player (MPX) in new Nseries devices cannot be activated using the standard methods of the AVKON view architecture. While there is no public API to control MPX views, view switching is still possible by sending messages to the Music Player application with TApaTask::SendMessage() or via command line arguments if the player is currently not running.

Solution

How to find out which Music Player is used in a device?

The UID of the Music Player application is changed in the new version.

 const TUid KAppUidMPX                 = { 0x102072C3 };

RApaLsSession::GetAppInfo() can be used for checking whether an application with this UID exists.

 TInt ret = apaSession.GetAppInfo(appInfo, KAppUidMPX);

GetAppInfo() returns KErrNone if the device has a new version of the Music Player and KErrNotFound if the device has an old version of the Music Player.


Launching the Music Player in a certain view

 const TUid KMPXPlaybackViewTypeUid    = { 0x101FFCA0 }; // Now Playing View
 const TUid KMPXCollectionViewTypeUid  = { 0x101FFCA1 }; // Collection View
 void LaunchMPXViewL( const TUid& aViewUid )
   {
   // Construct MPX parameter string
   TBuf8<16> param;
   param.FillZ(16);
   param[8] = 0x01;
   param[12] = (TUint8) (aViewUid.iUid & 0x000000ff);
   param[13] = (TUint8)((aViewUid.iUid & 0x0000ff00) >> 8);
   param[14] = (TUint8)((aViewUid.iUid & 0x00ff0000) >> 16);
   param[15] = (TUint8)((aViewUid.iUid & 0xff000000) >> 24);
 
   TApaTaskList taskList( CEikonEnv::Static()->WsSession() );
   TApaTask task = taskList.FindApp( KAppUidMPX );
 
   if ( task.Exists() )	  
     {
     task.SendMessage( KAppUidMPX, param );
     return;
     }
 
    RApaLsSession apaSession;
    TApaAppInfo appInfo;
    User::LeaveIfError( apaSession.Connect() ); 
    CleanupClosePushL( apaSession );
 	
    User::LeaveIfError( apaSession.GetAppInfo( appInfo, KAppUidMPX ) );
 	
    CApaCommandLine *cmdLine = CApaCommandLine::NewLC();
    cmdLine->SetExecutableNameL( appInfo.iFullName );
    cmdLine->SetCommandL( EApaCommandRun );
 
    // Collection view is the default view at startup
    if( aViewUid != KMPXCollectionViewTypeUid )
      {
      cmdLine->SetTailEndL( param );
      }
 
  User::LeaveIfError( apaSession.StartApp( *cmdLine ) );
 
  CleanupStack::PopAndDestroy( 2 ); // cmdLine, apaSession	  
  }

Related Wiki Articles

No related wiki articles found

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia 
RDF Facets: qdcZdescriptionQSxEa0E20WikiE20javaE20symbianE5fosE20s60E20maemoE20cE2bE2bE20WikiE20HomeE20WikiE20HelpE20OverviewE20GlossaryE20CreateE20PageE20ProposeE20anE20ArticleE20SpotlightE20TopicE20E2dE20WE52TE20WidgetsE20ProgrammingE20E4canguageE20E2dE20SymbianE20CE2bE2bE20E2dE20OpenE20CE2fCE2bE2bE20E2dE20JavaE20E2dE20FlashE20E4citeE20E2dE20PythonE20WebE20TechnologiesE20E2dE20WE52TE20WidgetsE20E2dE20WidSetsE20ToolsE20andE20SE44KE20CodeE20E45E78amplesE20KnowledgeE20BaseE20TechnologyE20AreasE20SoftwareE20PlatformsE20E44evelopmentE20ProcessE20E3fE3fWikiE20ChineseE20E3fE3fE3fWikiE20JapaneseE20PortugueseE2fBrazilianE20E52ussianE20WhatE20linksE20hereE20UploadE20fileE20SpecialE20pagesE20PrintableE20versionE44ownloadE20asE20PE44FE20GoE20ToE20E2eE2eE2eX qdcZidentifierQSxhttpE3aE2fE2fwikiE2eforumE2enokiaE2ecomE2findeE78E2ephpE2fTSS000877E5fE2dE5fE4caunchingE5ftheE5fNseriesE5fMusicE5fPlayerE5finE5faE5fcertainE5fviewX qdcZpublisherQUxhttpE3aE2fE2fswE2enokiaE2ecomE2fidE2fc764fd1cE2d8b06E2d499aE2d9a6aE2d17c3903d5a65E2fforumE5fnokiaE5fcrawlerE5fagentX qdcZtitleQSxTSS000877E20E2dE20E4caunchingE20theE20NseriesE20MusicE20PlayerE20inE20aE20certainE20viewE20E2dE20ForumE20NokiaE20WikiX qdcZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qdcZtypeQUqfntypeZCommunityContentQ qdcZtypeQUqfntypeZKnowledgeBaseContentQ qdcZtypeQUqfntypeZE52esourceQ qdcZtypeQUqfntypeZTechnicalSolutionQ qdcZtypeQUqfntypeZWebpageQ qdcZtypeQUqfntypeZWikiContentQ qdcZtypeQUqmarsZManagedE52esourceQ qdcZtypeQUqwebZInformationE52esourceQ qdcZtypeQUqwebZPageQ qdcZtypeQUqwebZE52esourceQ qdcZtypeQUqrdfsZE52esourceQ qrssZdescriptionQSxEa0E20WikiE20javaE20symbianE5fosE20s60E20maemoE20cE2bE2bE20WikiE20HomeE20WikiE20HelpE20OverviewE20GlossaryE20CreateE20PageE20ProposeE20anE20ArticleE20SpotlightE20TopicE20E2dE20WE52TE20WidgetsE20ProgrammingE20E4canguageE20E2dE20SymbianE20CE2bE2bE20E2dE20OpenE20CE2fCE2bE2bE20E2dE20JavaE20E2dE20FlashE20E4citeE20E2dE20PythonE20WebE20TechnologiesE20E2dE20WE52TE20WidgetsE20E2dE20WidSetsE20ToolsE20andE20SE44KE20CodeE20E45E78amplesE20KnowledgeE20BaseE20TechnologyE20AreasE20SoftwareE20PlatformsE20E44evelopmentE20ProcessE20E3fE3fWikiE20ChineseE20E3fE3fE3fWikiE20JapaneseE20PortugueseE2fBrazilianE20E52ussianE20WhatE20linksE20hereE20UploadE20fileE20SpecialE20pagesE20PrintableE20versionE44ownloadE20asE20PE44FE20GoE20ToE20E2eE2eE2eX qfnZdistributionQUxhttpE3aE2fE2fwikiE2eforumE2enokiaE2ecomE2fX qfnZtopicQUqfnTopicZentertainmentQRqmarsZrelevanceQNx100X qfnZtopicQUqfnTopicZmusicQRqdcZtypeQUqrdfsZE52esourceQRqmarsZrelevanceQNx100X qfnZtypeQUqfntypeZCommunityContentQ qfnZtypeQUqfntypeZKnowledgeBaseContentQ qfnZtypeQUqfntypeZE52esourceQ qfnZtypeQUqfntypeZTechnicalSolutionQ qfnZtypeQUqfntypeZWebpageQ qfnZtypeQUqfntypeZWikiContentQ qfnZupdatedQDx2008E2d10E2d02X qfnZuserE5ftagQSxentertainmentX qfnZuserE5ftagQSxmusicX qmarsZdescriptionQSxEa0E20WikiE20javaE20symbianE5fosE20s60E20maemoE20cE2bE2bE20WikiE20HomeE20WikiE20HelpE20OverviewE20GlossaryE20CreateE20PageE20ProposeE20anE20ArticleE20SpotlightE20TopicE20E2dE20WE52TE20WidgetsE20ProgrammingE20E4canguageE20E2dE20SymbianE20CE2bE2bE20E2dE20OpenE20CE2fCE2bE2bE20E2dE20JavaE20E2dE20FlashE20E4citeE20E2dE20PythonE20WebE20TechnologiesE20E2dE20WE52TE20WidgetsE20E2dE20WidSetsE20ToolsE20andE20SE44KE20CodeE20E45E78amplesE20KnowledgeE20BaseE20TechnologyE20AreasE20SoftwareE20PlatformsE20E44evelopmentE20ProcessE20E3fE3fWikiE20ChineseE20E3fE3fE3fWikiE20JapaneseE20PortugueseE2fBrazilianE20E52ussianE20WhatE20linksE20hereE20UploadE20fileE20SpecialE20pagesE20PrintableE20versionE44ownloadE20asE20PE44FE20GoE20ToE20E2eE2eE2eX qmarsZlanguageQUxhttpE3aE2fE2fswE2enokiaE2ecomE2flanguageE2d1E2fenX qrdfZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qrdfZtypeQUqfntypeZCommunityContentQ qrdfZtypeQUqfntypeZKnowledgeBaseContentQ qrdfZtypeQUqfntypeZE52esourceQ qrdfZtypeQUqfntypeZTechnicalSolutionQ qrdfZtypeQUqfntypeZWebpageQ qrdfZtypeQUqfntypeZWikiContentQ qrdfZtypeQUqmarsZManagedE52esourceQ qrdfZtypeQUqwebZInformationE52esourceQ qrdfZtypeQUqwebZPageQ qrdfZtypeQUqwebZE52esourceQ qrdfZtypeQUqrdfsZE52esourceQ