How to know abt all the application running on P800?

Login to reply to this topic.
Mon, 2005-04-04 06:56
Joined: 2005-02-25
Forum posts: 60
Hi All

How  to implement a feature which does tell abt all the applications  running on P800 (will show the names of all the apps running on P800 will be able to switch to any app running from there or close any app running.
Plz do tell us if any of u cd help regaring this.

hope to get a reply
Thanx

Mon, 2005-04-04 12:48
Joined: 2004-12-03
Forum posts: 276
How to know abt all the application running on P800?
Following code will fetch the names of all the process running on the phone.....

Code:
TFullName repName;

TFindProcess proess;
TBuf8<100> buf;

while(proess.Next(repName) != KErrNotFound) {
buf.Copy(repName);
}

Now buf/repName will have the process name.......

Dennis

Today is a gift by GOD, that's why it is called the present.

Mon, 2005-04-04 12:55
Joined: 2004-12-03
Forum posts: 276
How to know abt all the application running on P800?
You can get the type of process by checking its uid......

you can retrieve the process by

Code:

TFullName repName;

TFindProcess proess;
TBuf8<100> buf;

RProcess aProcess;
 
while(proess.Next(repName) != KErrNotFound) {
buf.Copy(repName);

aProcess.Open(proess);

TUidType typeID = aProcess.Type();

aProcess.Close();
}

You can check the typeID for App type uid......

Dennis

Today is a gift by GOD, that's why it is called the present.

Tue, 2005-04-05 09:58
Joined: 2005-02-25
Forum posts: 60
hi
I tried this but its not working
repname contains nothing
i used
                              RFs fs1;
      RProcess aProcess;
      RFile myFile1;
      _LIT(KMyfile1,"c:\\documents\\savefile.dat");
      fs1.Connect();
      myFile1.Replace(fs1,KMyfile1,EFileWrite);
        TFindProcess proess;
        TFullName repName;
        TBuf8<100> buf;
        proess.Find(_L("Aname"));
        while(proess.Next(repName) != KErrNotFound)
          {
           
           buf.Copy(repName);
           myFile1.Write(buf);
           aProcess.Open(proess);
                                TUidType typeID = aProcess.Type();
          aProcess.Close();
        }
       myFile1.Close();
      fs1.Close();

where Aname is my application name i tried with Aname.app n even as u said without using Find fn but nothing works
repName contains nothing

any other way
Tue, 2005-04-05 10:00
Joined: 2005-02-25
Forum posts: 60
hi
I tried this but its not working
repname contains nothing
i used
                              RFs fs1;
      RProcess aProcess;
      RFile myFile1;
      _LIT(KMyfile1,"c:\\documents\\savefile.dat");
      fs1.Connect();
      myFile1.Replace(fs1,KMyfile1,EFileWrite);
        TFindProcess proess;
        TFullName repName;
        TBuf8<100> buf;
        proess.Find(_L("Aname"));
        while(proess.Next(repName) != KErrNotFound)
          {
           
           buf.Copy(repName);
           myFile1.Write(buf);
           aProcess.Open(proess);
                                TUidType typeID = aProcess.Type();
          aProcess.Close();
        }
       myFile1.Close();
      fs1.Close();

where Aname is my application name i tried with Aname.app n even as u said without using Find fn but nothing works
repName contains nothing

do tell me whats wrong here


thanx
Tue, 2005-04-05 10:00
Joined: 2005-02-25
Forum posts: 60
hi
I tried this but its not working
repname contains nothing
i used
                              RFs fs1;
      RProcess aProcess;
      RFile myFile1;
      _LIT(KMyfile1,"c:\\documents\\savefile.dat");
      fs1.Connect();
      myFile1.Replace(fs1,KMyfile1,EFileWrite);
        TFindProcess proess;
        TFullName repName;
        TBuf8<100> buf;
        proess.Find(_L("Aname"));
        while(proess.Next(repName) != KErrNotFound)
          {
           
           buf.Copy(repName);
           myFile1.Write(buf);
           aProcess.Open(proess);
                                TUidType typeID = aProcess.Type();
          aProcess.Close();
        }
       myFile1.Close();
      fs1.Close();

where Aname is my application name i tried with Aname.app n even as u said without using Find fn but nothing works
repName contains nothing

do tell me whats wrong here


thanx
Tue, 2005-04-05 12:31
Joined: 2004-12-03
Forum posts: 276
How to know abt all the application running on P800?
Hi,

I think before closing the file you have to do a flush to reflect the changes in your file.... so do the following before closing your file....

Code:

myFile1.Flush();
myFile1.Close();


Dennis

Today is a gift by GOD, that's why it is called the present.

Wed, 2005-04-06 11:26
Joined: 2005-02-25
Forum posts: 60
How to know abt all the application running on P800?
Hi Dennis
still its not working
what to do? any other way? tell me what shd be the arg to Find function?
thanx
Thu, 2005-04-07 12:39
Joined: 2004-12-03
Forum posts: 276
How to know abt all the application running on P800?
Try the following code....

Code:
_LIT8(KProcName, "Aname");

TBuf8<100> procName;

procName.Format(KProcName);

TFullName repName;

TFindProcess proess;
TBuf8<100> buf;

RProcess aProcess;
 
while(proess.Next(repName) != KErrNotFound) {
buf.Copy(repName);

if(buf.Find(procName) != KErrNotFound) {
aProcess.Open(proess);

RFs fs1;
RFile myFile1;
_LIT(KMyfile1,"c:\\documents\\savefile.dat");
fs1.Connect();
myFile1.Replace(fs1,KMyfile1,EFileWrite);

myFile1.Write(buf);
myFile1.Flush();
fs1.Close();

aProcess.Close();
break;
}
}

Are u getting any errors or just the file is blank ??

Dennis

Today is a gift by GOD, that's why it is called the present.

Wed, 2005-08-10 09:17
Joined: 2005-05-12
Forum posts: 26
Re: How to know abt all the application running on P800?
Your problem is that Apps (*.app) do not show in process list since they are not executable - they are only DLLs with a different ending.

There is an application launcher (I don't remember the real name) which then loads the DLL.

So you have to list all these loaders (all have the same name - something with ending ".EXE") and find the correct one for you.

If you want to have a little more information, try using "System Explorer", a very nice Series 60 Tool (don't know whether it works on UIQ).
  • Login to reply to this topic.