|
|
User login
Feeds |
Getting an app to use both flip open and flip closed view
|
|||||
| Mon, 2005-08-01 16:10 | |
|
I have read several posts about this, but none seems to get any to the point suggestions. The best suggestion so far is to study a programme which does this. That is EChess. I have started study the code, and have now acomplished the first step towards a fuly fledged flip open flip closed app.
First: The environment must be told that my app uses both flip closed and flip open views. This must happen befoure the app starts, because (among other things?) we want the app to be visiblie under the menue "applications" in flip closed menue. So we cant look in the code for the app to find the solution. AIF file is the solution. In the mmp file, you need something like this: Code: AIF HelloWorld.aif . HelloWorldAIF.RSS c8 icons\echess20x16.bmp icons\echess20x16m.bmp In the HelloWorldAif.rss, we need this, which is actually where the magic takes place:(AIF <target> <source path> <source> <color depth> <icon> ..... ) Code: #include <aiftool.rh> RESOURCE AIF_DATA { app_uid=0xSOMTEHING; // your app ID caption_list= { CAPTION { code=ELangEnglish; caption="HelloWorld"; } }; num_icons=1; embeddability=KAppNotEmbeddable; newfile=KAppDoesNotSupportNewFile; datatype_list= view_list = { VIEW_DATA { view_uid = 0x00000117; // YOUR view ID screen_mode = 0; // this tells the environment that this view uses FLIP OPEN view caption_list = { CAPTION {caption="FO view"; } }; }, VIEW_DATA { view_uid = 0x00000118; screen_mode = 1; // and this that this view uses FLIP CLOSED view caption_list = { CAPTION { code= ELangEnglish; caption="FC view"; } }; } }; } Dont forget to include a line like this in your pkg-file Code: "C:\Symbian\UIQ_21\Epoc32\data\z\system\apps\HelloWorld\HelloWorld.aif"-"!:\System\Apps\HelloWorld\HelloWorld.aif" ------------So far so good. The app showes up where we want. This is so far I have got now. To switch betwen the views at runtime is way ahead. But i promise you all, I will succeed with this. I will post as soon as I reach next milestone. Stay tuned, and PLEASE give me comments. |
|
Forum posts: 57
Now, I have managed to get my app to launch and draw itself in flip closed mode.
In my class CSmallView I must have this method:
{
return (aScreenMode == 1); // 1 is flip closed, 0 is flip open
}
If I search for "ViewScreenModeCompatible" in my SDK, i get nothing.
Thanks in advance for comments.
Forum posts: 57
The details are so many, so I skip continuing writing about this.
Thanks anyway
Forum posts: 17
Can you please post the remaining part on the forum ,it would be of great help to all of us who are struggling with this.
Otherwise can you mail it to me at jitendra.chhajed@magnet-i.com.
Any pointers will also be greatly appreciated.
Awaiting your reply.
Jitendra Chhajed
Forum posts: 57
Do you have a spesific question?
Forum posts: 17
Thanks for your reply.
I have a simple application which has an active object and a list box in the view.
Right now the screen size is not hardcoded listbox is drawn using
CEikonEnv::Static()->ScreenDevice()->SizeInPixels()
And the application works only in flip open mode.
My question is that I want my application to work in flip open and flip closed mode,it is ok if I am not
able to switch the mode in between.
If I change only the aif.rss file file as per your instructions will my application work in both modes.
Awaiting your reply,
Jitendra
Forum posts: 57
That means it is included in the #Applications menu when flip is closed.
M
Forum posts: 17
Thanks for replying to my mail.
Is it possible to bring an application in foreground in flip closed mode?
And is it possible to use dnl for dialing a call in flip closed mode I have read on sonyerricsson forum that ,
TVwsViewId id(KUidPhoneApp,KUidPhoneAppView) that I am using for flip open mode is not available in flip open mode.
Awaiting your reply.
Jitendra
Forum posts: 57
In order to help you, I need a more closer description of what you want to do.
M
Forum posts: 17
I am amazed with you response time and attitude.Great!
I have an application in which I am capturing the dialing event and my application comes to foreground and then I dial a number from my application.
It is working in flip open mode and now I want it work in flip closed mode.
But I have read on sonyerricsson that it is not possible to bring an application in foreground when the phone is in flip closed mode and also the DNL of phoneapp that is dialing one is not supported in flip closed mode.
Awaiting your reply,
Jitendra
Forum posts: 57
In your AppUi class you need something like this:
{
AddToStackL(*iOpenView, iOpenView);
RegisterViewL(*iOpenView);
AddToStackL(*iClosedView, iClosedView);
RegisterViewL(*iClosedView);
}
else
{
AddToStackL(*iClosedView, iClosedView);
RegisterViewL(*iClosedView);
AddToStackL(*iOpenView, iOpenView);
RegisterViewL(*iOpenView);
}
Forum posts: 17
Thanks a lot!
Can you tell me whether it is possible to dial a call using DNL in flip closed mode.
Awaiting your reply,
Jitendra
Forum posts: 57
Forum posts: 17
DNL(Dynamic Navigational link) is used to switch between views.
I am using this function to make a call from my application
void CExampleAppView::DnlToPhoneL(const TDesC& aNumber)
{
TVwsViewId id(KUidPhoneApp,KUidPhoneAppView);
TNumDnlPhone dnl;
dnl.iNumber = aNumber.Right(KPhoneNumMaxLength);
TNumDnlPhoneBuf dnlBuf(dnl);
CEikAppUi* appUi = iEikonEnv->EikAppUi();
appUi->ActivateViewL(id, KUidNumDnlPhone, dnlBuf);
}
where KUidPhoneApp,KUidPhoneAppView
in TVwsViewId id(KUidPhoneApp,KUidPhoneAppView)
provides the phone application for dialing a number and I have read in sonyericcsson forum that it is not available in flip closed
mode.
Besides have a look at these links.
http://developer.sonyericsson.com/viewSolution.do?id=5373
http://developer.sonyericsson.com/viewSolution.do?id=5382
Forum posts: 57
This is proven to be false.
Forum posts: 57
Maybe there is no corresponding flip-closed-view for that function.
(The flip-closed-view (if it exists) has another view-UID)
Magnus