From b372bdca49595960ee87c99234e6a770b6acb186 Mon Sep 17 00:00:00 2001 From: Jehan Monnier Date: Thu, 18 Feb 2010 18:29:40 +0100 Subject: [PATCH] -create LinphoneService -fix landscape ui -create History tab view --- AndroidManifest.xml | 9 +- res/drawable/in_call.png | Bin 0 -> 3267 bytes res/drawable/out_call.png | Bin 0 -> 3260 bytes res/layout-land/dialer.xml | 36 ++++ res/layout/dialer.xml | 100 +++++++--- res/layout/history_cell.xml | 44 +++++ res/layout/main.xml | 6 +- res/values/strings.xml | 1 + src/org/linphone/ContactPickerActivity.java | 20 +- src/org/linphone/DialerActivity.java | 96 ++++++---- src/org/linphone/HistoryActivity.java | 106 +++++++++++ src/org/linphone/LinphoneActivity.java | 166 +++++++++++++++++ src/org/linphone/LinphoneConfigException.java | 40 ++++ .../linphone/LinphonePreferencesActivity.java | 6 +- .../{Linphone.java => LinphoneService.java} | 172 ++++++------------ src/org/linphone/core/LinphoneCallLog.java | 31 ++++ .../linphone/core/LinphoneCallLogImpl.java | 46 +++++ src/org/linphone/core/LinphoneCore.java | 7 + src/org/linphone/core/LinphoneCoreImpl.java | 12 ++ .../core/LinphoneProxyConfigImpl.java | 6 +- 20 files changed, 718 insertions(+), 186 deletions(-) create mode 100644 res/drawable/in_call.png create mode 100644 res/drawable/out_call.png create mode 100644 res/layout-land/dialer.xml create mode 100644 res/layout/history_cell.xml create mode 100644 src/org/linphone/HistoryActivity.java create mode 100644 src/org/linphone/LinphoneActivity.java create mode 100644 src/org/linphone/LinphoneConfigException.java rename src/org/linphone/{Linphone.java => LinphoneService.java} (61%) create mode 100644 src/org/linphone/core/LinphoneCallLog.java create mode 100644 src/org/linphone/core/LinphoneCallLogImpl.java diff --git a/AndroidManifest.xml b/AndroidManifest.xml index 08131987c..b8c492420 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -4,7 +4,7 @@ android:versionCode="1" android:versionName="1.0"> - @@ -27,6 +27,13 @@ + + + + + + + diff --git a/res/drawable/in_call.png b/res/drawable/in_call.png new file mode 100644 index 0000000000000000000000000000000000000000..d48369e6a2eefabff23f95082f4e51f3451d305a GIT binary patch literal 3267 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 BFv9=< literal 0 HcmV?d00001 diff --git a/res/drawable/out_call.png b/res/drawable/out_call.png new file mode 100644 index 0000000000000000000000000000000000000000..7fef2b4ae619f9febba445900f1f7fbd8f3f6461 GIT binary patch literal 3260 zcmV;t3`6sYP)003hM1^@s6)3N=r00004b3#c}2nYxW zdcLCc$Z&G^vxONg++z zIv;HWYJyry)2bgJN+qOrg+$>2frNzAC!i8i{Q?!DNR*Z$wY1Qden`CV1`i1O1VRWI z1c>6QQj6_4zQe3-!duyVUA>LXm0N{tg81NQ4Pyo}wYknAP zT6Lu?vgTm4GjiL4c~ zo&p{)2S>(W=7MBsGn~E;Hf^@f{h}WR-)vezo2)umei%FfJZ6q>9D$j8Bm;vWrDVe} zoW3763|W`?h93rBYFbxQRuwEi489C}-5ej>2s8Jz*f5;sd{V;DD4e zei(cj_`W&b*AK_d=bedc;6TtLtgNr6QTWRj}`) zRuy&vZ~0-c#kFlt!ScgkoT$~Z%RIO1zzWwKy<`PJi&&Y-avTbtBM~7e(Z-q*S2=GfYNF?XPz4w zZ*l#ZC4^@L?pQLcq%t5aj4RK*Qoz>1>H9sd*lJbv0`R?VY=!QbHH)RyvT1XR!?!Kb zmy%y`qtYD@RM*Rm7vx^a;JWpaGY@(UUt!ht5kCyR-HovwgB7=09yP}Yha`t@Ut-;W zjS-YH1>N;Bv6n)&*tcPmZVb+{UML_8?EX;;fF!4pH@fO2FnkF&tqw|^bbf5onB;csD;g4 zWB~|efxA}jg?;xN8Hd{*@K|SmCiIja1`oDtds|=?w^}6AGmC86yi!@Jl)7VExtBC< zfXPG{n}AdI3HthTrU>ANei(eR9s6s8rLnox% zdi!p{$qT~v#Hb(msUHTX>S9m}thiV75|&oW-j6LXx^*Qp7!`L)& zG=Im{f)jUn5ubD!1YYsOz+Pn12-8fQV>+ziwrJgVmxNq zOq8$C*4cX$Za8B#*(d5$Omzg79|n^|9fVw~WpeKl6ML2l+@-)BYlC13+?wkp-%{R& zE@I;JErRP#SnJ4%7_ckb0xNE{yosgNvVCfa9s3qb+@%9|G`=I}ja0y%$`m8YY3o~DxbFH0xaDq-$!n~D-3YuK zzYq)UP`Wno}`cmR~aOz%_y8efeI*OrC36(rU38!wmO?5+O`YODef?2cG&W%c>^$&H z@|shE+AMItd8H6Ay7eOe{l`H3a5HD(o4N^tEWllztsBKq>=ZQ z10L>r8Q`CPSx@T{`M?V3uBUvm#vd&1(q`^OG-vTc`19|a00r>42RM1L_0mPb;{QBj z)9xboQeqO?B~lwG+wtCi7g~9@>Qw&j0bd1{oh@0DDJm`0V4saBwzspHsNd^O-UXiQ zpP!w3%MXKXL@&a&!?Mo+pHK%9MbpqN%wV4#OJ!0%*r(Ge4BVn%Gf7895n#^|<&t$} z0eEA6c5bmBApQ-8m)ckWKMamxfEB5!97&<@fFA z))(rHQ2Ef1IYRnP_Q`86~3z(uDmoiaUn3%d?0;v8yF2uPTD#Wq}Zct&3)^F&OL6Ol5F65tyA-&itdU1)bCmUk)UI|Vj@?iyURaSr$cj9w%pFBV97`$# z#}VE=vtm{h2JR}R2n>Ldp9*lY-j3>;UCsl1ayN@zEIqkOxtBX>AcK#U6nPiR0<_MQ z{07iPDWv3Ht`jZCyP?7rncVd@Ku7>pyr5gV@*V8d8a>3#)UT0i9!By@RpVDqZPcsWFJ5_d~R^Toxg=*(smrwsBbFZG?4YfQ6G}sUZ zQ&4WcHTTM-^W4jwIFDKR%}4=3+X*A7oqLh3TQ~RWZDvvAE>-Rrj~BFwJ1>RYN^{LW z41<*_xYIUqbbSF63);{wr5R?~4DPf|T$Otzz}eRC<>sIIB-kuFDvRa@ak1D9K0)uYFof9m^LwU{DGQV1t) zXt&bXZ&;+ti;|4n+&R-DH*M(NW)_(NiWe2Lr!0;E-L|27`hi7;mV-7iU6ewX#oNj# z4=jX*DXL+ezO5`un3&7$+)8r~EEG+hzA;lf_cA|pFO9#gY`$RDTq%@{XYA{3X2mh9 zeRpZE6sr4+n?21e&B-d7TD~p{@>;|l7yO_IHB7v7Xo!l{4 u^RsjB0FMKI?R1S*mUn=M=4a + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/res/layout/dialer.xml b/res/layout/dialer.xml index 7d4023aa5..b2af87cec 100644 --- a/res/layout/dialer.xml +++ b/res/layout/dialer.xml @@ -1,39 +1,89 @@ + android:orientation="vertical" android:layout_width="fill_parent" + android:layout_height="fill_parent"> - + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + - - + + - + + + - + + - + diff --git a/res/layout/history_cell.xml b/res/layout/history_cell.xml new file mode 100644 index 000000000..8e2240b0d --- /dev/null +++ b/res/layout/history_cell.xml @@ -0,0 +1,44 @@ + + + + + + + + \ No newline at end of file diff --git a/res/layout/main.xml b/res/layout/main.xml index 1d0e21b7d..17d3f10a9 100644 --- a/res/layout/main.xml +++ b/res/layout/main.xml @@ -7,7 +7,7 @@ android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" - android:padding="5dp"> + > + android:layout_height="fill_parent"/> + \ No newline at end of file diff --git a/res/values/strings.xml b/res/values/strings.xml index a5a776896..f5abae018 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -21,4 +21,5 @@ No %s, do you want to return to the settings page ? Cannot initiate a new call because a call is already engaged +History diff --git a/src/org/linphone/ContactPickerActivity.java b/src/org/linphone/ContactPickerActivity.java index a20342c84..397c8486d 100644 --- a/src/org/linphone/ContactPickerActivity.java +++ b/src/org/linphone/ContactPickerActivity.java @@ -1,3 +1,21 @@ +/* +ContactPickerActivity.java +Copyright (C) 2010 Belledonne Communications, Grenoble, France + +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation; either version 2 +of the License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +*/ package org.linphone; import android.app.Activity; @@ -51,7 +69,7 @@ public class ContactPickerActivity extends Activity { } } - Linphone.getLinphone().getTabHost().setCurrentTabByTag(Linphone.DIALER_TAB); + LinphoneActivity.instance().getTabHost().setCurrentTabByTag(LinphoneActivity.DIALER_TAB); } } } diff --git a/src/org/linphone/DialerActivity.java b/src/org/linphone/DialerActivity.java index 9acbed01b..26371a4a6 100644 --- a/src/org/linphone/DialerActivity.java +++ b/src/org/linphone/DialerActivity.java @@ -1,3 +1,21 @@ +/* +DialerActivity.java +Copyright (C) 2010 Belledonne Communications, Grenoble, France + +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation; either version 2 +of the License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +*/ package org.linphone; import org.linphone.core.LinphoneAddress; @@ -9,6 +27,7 @@ import org.linphone.core.LinphoneCore.GeneralState; import android.app.Activity; import android.content.Context; +import android.content.res.Configuration; import android.media.AudioManager; import android.os.Bundle; import android.util.Log; @@ -20,7 +39,7 @@ import android.widget.TextView; import android.widget.Toast; public class DialerActivity extends Activity implements LinphoneCoreListener { - private LinphoneCore mLinphoneCore; + private TextView mAddress; private TextView mStatus; private ImageButton mCall; @@ -62,18 +81,19 @@ public class DialerActivity extends Activity implements LinphoneCoreListener { setContentView(R.layout.dialer); mAudioManager = ((AudioManager)getSystemService(Context.AUDIO_SERVICE)); try { - theDialer = this; - mLinphoneCore = Linphone.getLinphone().getLinphoneCore(); + + mAddress = (TextView) findViewById(R.id.SipUri); mCall = (ImageButton) findViewById(R.id.Call); mCall.setOnClickListener(new OnClickListener() { public void onClick(View v) { - if (mLinphoneCore.isInComingInvitePending()) { - mLinphoneCore.acceptCall(); + LinphoneCore lLinphoneCore = LinphoneService.instance().getLinphoneCore(); + if (lLinphoneCore.isInComingInvitePending()) { + lLinphoneCore.acceptCall(); return; } - if (mLinphoneCore.isIncall()) { + if (lLinphoneCore.isIncall()) { Toast toast = Toast.makeText(DialerActivity.this, getString(R.string.warning_already_incall), Toast.LENGTH_LONG); toast.show(); return; @@ -83,7 +103,7 @@ public class DialerActivity extends Activity implements LinphoneCoreListener { if (lRawAddress.startsWith("sip:")) { lCallingUri=lRawAddress; } else { - LinphoneProxyConfig lProxy = mLinphoneCore.getDefaultProxyConfig(); + LinphoneProxyConfig lProxy = lLinphoneCore.getDefaultProxyConfig(); String lDomain=null; String lNormalizedNumber=lRawAddress; if (lProxy!=null) { @@ -95,15 +115,17 @@ public class DialerActivity extends Activity implements LinphoneCoreListener { , mDisplayName); lCallingUri = lAddress.toUri(); } - mLinphoneCore.invite(lCallingUri); + lLinphoneCore.invite(lCallingUri); } }); mHangup = (ImageButton) findViewById(R.id.HangUp); mHangup.setEnabled(false); mHangup.setOnClickListener(new OnClickListener() { + public void onClick(View v) { - mLinphoneCore.terminateCall(); + LinphoneCore lLinphoneCore = LinphoneService.instance().getLinphoneCore(); + lLinphoneCore.terminateCall(); } }); @@ -116,40 +138,44 @@ public class DialerActivity extends Activity implements LinphoneCoreListener { mAddressView = anAddress; } public void onClick(View v) { - mAddressView.append(mKeyCode); + mAddressView.append(mKeyCode); } }; + mZero = (Button) findViewById(R.id.Button00) ; - mZero.setOnClickListener(new DialKeyListener(mAddress,'0')); - mOne = (Button) findViewById(R.id.Button01) ; - mOne.setOnClickListener(new DialKeyListener(mAddress,'1')); - mTwo = (Button) findViewById(R.id.Button02); - mTwo.setOnClickListener(new DialKeyListener(mAddress,'2')); - mThree = (Button) findViewById(R.id.Button03); - mThree.setOnClickListener(new DialKeyListener(mAddress,'3')); - mFour = (Button) findViewById(R.id.Button04); - mFour.setOnClickListener(new DialKeyListener(mAddress,'4')); - mFive = (Button) findViewById(R.id.Button05); - mFive.setOnClickListener(new DialKeyListener(mAddress,'5')); - mSix = (Button) findViewById(R.id.Button06); - mSix.setOnClickListener(new DialKeyListener(mAddress,'6')); - mSeven = (Button) findViewById(R.id.Button07); - mSeven.setOnClickListener(new DialKeyListener(mAddress,'7')); - mEight = (Button) findViewById(R.id.Button08); - mEight.setOnClickListener(new DialKeyListener(mAddress,'8')); - mNine = (Button) findViewById(R.id.Button09); - mNine.setOnClickListener(new DialKeyListener(mAddress,'9')); - mStar = (Button) findViewById(R.id.ButtonStar); - mStar.setOnClickListener(new DialKeyListener(mAddress,'*')); - mHash = (Button) findViewById(R.id.ButtonHash); - mHash.setOnClickListener(new DialKeyListener(mAddress,'#')); - + if (mZero != null) { + + mZero.setOnClickListener(new DialKeyListener(mAddress,'0')); + mOne = (Button) findViewById(R.id.Button01) ; + mOne.setOnClickListener(new DialKeyListener(mAddress,'1')); + mTwo = (Button) findViewById(R.id.Button02); + mTwo.setOnClickListener(new DialKeyListener(mAddress,'2')); + mThree = (Button) findViewById(R.id.Button03); + mThree.setOnClickListener(new DialKeyListener(mAddress,'3')); + mFour = (Button) findViewById(R.id.Button04); + mFour.setOnClickListener(new DialKeyListener(mAddress,'4')); + mFive = (Button) findViewById(R.id.Button05); + mFive.setOnClickListener(new DialKeyListener(mAddress,'5')); + mSix = (Button) findViewById(R.id.Button06); + mSix.setOnClickListener(new DialKeyListener(mAddress,'6')); + mSeven = (Button) findViewById(R.id.Button07); + mSeven.setOnClickListener(new DialKeyListener(mAddress,'7')); + mEight = (Button) findViewById(R.id.Button08); + mEight.setOnClickListener(new DialKeyListener(mAddress,'8')); + mNine = (Button) findViewById(R.id.Button09); + mNine.setOnClickListener(new DialKeyListener(mAddress,'9')); + mStar = (Button) findViewById(R.id.ButtonStar); + mStar.setOnClickListener(new DialKeyListener(mAddress,'*')); + mHash = (Button) findViewById(R.id.ButtonHash); + mHash.setOnClickListener(new DialKeyListener(mAddress,'#')); + } mStatus = (TextView) findViewById(R.id.status_label); + theDialer = this; } catch (Exception e) { - Log.e(Linphone.TAG,"Cannot start linphone",e); + Log.e(LinphoneService.TAG,"Cannot start linphone",e); } } diff --git a/src/org/linphone/HistoryActivity.java b/src/org/linphone/HistoryActivity.java new file mode 100644 index 000000000..f4858343c --- /dev/null +++ b/src/org/linphone/HistoryActivity.java @@ -0,0 +1,106 @@ +/* +DialerActivity.java +Copyright (C) 2010 Belledonne Communications, Grenoble, France + +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation; either version 2 +of the License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +*/ +package org.linphone; + + + +import java.util.List; + +import org.linphone.core.LinphoneAddress; +import org.linphone.core.LinphoneCallLog; +import org.linphone.core.LinphoneCallLog.CallDirection; + +import android.app.ListActivity; +import android.content.Context; +import android.os.Bundle; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; +import android.widget.BaseAdapter; +import android.widget.ImageView; +import android.widget.TextView; + +public class HistoryActivity extends ListActivity { + LayoutInflater mInflater; + @Override + public void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + mInflater = (LayoutInflater)getSystemService(Context.LAYOUT_INFLATER_SERVICE); + } + + + @Override + protected void onResume() { + super.onResume(); + setListAdapter(new CallHistoryAdapter(this)); + } + + + class CallHistoryAdapter extends BaseAdapter { + private final Context mContext; + final List mLogs; + CallHistoryAdapter(Context aContext) { + mContext = aContext; + mLogs = LinphoneService.instance().getLinphoneCore().getCallLogs(); + } + public int getCount() { + return mLogs.size(); + } + + public Object getItem(int position) { + return position; + } + + public long getItemId(int position) { + + return position; + } + + public View getView(int position, View convertView, ViewGroup parent) { + LinphoneCallLog lLog = mLogs.get(position); + View lView=null; + LinphoneAddress lAddress; + lView = mInflater.inflate(R.layout.history_cell, null); + TextView lFirstLineView = (TextView) lView.findViewById(R.id.history_cell_first_line); + TextView lSecondLineView = (TextView) lView.findViewById(R.id.history_cell_second_line); + ImageView lDirectionImage = (ImageView) lView.findViewById(R.id.history_cell_icon); + + if (lLog.getDirection() == CallDirection.Callincoming) { + lAddress = lLog.getFrom(); + lDirectionImage.setImageResource(R.drawable.in_call); + + } else { + lAddress = lLog.getTo(); + lDirectionImage.setImageResource(R.drawable.out_call); + } + + if (lAddress.getDisplayName() == null) { + lFirstLineView.setText(lAddress.getUserName()); + lSecondLineView.setVisibility(View.GONE); + } else { + lFirstLineView.setText(lAddress.getDisplayName()); + lSecondLineView.setText(lAddress.getUserName()); + } + + return lView; + + } + + } +} diff --git a/src/org/linphone/LinphoneActivity.java b/src/org/linphone/LinphoneActivity.java new file mode 100644 index 000000000..f5c49ca6b --- /dev/null +++ b/src/org/linphone/LinphoneActivity.java @@ -0,0 +1,166 @@ +/* +LinphoneActivity.java +Copyright (C) 2010 Belledonne Communications, Grenoble, France + +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation; either version 2 +of the License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +*/ +package org.linphone; + + +import android.app.AlertDialog; +import android.app.TabActivity; +import android.content.Context; +import android.content.DialogInterface; +import android.content.Intent; +import android.media.AudioManager; +import android.os.Bundle; +import android.util.Log; +import android.view.Menu; +import android.view.MenuInflater; +import android.view.MenuItem; +import android.widget.TabHost; + +public class LinphoneActivity extends TabActivity { + public static String DIALER_TAB = "dialer"; + private AudioManager mAudioManager; + private static LinphoneActivity theLinphoneActivity; + + protected static LinphoneActivity instance() + { + if (theLinphoneActivity == null) { + throw new RuntimeException("LinphoneActivity not instanciated yet"); + } else { + return theLinphoneActivity; + } + } + + public void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.main); + theLinphoneActivity = this; + + + mAudioManager = ((AudioManager)getSystemService(Context.AUDIO_SERVICE)); + + TabHost lTabHost = getTabHost(); // The activity TabHost + TabHost.TabSpec spec; // Reusable TabSpec for each tab + + + //Call History + Intent lHistoryItent = new Intent().setClass(this, HistoryActivity.class); + + spec = lTabHost.newTabSpec("history").setIndicator(getString(R.string.tab_history), + null) + .setContent(lHistoryItent); + lTabHost.addTab(spec); + + // dialer + Intent lDialerIntent = new Intent().setClass(this, DialerActivity.class); + + // Initialize a TabSpec for each tab and add it to the TabHost + spec = lTabHost.newTabSpec("dialer").setIndicator(getString(R.string.tab_dialer), + getResources().getDrawable(android.R.drawable.ic_menu_call)) + .setContent(lDialerIntent); + lTabHost.addTab(spec); + + // contact pick + Intent lContactItent = new Intent().setClass(this, ContactPickerActivity.class); + + spec = lTabHost.newTabSpec("contact").setIndicator(getString(R.string.tab_contact), + null) + .setContent(lContactItent); + lTabHost.addTab(spec); + + lTabHost.setCurrentTabByTag("dialer"); + // start linphone as background + Intent intent = new Intent(Intent.ACTION_MAIN); + intent.setClass(this, LinphoneService.class); + startService(intent); + + } + @Override + protected void onDestroy() { + super.onDestroy(); + if (isFinishing()) { + //restaure audio settings + mAudioManager.setSpeakerphoneOn(true); + mAudioManager.setMode(AudioManager.MODE_NORMAL); + mAudioManager.setRouting(AudioManager.MODE_NORMAL, + AudioManager.ROUTE_SPEAKER, AudioManager.ROUTE_ALL); + + Intent intent = new Intent(Intent.ACTION_MAIN); + intent.setClass(this, LinphoneService.class); + stopService(intent); + } + theLinphoneActivity = null; + } + @Override + public boolean onCreateOptionsMenu(Menu menu) { + // Inflate the currently selected menu XML resource. + MenuInflater inflater = getMenuInflater(); + inflater.inflate(R.menu.linphone_activity_menu, menu); + + + return true; + } + + @Override + public boolean onOptionsItemSelected(MenuItem item) { + switch (item.getItemId()) { + case R.id.menu_settings: + startprefActivity(); + return true; + case R.id.menu_exit: + finish(); + break; + default: + Log.e(LinphoneService.TAG, "Unknown menu item ["+item+"]"); + break; + } + + return false; + } + private void startprefActivity() { + Intent intent = new Intent(Intent.ACTION_MAIN); + intent.setClass(this, LinphonePreferencesActivity.class); + startActivity(intent); + } + public void initFromConf() throws LinphoneException { + + try { + LinphoneService.instance().initFromConf(); + } catch (LinphoneConfigException e) { + handleBadConfig(e.getMessage()); + } + + } + private void handleBadConfig(String message) { + AlertDialog.Builder builder = new AlertDialog.Builder(this); + builder.setMessage(String.format(getString(R.string.config_error),message)) + .setCancelable(false) + .setPositiveButton(getString(R.string.yes), new DialogInterface.OnClickListener() { + public void onClick(DialogInterface dialog, int id) { + startprefActivity(); + } + }) + .setNegativeButton(getString(R.string.no), new DialogInterface.OnClickListener() { + public void onClick(DialogInterface dialog, int id) { + dialog.cancel(); + } + }); + builder.create().show(); + } + +} diff --git a/src/org/linphone/LinphoneConfigException.java b/src/org/linphone/LinphoneConfigException.java new file mode 100644 index 000000000..998e0d8f3 --- /dev/null +++ b/src/org/linphone/LinphoneConfigException.java @@ -0,0 +1,40 @@ +/* +LinphoneCoreException.java +Copyright (C) 2010 Belledonne Communications, Grenoble, France + +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation; either version 2 +of the License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +*/ +package org.linphone; + +@SuppressWarnings("serial") +public class LinphoneConfigException extends LinphoneException { + + public LinphoneConfigException() { + super(); + } + + public LinphoneConfigException(String detailMessage, Throwable throwable) { + super(detailMessage, throwable); + } + + public LinphoneConfigException(String detailMessage) { + super(detailMessage); + } + + public LinphoneConfigException(Throwable throwable) { + super(throwable); + } + +} diff --git a/src/org/linphone/LinphonePreferencesActivity.java b/src/org/linphone/LinphonePreferencesActivity.java index 31c70191b..0bccb4b21 100644 --- a/src/org/linphone/LinphonePreferencesActivity.java +++ b/src/org/linphone/LinphonePreferencesActivity.java @@ -36,9 +36,9 @@ public class LinphonePreferencesActivity extends PreferenceActivity { protected void onStop() { super.onStop(); try { - Linphone.getLinphone().initFromConf(); - } catch (LinphoneCoreException e) { - Log.e(Linphone.TAG, "cannot update config",e); + LinphoneActivity.instance().initFromConf(); + } catch (LinphoneException e) { + Log.e(LinphoneService.TAG, "cannot update config",e); } } diff --git a/src/org/linphone/Linphone.java b/src/org/linphone/LinphoneService.java similarity index 61% rename from src/org/linphone/Linphone.java rename to src/org/linphone/LinphoneService.java index 680ddc36f..759ad7f11 100644 --- a/src/org/linphone/Linphone.java +++ b/src/org/linphone/LinphoneService.java @@ -35,12 +35,16 @@ import org.linphone.core.LinphoneProxyConfig; import android.app.AlertDialog; +import android.app.Service; import android.app.TabActivity; +import android.content.Context; import android.content.DialogInterface; import android.content.Intent; import android.content.SharedPreferences; +import android.media.AudioManager; import android.os.Bundle; import android.os.Handler; +import android.os.IBinder; import android.os.Message; import android.preference.PreferenceManager; import android.util.Log; @@ -50,7 +54,7 @@ import android.view.MenuItem; import android.widget.TabHost; import android.widget.Toast; -public class Linphone extends TabActivity implements LinphoneCoreListener { +public class LinphoneService extends Service implements LinphoneCoreListener { static final public String TAG="Linphone"; /** Called when the activity is first created. */ private static String LINPHONE_FACTORY_RC = "/data/data/org.linphone/files/linphonerc"; @@ -58,26 +62,26 @@ public class Linphone extends TabActivity implements LinphoneCoreListener { private static String RING_SND = "/data/data/org.linphone/files/oldphone_mono.wav"; private static String RINGBACK_SND = "/data/data/org.linphone/files/ringback.wav"; - private static Linphone theLinphone; + private static LinphoneService theLinphone; private LinphoneCore mLinphoneCore; private SharedPreferences mPref; Timer mTimer = new Timer("Linphone scheduler"); - public static String DIALER_TAB = "dialer"; private Handler mIteratehandler; - static Linphone getLinphone() { + static LinphoneService instance() { if (theLinphone == null) { throw new RuntimeException("LinphoneActivity not instanciated yet"); } else { return theLinphone; } } + @Override - public void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - setContentView(R.layout.main); + public void onCreate() { + super.onCreate(); theLinphone = this; + mPref = PreferenceManager.getDefaultSharedPreferences(getApplicationContext()); try { copyAssetsFromPackage(); @@ -106,31 +110,6 @@ public class Linphone extends TabActivity implements LinphoneCoreListener { mTimer.scheduleAtFixedRate(lTask, 0, 100); - TabHost lTabHost = getTabHost(); // The activity TabHost - TabHost.TabSpec spec; // Reusable TabSpec for each tab - - - // Create an Intent to launch an Activity for the tab (to be reused) - Intent lDialerIntent = new Intent().setClass(this, DialerActivity.class); - - // Initialize a TabSpec for each tab and add it to the TabHost - spec = lTabHost.newTabSpec("dialer").setIndicator(getString(R.string.tab_dialer), - getResources().getDrawable(android.R.drawable.ic_menu_call)) - .setContent(lDialerIntent); - lTabHost.addTab(spec); - - - - // Do the same for the other tabs - Intent lContactItent = new Intent().setClass(this, ContactPickerActivity.class); - - spec = lTabHost.newTabSpec("contact").setIndicator(getString(R.string.tab_contact), - null) - .setContent(lContactItent); - lTabHost.addTab(spec); - - lTabHost.setCurrentTabByTag("dialer"); - @@ -141,11 +120,7 @@ public class Linphone extends TabActivity implements LinphoneCoreListener { } - @Override - protected void onDestroy() { - super.onDestroy(); - if (isFinishing()) System.exit(0); // FIXME to destroy liblinphone - } + private void copyAssetsFromPackage() throws IOException { @@ -204,53 +179,24 @@ public class Linphone extends TabActivity implements LinphoneCoreListener { // TODO Auto-generated method stub } - @Override - public boolean onCreateOptionsMenu(Menu menu) { - // Inflate the currently selected menu XML resource. - MenuInflater inflater = getMenuInflater(); - inflater.inflate(R.menu.linphone_activity_menu, menu); - return true; - } - - @Override - public boolean onOptionsItemSelected(MenuItem item) { - switch (item.getItemId()) { - case R.id.menu_settings: - startprefActivity(); - return true; - case R.id.menu_exit: - finish(); - break; - default: - Log.e(TAG, "Unknown menu item ["+item+"]"); - break; - } - - return false; - } - - public void initFromConf() throws LinphoneCoreException { + public void initFromConf() throws LinphoneConfigException, LinphoneException { //1 read proxy config from preferences String lUserName = mPref.getString(getString(R.string.pref_username_key), null); if (lUserName == null) { - handleBadConfig(getString(R.string.wrong_username)); - return; + throw new LinphoneConfigException(getString(R.string.wrong_username)); } String lPasswd = mPref.getString(getString(R.string.pref_passwd_key), null); if (lPasswd == null) { - handleBadConfig(getString(R.string.wrong_passwd)); - return; - + throw new LinphoneConfigException(getString(R.string.wrong_passwd)); } - + String lDomain = mPref.getString(getString(R.string.pref_domain_key), null); if (lDomain == null) { - handleBadConfig(getString(R.string.wrong_domain)); - return; + throw new LinphoneConfigException(getString(R.string.wrong_domain)); } @@ -259,62 +205,58 @@ public class Linphone extends TabActivity implements LinphoneCoreListener { LinphoneAuthInfo lAuthInfo = LinphoneCoreFactory.instance().createAuthInfo(lUserName, lPasswd); mLinphoneCore.addAuthInfo(lAuthInfo); - + //proxy String lProxy = mPref.getString(getString(R.string.pref_proxy_key), "sip:"+lDomain); - + //get Default proxy if any LinphoneProxyConfig lDefaultProxyConfig = mLinphoneCore.getDefaultProxyConfig(); String lIdentity = "sip:"+lUserName+"@"+lDomain; - if (lDefaultProxyConfig == null) { - lDefaultProxyConfig = mLinphoneCore.createProxyConfig(lIdentity, lProxy, null,true); - mLinphoneCore.addtProxyConfig(lDefaultProxyConfig); - mLinphoneCore.setDefaultProxyConfig(lDefaultProxyConfig); + try { + if (lDefaultProxyConfig == null) { + lDefaultProxyConfig = mLinphoneCore.createProxyConfig(lIdentity, lProxy, null,true); + mLinphoneCore.addtProxyConfig(lDefaultProxyConfig); + mLinphoneCore.setDefaultProxyConfig(lDefaultProxyConfig); - } else { - lDefaultProxyConfig.edit(); - lDefaultProxyConfig.setIdentity(lIdentity); - lDefaultProxyConfig.setProxy(lProxy); - lDefaultProxyConfig.enableRegister(true); - lDefaultProxyConfig.done(); - } - lDefaultProxyConfig = mLinphoneCore.getDefaultProxyConfig(); - - if (lDefaultProxyConfig !=null) { - //prefix - String lPrefix = mPref.getString(getString(R.string.pref_prefix_key), null); - if (lPrefix != null ) { - lDefaultProxyConfig.setDialPrefix(lPrefix); + } else { + lDefaultProxyConfig.edit(); + lDefaultProxyConfig.setIdentity(lIdentity); + lDefaultProxyConfig.setProxy(lProxy); + lDefaultProxyConfig.enableRegister(true); + lDefaultProxyConfig.done(); } - //escape + - lDefaultProxyConfig.setDialEscapePlus(true); + lDefaultProxyConfig = mLinphoneCore.getDefaultProxyConfig(); + + if (lDefaultProxyConfig !=null) { + //prefix + String lPrefix = mPref.getString(getString(R.string.pref_prefix_key), null); + if (lPrefix != null ) { + lDefaultProxyConfig.setDialPrefix(lPrefix); + } + //escape + + lDefaultProxyConfig.setDialEscapePlus(true); + } + }catch (LinphoneCoreException e) { + throw new LinphoneException(e); } - + } - private void handleBadConfig(String message) { - AlertDialog.Builder builder = new AlertDialog.Builder(this); - builder.setMessage(String.format(getString(R.string.config_error),message)) - .setCancelable(false) - .setPositiveButton(getString(R.string.yes), new DialogInterface.OnClickListener() { - public void onClick(DialogInterface dialog, int id) { - startprefActivity(); - } - }) - .setNegativeButton(getString(R.string.no), new DialogInterface.OnClickListener() { - public void onClick(DialogInterface dialog, int id) { - dialog.cancel(); - } - }); - builder.create().show(); - } - private void startprefActivity() { - Intent intent = new Intent(Intent.ACTION_MAIN); - intent.setClass(Linphone.this, LinphonePreferencesActivity.class); - startActivity(intent); - } + + protected LinphoneCore getLinphoneCore() { return mLinphoneCore; } + @Override + public IBinder onBind(Intent intent) { + return null; + } + + @Override + public void onDestroy() { + super.onDestroy(); + System.exit(0); // FIXME to destroy liblinphone + } + } \ No newline at end of file diff --git a/src/org/linphone/core/LinphoneCallLog.java b/src/org/linphone/core/LinphoneCallLog.java new file mode 100644 index 000000000..19d851a43 --- /dev/null +++ b/src/org/linphone/core/LinphoneCallLog.java @@ -0,0 +1,31 @@ +/* +LinPhoneCallLog.java +Copyright (C) 2010 Belledonne Communications, Grenoble, France + +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation; either version 2 +of the License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +*/ +package org.linphone.core; + +public interface LinphoneCallLog { + public enum CallDirection { + CallOutgoing,Callincoming + } + + public LinphoneAddress getFrom(); + + public LinphoneAddress getTo (); + + public LinphoneCallLog.CallDirection getDirection(); +} diff --git a/src/org/linphone/core/LinphoneCallLogImpl.java b/src/org/linphone/core/LinphoneCallLogImpl.java new file mode 100644 index 000000000..c35eea2c7 --- /dev/null +++ b/src/org/linphone/core/LinphoneCallLogImpl.java @@ -0,0 +1,46 @@ +/* +LinPhoneCallLogImpl.java +Copyright (C) 2010 Belledonne Communications, Grenoble, France + +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation; either version 2 +of the License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +*/ +package org.linphone.core; + + +class LinphoneCallLogImpl implements LinphoneCallLog { + + protected final long nativePtr; + + private native long getFrom(long nativePtr); + private native long getTo(long nativePtr); + private native boolean isIncoming(long nativePtr); + LinphoneCallLogImpl(long aNativePtr) { + nativePtr = aNativePtr; + } + + + public CallDirection getDirection() { + return isIncoming(nativePtr)?CallDirection.Callincoming:CallDirection.CallOutgoing; + } + + public LinphoneAddress getFrom() { + return new LinphoneAddressImpl(getFrom(nativePtr)); + } + + public LinphoneAddress getTo() { + return new LinphoneAddressImpl(getTo(nativePtr)); + } + +} diff --git a/src/org/linphone/core/LinphoneCore.java b/src/org/linphone/core/LinphoneCore.java index 59747220c..c39ef36f2 100644 --- a/src/org/linphone/core/LinphoneCore.java +++ b/src/org/linphone/core/LinphoneCore.java @@ -18,6 +18,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package org.linphone.core; +import java.util.List; + public interface LinphoneCore { @@ -116,4 +118,9 @@ public interface LinphoneCore { public void acceptCall(); + /** + * @return a list of LinphoneCallLog + */ + public List getCallLogs(); + } diff --git a/src/org/linphone/core/LinphoneCoreImpl.java b/src/org/linphone/core/LinphoneCoreImpl.java index 2997033e5..80d24bd67 100644 --- a/src/org/linphone/core/LinphoneCoreImpl.java +++ b/src/org/linphone/core/LinphoneCoreImpl.java @@ -20,6 +20,8 @@ package org.linphone.core; import java.io.File; import java.io.IOException; +import java.util.ArrayList; +import java.util.List; class LinphoneCoreImpl implements LinphoneCore { @@ -42,6 +44,9 @@ class LinphoneCoreImpl implements LinphoneCore { private native boolean isInCall(long nativePtr); private native boolean isInComingInvitePending(long nativePtr); private native void acceptCall(long nativePtr); + private native long getCallLog(long nativePtr,int position); + private native int getNumberOfCallLogs(long nativePtr); + LinphoneCoreImpl(LinphoneCoreListener listener, File userConfig,File factoryConfig,Object userdata) throws IOException { mListener=listener; @@ -109,4 +114,11 @@ class LinphoneCoreImpl implements LinphoneCore { acceptCall(nativePtr); } + public List getCallLogs() { + List logs = new ArrayList(); + for (int i=0;i < getNumberOfCallLogs(nativePtr);i++) { + logs.add(new LinphoneCallLogImpl(getCallLog(nativePtr, i))); + } + return logs; + } } diff --git a/src/org/linphone/core/LinphoneProxyConfigImpl.java b/src/org/linphone/core/LinphoneProxyConfigImpl.java index af2722dd2..3794c58bf 100644 --- a/src/org/linphone/core/LinphoneProxyConfigImpl.java +++ b/src/org/linphone/core/LinphoneProxyConfigImpl.java @@ -18,7 +18,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package org.linphone.core; -import org.linphone.Linphone; +import org.linphone.LinphoneService; import android.util.Log; @@ -35,14 +35,14 @@ class LinphoneProxyConfigImpl implements LinphoneProxyConfig { setProxy(proxy); enableRegister(enableRegister); ownPtr=true; - Log.w(Linphone.TAG, "route ["+route+"] not used yet"); + Log.w(LinphoneService.TAG, "route ["+route+"] not used yet"); } protected LinphoneProxyConfigImpl(long aNativePtr) { nativePtr = aNativePtr; ownPtr=false; } protected void finalize() throws Throwable { - Log.e(Linphone.TAG,"fixme, should release underlying proxy config"); + Log.e(LinphoneService.TAG,"fixme, should release underlying proxy config"); // FIXME if (ownPtr) delete(nativePtr); } private native long newLinphoneProxyConfig();