This page was last modified 19:26, 20 January 2008.
How to run the file with the default application
From Forum Nokia Wiki
Headers
#include <apacmdln.h> #include <apgcli.h> #include <apgtask.h> #include <w32std.h>
Running a File with the default application
// Starts the default application for the passed file and runs the file in it. /* *@param aFileLocation :- File to be Launched by corresponding default application. */ void MySystemClass::LaunchDefaultApp( const TDesC& aFileLocation ) { RApaLsSession applicationSession; TUid Uid; TDataType currentdataType; RFs file; RWsSession windowSession; TThreadId currentthreadId; file.Connect(); applicationSession.Connect(); applicationSession.GetAllApps(); applicationSession.AppForDocument(aFileLocation ,Uid,currentdataType); windowSession.Connect(); TApaTaskList apataskList(windowSession); TApaTask apatask = apataskList.FindApp( Uid ); applicationSession.StartDocument(aFileLocation ,Uid,currentthreadId); applicationSession.Close(); file.Close(); windowSession.Close(); }
Related Links
Launching default application based on MIME type
| Related Discussions | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Running the series 60 emulator on the command promt | madhavis | Mobile Java Tools & SDKs | 2 | 2006-10-10 15:06 |
| Newbie at python at all. | m3m0r3xXx | Python | 8 | 2007-11-03 16:17 |
| TCB capability approval | iulian_moldovan | General Symbian C++ | 8 | 2006-03-21 06:38 |
| How to map a third application to handle specific file types | ggomeze | General Symbian C++ | 2 | 2007-07-20 09:28 |
| file dsitribution in Series 60 2nd Ed. FP3 (Symbian8.1) | eluevano | Symbian Tools & SDKs | 0 | 2005-07-19 23:57 |
