--- /dev/null
+#ifndef _APPRESOURCEID_H_
+#define _APPRESOURCEID_H_
+
+extern const wchar_t* IDF_FORM;
+
+#endif // _APPRESOURCEID_H_
// Called when the application control request is received from the caller application.
virtual void OnAppControlRequestReceived(RequestId reqId, const Tizen::Base::String& operationId, const Tizen::Base::String* pUriData, const Tizen::Base::String* pMimeType, const Tizen::Base::Collection::IMap* pExtraData);
+ //Called when incoming call has to be handled
+ void SetTopMostWindow(bool bTopMost);
private:
//internal function to process AppControl request.
<Apps>
<ApiVersion>2.0</ApiVersion>
<Privileges>
+ <Privilege>http://tizen.org/privilege/uimanager</Privilege>
<Privilege>http://tizen.org/privilege/application.launch</Privilege>
+ <Privilege>http://tizen.org/privilege/power</Privilege>
<Privilege>http://tizen.org/privilege/setting</Privilege>
<Privilege>http://tizen.org/privilege/messaging.sms</Privilege>
<Privilege>http://tizen.org/privilege/vibrator</Privilege>
-->
<!DOCTYPE ScenePanel SYSTEM "UIForm.dtd">
-<ScenePanel Bversion="2.0.0.201302250946" Dversion="20120315">
+<ScenePanel Bversion="2.0.0.201303111438" Dversion="20120315">
<Panel id="IDL_DTMF_KEYPAD_PANEL">
<property backgroundColor="#000000" backgroundColorOpacity="50" compositeEnabled="true" groupStyle="GROUP_STYLE_NONE"/>
<layout height="720" mode="Portrait" type="LAYOUT_RELATIVE" width="720" x="0" y="0"/>
<layout height="660" mode="Landscape" type="LAYOUT_RELATIVE" width="560" x="0" y="0"/>
</Panel>
<TextBox id="IDC_TEXTBOX" parent="IDL_DTMF_KEYPAD_PANEL">
- <property disabledBackgroundBitmapPath="" disabledColor="#FFFFFF" disabledColorOpacity="0" disabledTextColor="" highlightedBackgroundBitmapPath="" highlightedColor="#FFFFFF" highlightedColorOpacity="0" highlightedTextColor="" lineSpacingExtra="1" lineSpacingMultiplier="1" normalBackgroundBitmapPath="" normalColor="#FFFFFF" normalColorOpacity="0" normalTextColor="#FFFFFF" text="" textAlignment="ALIGNMENT_LEFT" textSize="94" textboxBorder="TEXT_BOX_BORDER_NONE"/>
+ <property disabledBackgroundBitmapPath="" disabledColor="#FFFFFF" disabledColorOpacity="0" disabledTextColor="" highlightedBackgroundBitmapPath="" highlightedColor="#FFFFFF" highlightedColorOpacity="0" highlightedTextColor="#FFFFFF" lineSpacingExtra="1" lineSpacingMultiplier="1" normalBackgroundBitmapPath="" normalColor="#FFFFFF" normalColorOpacity="0" normalTextColor="#FFFFFF" text="" textAlignment="ALIGNMENT_LEFT" textSize="94" textboxBorder="TEXT_BOX_BORDER_NONE"/>
<layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="114" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_DTMF_KEYPAD_PANEL" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0" marginLeft="35" marginRight="35" marginTop="10" mode="Portrait" rightRelation="IDL_DTMF_KEYPAD_PANEL" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDL_DTMF_KEYPAD_PANEL" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="650" x="35" y="10"/>
<layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="114" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_DTMF_KEYPAD_PANEL" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0" marginLeft="35" marginRight="35" marginTop="10" mode="Landscape" rightRelation="IDL_DTMF_KEYPAD_PANEL" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDL_DTMF_KEYPAD_PANEL" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="490" x="35" y="10"/>
</TextBox>
--- /dev/null
+#include "AppResourceId.h"
+
+const wchar_t* IDF_FORM = L"IDF_FORM";
{
//KEEP "__initialSceneId" as empty and return false from "OnAppInitialized()"
AppLog("Terminate Phone Application");
+ AppControlProviderManager::GetInstance()->SendAppControlResult(reqId, appControlResult, null);
Terminate();
+ return;
}
}
}
else
{
+ AppLog("Outgoing call");
pSceneManager->GoForward( ForwardSceneTransition( nextScene), __pLaunchArgs);
}
appControlResult = APP_CTRL_RESULT_SUCCEEDED;
CallApp::CheckNumberIsValid(String phoneNumber)
{
//Pattern to compare all characters except 0-9 * # P ; , +
- String phoneNumberPattern(L"[^0-9*#P;,+]");
+ String phoneNumberPattern(L"[^0-9*#P,+]");
RegularExpression checkPhoneNumber;
checkPhoneNumber.Construct(phoneNumberPattern);
//If there is any character other than these listed above then display invalid number
return !resultMatch;
}
+
+void
+CallApp::SetTopMostWindow(bool bTopMost)
+{
+ AppLogDebug("bTopMost = %d",bTopMost);
+ result res = E_FAILURE;
+ //ToDO: Need to see if there is better way to handle
+ //this case
+ if(bTopMost == true)
+ {
+ GetAppFrame()->GetFrame()->SetZOrderGroup(WINDOW_Z_ORDER_GROUP_HIGH);
+ if(PowerManager::IsScreenOn() == false)
+ {
+ res = PowerManager::TurnScreenOn();
+ }
+ res = PowerManager::KeepScreenOnState(true,false);
+
+ }
+ else
+ {
+ GetAppFrame()->GetFrame()->SetZOrderGroup(WINDOW_Z_ORDER_GROUP_NORMAL);
+ PowerManager::KeepScreenOnState(false);
+ }
+
+}
#include "CallPresentationModel.h"
#include "CallSceneRegister.h"
#include "CallTypes.h"
+#include "CallApp.h"
using namespace Tizen::App;
using namespace Tizen::Base;
delete pArgs;
pArgs = null;
}
+ CallApp* pCallApp = static_cast<CallApp*>(CallApp::GetInstance());
+ pCallApp->SetTopMostWindow(true);
+
+
}
void
}
}
+ CallApp* pCallApp = static_cast<CallApp*>(CallApp::GetInstance());
+ pCallApp->SetTopMostWindow(false);
}
result
using namespace Tizen::Base::Runtime;
static const wchar_t* RINGTONE_PATH = L"/opt/usr/apps/zktdpemtmw/shared/data/ringtone_sdk.mp3";
+static const wchar_t* CALLCONNECTTONE_PATH = L"/opt/usr/apps/zktdpemtmw/shared/data/Call_Connect.ogg";
+static const wchar_t* CALLDISCONNECTTONE_PATH = L"/opt/usr/apps/zktdpemtmw/shared/data/Call_Disconnect.ogg";
+static const wchar_t* MINUTEREMINDERTONE_PATH = L"/opt/usr/apps/zktdpemtmw/shared/data/Call_RecordStart.wav";
+static const wchar_t* CALLWAITINGTONE_PATH = L"/opt/usr/apps/zktdpemtmw/shared/data/Call_WaitingTone.wav";
+
SoundManager::SoundManager(void)
: __pSoundCallSession(null)
__pPlayer->Construct(*this);
}
- reminderTonePath.Append(RINGTONE_PATH);
- __pPlayer->OpenFile(reminderTonePath,false);
- __pPlayer->SetLooping(false);
- __pPlayer->SetVolume(80);
- SetSoundMode(SOUND_MODE_MEDIA);
- __pPlayer->Play();
- SetSoundMode(SOUND_MODE_VOICE);
+ reminderTonePath.Append(MINUTEREMINDERTONE_PATH);
+ if(reminderTonePath.IsEmpty() == false)
+ {
+ __pPlayer->Close();
+ __pPlayer->OpenFile(reminderTonePath,false);
+ __pPlayer->SetLooping(false);
+ __pPlayer->SetVolume(80);
+ SetSoundMode(SOUND_MODE_MEDIA);
+ __pPlayer->Play();
+ SetSoundMode(SOUND_MODE_VOICE);
+ }
}
/*else if(ReminderToneSetStatus == false)
{
if(disconnectToneSetStatus == true)
{
- disconnectTonePath.Append(RINGTONE_PATH);
-
+ disconnectTonePath.Append(CALLDISCONNECTTONE_PATH);
if(__pPlayer == null)
{
__pPlayer = new (std::nothrow) Player();
__pPlayer->Construct(*this);
}
-
if(disconnectTonePath.IsEmpty() == false)
{
+ __pPlayer->Close();
__pPlayer->OpenFile(disconnectTonePath,false);
__pPlayer->SetLooping(false);
__pPlayer->SetVolume(80);
SetSoundMode(SOUND_MODE_MEDIA);
__pPlayer->Play();
}
-
}
}
if(reminderToneSetStatus == true)
{
- __timer.StartAsRepeatable(20000);
+ __timer.StartAsRepeatable(60000);
}
}
vconf_get_bool(VCONFKEY_CISSAPPL_CALL_CONNECT_TONE_BOOL, &unknownRejectStatus);
bool connectToneSetStatus = unknownRejectStatus;
- connectTonePath.Append(RINGTONE_PATH);
+ connectTonePath.Append(CALLCONNECTTONE_PATH);
if(connectToneSetStatus == true)
{
+
if(__pPlayer == null)
{
__pPlayer = new (std::nothrow) Player();
r = __pPlayer->Construct(*this);
}
-
- if(connectTonePath.IsEmpty() == false)
+ if (connectTonePath.IsEmpty() == false)
{
+
r = __pPlayer->OpenFile(connectTonePath,false);
r = __pPlayer->SetLooping(false);
r = __pPlayer->SetVolume(80);
if(__pSoundCallSession != null)
{
AppLogDebug("No Alert already in call");
+ String waitingTonePath;
+ waitingTonePath.Append(CALLWAITINGTONE_PATH);
+ if(__pPlayer == null)
+ {
+ __pPlayer = new (std::nothrow) Player();
+ __pPlayer->Construct(*this);
+ }
+ if (waitingTonePath.IsEmpty() == false)
+ {
+ __pPlayer->Close();
+ __pPlayer->OpenFile(waitingTonePath,false);
+ __pPlayer->SetLooping(true);
+ __pPlayer->SetVolume(80);
+ SetSoundMode(SOUND_MODE_MEDIA);
+ __pPlayer->Play();
+ }
return;
}
else
{
TelCallDial_t structDialCall;
+ AppLogDebug("Enter");
//conversion "contactNumber" to char*
const wchar_t* pContact = contactNumber.GetPointer();
int len = contactNumber.GetLength()+1;