How to hide a program(Running in background)
Login to reply to this topic.
Wed, 2005-04-27 05:45
Joined: 2005-03-03
Forum posts: 3
Hi,

   I have just started programming in symbian platform.

   I want to hide a running program without closing it. Just like minimizing a browser window without closing it. Is it possible?

   Please help me.


Regards,

Susovan Chanda

Wed, 2005-04-27 07:41
Joined: 2004-05-24
Forum posts: 982
You can try something like

Code:
TApaTask myTask(iEikonEnv->WsSession());
myTask.SetWgId(CEikonEnv::Static()->RootWin().Identifier());
myTask.SendToBackground();

pirosl

Wed, 2005-04-27 09:08
Joined: 2005-03-03
Forum posts: 3
Hi pirosl,

    Thanks for your reply.
    Its a giving TARGET ERROR 1.

  Can you pls tell me the reason behind this.

Regards,

Susovan
Wed, 2005-04-27 09:29
Joined: 2004-05-24
Forum posts: 982
Quote from: susovan
Hi pirosl,

     Thanks for your reply.
     Its a giving TARGET ERROR 1.

   Can you pls tell me the reason behind this.

Regards,

Susovan

Can you be pls more explicit with this error? In which situation appears this error? On epoc? On device? What sdk are you using there?

pirosl

Wed, 2005-04-27 10:21
Joined: 2005-03-03
Forum posts: 3
My application name newproj..and the error is [TARGETnewproj] Error 1.

It is coming while compiling the project. SDK version is 8.0a.

Thanks
Wed, 2005-05-04 16:56
Joined: 2004-05-26
Forum posts: 732
Quote from: susovan
My application name newproj..and the error is [TARGETnewproj] Error 1.

It is coming while compiling the project. SDK version is 8.0a.

Thanks

Please include the following library files in the MMP file:

Code:
LIBRARY apgrfx.lib
LIBRARY ws32.lib

Then include the following header files to the CPP file:

Code:
#include <apgtask.h> // TApaTask
#include <w32std.h>

I hope it will work fine after doing the above steps.

Thu, 2005-05-05 07:28
chishti_hameed (not verified)
Forum posts: 2037
Where this code should be called? If i call it in   CAppUI::ConstuctL()
then it always sets into background Sad  

What i want to do is: When my application is autostarted then i dont want to bring it on foreground but i want to bring it foreground when i start it myself.

Is there any way? Thanks ahead!

TApaTask myTask(iEikonEnv->WsSession());
myTask.SetWgId(CEikonEnv::Static()->RootWin().Identifier());
myTask.SendToBackground();
Mon, 2005-05-09 08:53
Joined: 2005-04-13
Forum posts: 24
Hi,

When your program is autostarted, u can call a funtion with that code. Just find out how to check if your program is autostarted or not.

Btw, is this code applicable for series 60?
Tue, 2005-05-10 05:35
chishti_hameed (not verified)
Forum posts: 2037
yeah it works fine with series 60 Tongue
Wed, 2006-03-01 14:20
Joined: 2005-09-06
Forum posts: 53
hello,

solution given by you people works fine.but i m facing one problem,actually i want my application which ,is in active state to keep on listening for SMS's but runs in the background.This purpose is solved by the piece of code  givn by you people.
but what my application was previously doing is that if any sms comes fron unidentified number then it just move that message to drafts,but now i won't be able to open that messge.
can anyone tell me what mught be the problem.

thanx
Sun, 2008-02-24 10:23
Joined: 2008-02-19
Forum posts: 6

hi

i did same as u said, but always i get Undefined symbol

i included library in mmp file
also the 2 header files in the cpp.

same error occured

i will go crazy with it.

plz help
thnx

Sun, 2008-02-24 10:43
Joined: 2005-11-20
Forum posts: 1321

If the compiler complains with something like "undefined symbol", you are (still) missing some header files. If the linker complains with a cryptic line containing "@@", you need to add a library to your mmp. Can you post the *relevant* parts of the error messages here (not the whole lot, if you get a lot of messages)?

And I don't think Symbian programming is worth going crazy over it Smiling


René Brunner

Mon, 2008-02-25 09:33
Joined: 2008-02-19
Forum posts: 6

Thanx

I just created a new application and put same code, same headers, same libraries and it works. i don't know why

Anyway thanx


copyright 2003-2009 NewLC SARL